:pbuilder {:extra-deps {org.rssys/pbuilder {:mvn/version "0.1.4"}}
:jvm-opts []
:main-opts ["--main" "org.rssys.pbuilder.core"]}
Project builder for Clojure projects with tools.deps, based on Badigeon, has the following functionality:
Compile java sources
AOT compile Clojure sources
Package a project as a jar file
Install jar files to the local maven repository
Install jar files to remote maven repository
Sign jar files
Package a project into a standalone bundle with a start script
Package a project as an uberjar file
Produce a custom JRE runtime using jlink
Add to :aliases section of deps.edn pbuilder dependency (see latest version above):
:pbuilder {:extra-deps {org.rssys/pbuilder {:mvn/version "0.1.4"}}
:jvm-opts []
:main-opts ["--main" "org.rssys.pbuilder.core"]}
Add at root of your project file pbuild.edn
. Structure for pbuild.edn
see in example.
Keys :main and :omit-source? are valid for uberjar project only.
Here is an example for this project:
{
;;:java-source-paths "java-src"
;;:javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"]
:warn-on-resource-conflicts? true
:deploy-signed? true
:deploy-repo {:id "clojars" :url "https://clojars.org/repo"}
:deploy-creds :m2-settings ;; :m2-settings or :password-prompt
:target-folder "target"
:group-id "org.rssys"
:artifact-id "pbuilder"
:artifact-version "0.1.1-SNAPSHOT"
:main "org.rssys.pbuilder.core"
:omit-source? true
;;:uberjar-filename "pbuilder.jar"
:description "Project builder is a build tool for Clojure projects with tools.deps."
:url "https://github.com/redstarssystems/pbuilder.git"
:scm {:url "https://github.com/redstarssystems/pbuilder.git"}
:license {:name "EPL-2.0"
:url "https://www.eclipse.org/legal/epl-2.0/"}
}
Then run clojure -A:pbuilder <command>
.
List of available commands:
clean - clear target folder
javac - compile java sources
compile - compile clojure code
jar - build jar file (as library)
uberjar - build standalone executable jar file (uberjar)
install - install jar file (library) to local .m2
deploy - deploy jar file (library) to clojars.org
conflicts - show class conflicts (same name class in multiple jar files)
standalone - build standalone bundle uberjar + custom JRE using JDK 9+ jlink.
release - release artifact. To release artifact run clojure -A:pbuild release
.
bump - bump version artifact in build file. E.g: clojure -A:pbuilder bump beta
. Parameter should be
one of: major, minor, patch, alpha, beta, rc, qualifier
Copyright © 2020 Mike Ananev
Distributed under the Eclipse Public License 2.0 or (at your option) any later version.
Project builder uses Badigeon software https://github.com/EwenG/badigeon
Copyright 2019 Ewen Grosjean.
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0)
Project builder uses some code from Leiningen https://github.com/technomancy/leiningen
Source Copyright © 2009-2018 Phil Hagelberg, Alex Osborne, Dan Larkin, and contributors. Distributed under the Eclipse Public License, the same as Clojure uses. See the file COPYING.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close