:pbuilder {:extra-deps {org.rssys/pbuilder {:mvn/version "0.1.8"}}
:jvm-opts []
:main-opts ["--main" "org.rssys.pbuilder.core"]}
Project builder is a high level wrapper for 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
Warning: not tested on Windows! Make sure that unix tools such as chmod, make, tar are available in the %PATH%.
Easiest way to use pbuilder is to use it in templates:
Add to :aliases section of deps.edn pbuilder dependency (see latest version above):
:pbuilder {:extra-deps {org.rssys/pbuilder {:mvn/version "0.1.8"}}
:jvm-opts []
:main-opts ["--main" "org.rssys.pbuilder.core"]}
Add file pbuild.edn
to project root.
Structure for pbuild.edn
is shown below.
Keys :main, :standalone-run-script, :excluded-libs and :omit-source? are valid for uberjar/standalone projects only.
Here is an example of structure pbuild.edn
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.8-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/"}
:excluded-libs #{} ;; e.g #{ org.clojure/clojure my.org/lib01}
;;:standalone-run-script "./my-custom-script.sh"
;;:manifest {"Multi-Release" "true"} ;; here you may override MANIFEST.MF
}
To run pbuilder use clojure -A:pbuilder <command>
.
List of available commands:
clean - clean 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.
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