Skip to content

Boot task for using an existing pom.xml for dependencies, repositories, etc...

License

Notifications You must be signed in to change notification settings

cpmcdaniel/boot-with-pom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

boot-with-pom

Clojars Project

A simple with-pom task that allows boot builds to get their project information (groupId, artifactId, version), dependencies, and repositories from an existing Maven POM.

[cpmcdaniel/boot-with-pom "1.1-SNAPSHOT"] ;; latest release

Usage

The following examples assume you have boot installed and up to date.

Note: the with-pom task is not compatible with the built-in pom task. The two will step on each other's changes.

Within a project

If you already have a build.boot, add the dependency above to :dependencies and (require '[cpmcdaniel/boot-with-pom :refer :all]). The build.boot file may look like the following:

(set-env!
 :source-paths   #{"src/main/java" "src/main/clojure"}
 :resource-paths #{"src/main/resources"}
 :dependencies   '[[cpmcdaniel/boot-with-pom "1.1-SNAPSHOT" :scope "provided"]])

(task-options!
 aot  {:namespace     #{'net.canarymod.plugin.lang.clojure.clj-plugin}}
 uber {:exclude-scope #{"provided"}})

(require '[cpmcdaniel.boot-with-pom :refer :all])

(deftask build
   "Build my project"
   []
   (comp (with-pom) (aot) (javac) (uber) (jar) (install)))

The build can then be executed with boot build or:

boot with-pom aot javac uber jar install

Specifying location of the POM

In most cases, the pom.xml will exist in the project root directory. If, for some reason, it is in a different location or has a different name, you may pass the -p or --pom argument like so:

boot with-pom --pom foo/bar-pom.xml jar install

Acknowledgements

Thanks to the boot developers and the folks in #hoplon on FreeNode IRC for walking me through my first boot task!

License

Copyright © 2015 Craig McDaniel

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Boot task for using an existing pom.xml for dependencies, repositories, etc...

Resources

License

Stars

Watchers

Forks

Packages

No packages published