NAR Lifecycle

The NAR lifecycle copies the default Maven lifecycle and adds native goals to its phases. The table below shows the different phases of the NAR Lifecycle and the goals (including standard maven goals) attached to them. The order is left to right, top to bottom.

PhaseGoals (NAR Goals in bold)
generate-sourcesnar-download, nar-system-generate
process-sourcesnar-unpack
process-resourcesresources, nar-resources
compilecompile, nar-javah
process-classesnar-compile
process-test-resourcestestResources
test-compiletestCompile, nar-testCompile
testtest, nar-test
packagenar-package, jar
integration-testnar-integration-test
installinstall
deploydeploy

The NAR plugin attaches the nar files it produces to the main artifact (jar) so the standard install and deploy plugins of maven do their job.

The nar-assembly goal is not part of the lifestyle and should be called independently.