This generates a javadoc covering every subproject. From Novelang root project:
mvn -Dnovelang.javadoc.skip=false javadoc:aggregate
Generated HTML goes in target/site/apidocs
.
This generates a javadoc covering every subproject. From Novelang root project:
mvn -Dnovelang.javadoc.skip=false javadoc:aggregate
Generated HTML goes in target/site/apidocs
.
This is an update of previous Maven cheat sheet.
Release
mvn -e --batch-mode clean release:prepare -Dnovelang.build.distribution -DreleaseVersion=M.m.f > build-release-prepare.log mvn release:perform -Dnovelang.build.distribution -DreleaseVersion=M.m.f > build-release-perform.log
There is an updated version of this post.
This is a list of useful Maven commands. They work with Novelang-0.44.2. Later version will probably make some of them less verbose, using some default parameters.
Convention: the Novelang/$
represents the command prompt, with working directory being Novelang’s home directory. Subdirectories appear when needed.
Plugin versions
Stay up-to-date by listing more recent plugins (there is another goal for dependencies):
Novelang/$ mvn versions:display-plugin-updates
Show dependency tree:
Novelang/$ mvn dependency:tree
Feed local repository with fresh artifacts
Novelang/$ mvn clean install
Force child modules version
Force the version of every child module to the one of the parent:
Novelang/$ mvn -N versions:update-child-modules
Performing a release (may be specific to Novelang-0.44.2)
First, clean previous POM backup files:
Novelang/$ mvn release:clean
Then prepare the release. This does the following:
M.m.f
in the snippet below).
.Novelang/$ mvn -e --batch-mode release:prepare -Drelease=false -DlocalCheckout=true -DreleaseVersion=M.m.f -DdevelopmentVersion=SNAPSHOT -Dtag=release-M.m.f > build-release-prepare.log
This part is likely to fail. If something goes wrong:
--hard
way, to the version immediately before Maven’s changes.release-M.m.f
tag local git repository.release-M.m.f
tag on remote git repository: git push -v github :refs/tags/release-M.m.f
--force
option (better idea, anyone?).Novelang/$ mvn release:clean
Get sure that’s everything OK with gitk.
Might be useful to reset all POM version (like after some POM or branch hacking): set root pom.xml
version to SNAPSHOT
and run mvn versions:update-child-modules
.
Once this is done, our git repositories contain good, tagged stuff. Last step is to perform the final build.
Novelang/$ mvn release:perform > build-release-perform.log
(There is no additional parameter to pass; the release.prepare
did create some POM copies with relevant information.)
The release.perform
goal performs a fresh checkout in Novelang/target/checkout
where all the pom.xml
contain expected M.m.f
version. The build calls the deploy:deploy
on Novelang-documentation
and Novelang-distribution
which upload relevant files on SourceForge and send email notifications.
Useful links
Mini-guide about Maven release plugin.
Untested
Resume from a give module folder instead of restarting the build since the beginning:
Novelang/$ mvn reactor:resume -Dfrom=bar