Speeds up Maven successive invocations by "keeping a copy of Maven running in the background" using nailgun (avoiding reloading plugin classes and taking advantage of a warmed up jvm).
Once installed, you can use nvn
instead of mvn
; nvn
will transparently start nvn-server
in the background if it
isn't already started, and then on hand all the command line args to nvn-server.
To stop nvn-server
, run nvn --stop
with no other args.
Currently is built with Maven 3.0.5, but shouldn't be too hard to make it switchable to other versions (pull requests welcome!) Note that there's some code copy pasted and modified (1 line commented out) from Maven 3.0.5, so you'll need to update that most likely if you go down that path.
See also mvnsh, but the approach in this project doesn't replace your shell.
Forked from nigelzor's maven-nailgun (many thanks!) to add packaging and tests.
- gcc compiler
- bash and standard unix utils: nc, lsof, awk, xargs, sed, kill, cp
- nothing listening on port 45785 (
git grep MVN_NAILGUN_PORT
to see where to change this) - a mvn to bootstrap with
To start using:
- run
mvn package
and follow instructions under 'next steps'
To run integration tests or get a demo:
- run
mvn integration-test
For use on Windows / other times when the packaging scripts fail.
- run
mvn pre-package
to createtarget/maven-nailed-1.0-SNAPSHOT.jar
- copy
nailgun-server-0.9.1.jar
(should be in your maven repo) andmaven-nailed-1.0-SNAPSHOT.jar
into maven's/lib/ext/
- in maven's /bin/, make copies of
mvn
andm2.conf
(nvn-server
andnvn.conf
) - in
mvn-ng-server
change"-Dclassworlds.conf=${M2_HOME}/bin/m2.conf"
to"-Dclassworlds.conf=${M2_HOME}/bin/nvn.conf"
- in
nvn.conf
changeorg.apache.maven.cli.MavenCli
tocom.asparck.maven.nailed.Server
- start the server with
nvn-server localhost:2113
- download and compile the nailgun client from source to
ng
- whenever you would call
mvn foo
, now useng com.asparck.maven.nailed.Client foo