Awesome
maven
maven is a tool to simplify the build processes in a java project. See documentation
Maintainers
- The Core Planners: chef-core-planners@chef.io
Type of Package
Binary package
Use as Dependency
Binary packages can be set as runtime or build time dependencies. See Defining your dependencies for more information.
To add core/maven as a dependency, you can add one of the following to your plan file.
Buildtime Dependency
pkg_build_deps=(core/maven)
Runtime dependency
pkg_deps=(core/maven)
Use as Tool
Installation
To install this plan, you should run the following commands to first install, and then link the binaries this plan creates.
hab pkg install core/maven --binlink
will include the following binaries to the PATH:
- /bin/mvn
- /bin/mvnDebug
- /bin/mvnyjp
For example:
$ hab pkg install core/maven --binlink
» Installing core/maven
☁ Determining latest version of core/maven in the 'stable' channel
→ Found newer installed version (core/maven/3.6.3/20200924115706) than remote version (core/maven/3.6.3/20200421152510)
→ Using core/maven/3.6.3/20200924115706
★ Install of core/maven/3.6.3/20200924115706 complete with 0 new packages installed.
» Binlinking mvnDebug from core/maven/3.6.3/20200924115706 into /bin
★ Binlinked mvnDebug from core/maven/3.6.3/20200924115706 to /bin/mvnDebug
» Binlinking mvn.cmd from core/maven/3.6.3/20200924115706 into /bin
★ Binlinked mvn.cmd from core/maven/3.6.3/20200924115706 to /bin/mvn.cmd
» Binlinking m2.conf from core/maven/3.6.3/20200924115706 into /bin
★ Binlinked m2.conf from core/maven/3.6.3/20200924115706 to /bin/m2.conf
» Binlinking mvnDebug.cmd from core/maven/3.6.3/20200924115706 into /bin
★ Binlinked mvnDebug.cmd from core/maven/3.6.3/20200924115706 to /bin/mvnDebug.cmd
» Binlinking mvn from core/maven/3.6.3/20200924115706 into /bin
★ Binlinked mvn from core/maven/3.6.3/20200924115706 to /bin/mvn
» Binlinking mvnyjp from core/maven/3.6.3/20200924115706 into /bin
★ Binlinked mvnyjp from core/maven/3.6.3/20200924115706 to /bin/mvnyjp
Using an example binary
Since the maven binaries require some special environment setup before executation, they cannot be run on their own. Fortunately, habitat provides the necessary setup through its hab pkg exec core/maven
command. For example, you can run the mvn binary in the following way:
hab pkg exec core/maven mvn --help
$ hab pkg exec core/maven -- mvn --help
usage: mvn [options] [<goal(s)>] [<phase(s)>]
Options:
-am,--also-make If project list is specified, also
build projects required by the
list
-amd,--also-make-dependents If project list is specified, also
build projects that depend on
projects on the list
-B,--batch-mode Run in non-interactive (batch)
mode (disables output color)
-b,--builder <arg> The id of the build strategy to
use
-C,--strict-checksums Fail the build if checksums don't
match
-c,--lax-checksums Warn if checksums don't match
...
...