Hi list.
I just got hit by a weird interaction between two plugins, namely the
maven-enforcer-plugin and the maven-assembly-plugin:
I recently updated the versions for the plugins used in my build and
suddenly the creation of an assembly broke with an NPE:
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-assembly-plugin:2.4:single (assemble)
> on project extjars: Execution assemble of goal
> org.apache.maven.plugins:maven-assembly-plugin:2.4:single failed.
> NullPointerException -> [Help 1]
Now the strange part is, that the m-a-p version had not been updated and
the assembly descriptor had not been changed.
Further investigation revealed the update of m-e-p to be the cause of
the error, as reverting to 1.2 (down from 1.3) magically made the build
work again.
I think this is a bug/regression that should be fixed, but: which of the
plugins should I file the Jira against? Is the m-e-p destroying data
that it should not touch or did the changed behaviour of m-e-p uncover a
bug in m-a-p?
If nothing else here's more proof of the necessity of nailing down all
the versions to get a reproducible build...
If you feel up to reproducing/analyzing the error here are the two
(merged and stripped down) files required:
pom.xml:
4.0.01.3ch.pecunifex.mavenextjars2014.0.0-SNAPSHOTpom3rd-party Jars Assembly
Collect all 3rd-party dependencies and assemble them for
redistribution.
3.0asmasm-commons3.1asmasm3.1packageorg.apache.maven.pluginsmaven-clean-plugin2.4.1org.apache.maven.pluginsmaven-deploy-plugin2.7org.apache.maven.pluginsmaven-install-plugin2.3.1org.apache.maven.pluginsmaven-site-plugin3.0org.apache.maven.pluginsmaven-assembly-plugin2.4assemblepackagesinglefalse
extjars.xml
org.apache.maven.pluginsmaven-enforcer-plugin${plugins.maven-enforcer-plugin.version}enforce-plugin-versionsenforceBest Practice is to
always define plugin versions!
extjars.xml:
extjarszipfalsejava/ext06440755falsefalseasm:asm-commons:jar:3.1asm:asm:jar:3.1
When called via:
mvn -Dplugins.maven-enforcer-plugin.version=1.2
a zip file is generated as expected, when called via
mvn -Dplugins.maven-enforcer-plugin.version=1.3
(or without argument) you will get the NPE.
Cheers,
Wolf
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org