Maven 3.0.5 - Strange Interaction/Regression: maven-enforcer-plugin vs. maven-assembly-plugin

2013-07-03 Thread Wolf Geldmacher

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:

project xmlns=http://maven.apache.org/POM/4.0.0;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd;
modelVersion4.0.0/modelVersion

properties
plugins.maven-enforcer-plugin.version1.3/plugins.maven-enforcer-plugin.version
/properties

groupIdch.pecunifex.maven/groupId
artifactIdextjars/artifactId
version2014.0.0-SNAPSHOT/version
packagingpom/packaging
name3rd-party Jars Assembly/name
description
Collect all 3rd-party dependencies and assemble them for 
redistribution.

/description

prerequisites
maven3.0/maven
/prerequisites

dependencies
dependency
groupIdasm/groupId
artifactIdasm-commons/artifactId
version3.1/version
/dependency
dependency
groupIdasm/groupId
artifactIdasm/artifactId
version3.1/version
/dependency
!-- ... --
/dependencies

build
defaultGoalpackage/defaultGoal
plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-clean-plugin/artifactId
version2.4.1/version
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-deploy-plugin/artifactId
version2.7/version
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-install-plugin/artifactId
version2.3.1/version
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-site-plugin/artifactId
version3.0/version
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-assembly-plugin/artifactId
version2.4/version
executions
execution
idassemble/id
phasepackage/phase
goalsgoalsingle/goal/goals
configuration
appendAssemblyIdfalse/appendAssemblyId
descriptors
descriptor
extjars.xml
/descriptor
/descriptors
/configuration
/execution
/executions
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-enforcer-plugin/artifactId
version${plugins.maven-enforcer-plugin.version}/version
executions
execution
idenforce-plugin-versions/id
goals
goalenforce/goal
/goals
configuration
rules
requirePluginVersions
 messageBest Practice is to 
always define plugin versions!/message

/requirePluginVersions
/rules
/configuration
/execution
/executions
/plugin
/plugins
/build
/project

extjars.xml:

assembly 
xmlns=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2;

xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
http://maven.apache.org/xsd/assembly-1.1.2.xsd;
idextjars/id
formats
formatzip/format
/formats

Re: Maven 3.0.5 - Strange Interaction/Regression: maven-enforcer-plugin vs. maven-assembly-plugin

2013-07-03 Thread Stephen Connolly
File the bug request against enforcer and let that move it *if* necessary
as initial evidence points to enforcer's issue


On 3 July 2013 13:40, Wolf Geldmacher wolf.geldmac...@abacus.ch wrote:

 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:

 project 
 xmlns=http://maven.apache.**org/POM/4.0.0http://maven.apache.org/POM/4.0.0
 
  
 xmlns:xsi=http://www.w3.org/**2001/XMLSchema-instancehttp://www.w3.org/2001/XMLSchema-instance
 
  
 xsi:schemaLocation=http://**maven.apache.org/POM/4.0.0http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/xsd/**maven-4.0.0.xsdhttp://maven.apache.org/xsd/maven-4.0.0.xsd
 
 modelVersion4.0.0/**modelVersion

 properties
 plugins.maven-enforcer-**plugin.version1.3/plugins.**
 maven-enforcer-plugin.version
 /properties

 groupIdch.pecunifex.maven/**groupId
 artifactIdextjars/**artifactId
 version2014.0.0-SNAPSHOT/**version
 packagingpom/packaging
 name3rd-party Jars Assembly/name
 description
 Collect all 3rd-party dependencies and assemble them for
 redistribution.
 /description

 prerequisites
 maven3.0/maven
 /prerequisites

 dependencies
 dependency
 groupIdasm/groupId
 artifactIdasm-commons/**artifactId
 version3.1/version
 /dependency
 dependency
 groupIdasm/groupId
 artifactIdasm/artifactId
 version3.1/version
 /dependency
 !-- ... --
 /dependencies

 build
 defaultGoalpackage/**defaultGoal
 plugins
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-clean-**plugin/artifactId
 version2.4.1/version
 /plugin
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-deploy-**plugin/artifactId
 version2.7/version
 /plugin
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-install-**plugin/artifactId
 version2.3.1/version
 /plugin
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-site-plugin**/artifactId
 version3.0/version
 /plugin
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-assembly-**plugin/artifactId
 version2.4/version
 executions
 execution
 idassemble/id
 phasepackage/phase
 goalsgoalsingle/goal/**goals
 configuration
 appendAssemblyIdfalse/**appendAssemblyId
 descriptors
 descriptor
 extjars.xml
 /descriptor
 /descriptors
 /configuration
 /execution
 /executions
 /plugin
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-enforcer-**plugin/artifactId
 version${plugins.maven-**enforcer-plugin.version}/**version
 executions
 execution
 idenforce-plugin-versions/**id
 goals
 goalenforce/goal
 /goals
 configuration
 rules
 requirePluginVersions
  messageBest Practice is to always
 define plugin versions!/message
 /requirePluginVersions
 /rules
 

Re: Maven 3.0.5 - Strange Interaction/Regression: maven-enforcer-plugin vs. maven-assembly-plugin

2013-07-03 Thread Wolf Geldmacher

Done: http://jira.codehaus.org/browse/MENFORCER-156

On 03.07.2013 15:27, Stephen Connolly wrote:

File the bug request against enforcer and let that move it *if* necessary
as initial evidence points to enforcer's issue


On 3 July 2013 13:40, Wolf Geldmacher wrote:


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:

project 
xmlns=http://maven.apache.**org/POM/4.0.0http://maven.apache.org/POM/4.0.0

  
xmlns:xsi=http://www.w3.org/**2001/XMLSchema-instancehttp://www.w3.org/2001/XMLSchema-instance

  
xsi:schemaLocation=http://**maven.apache.org/POM/4.0.0http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/**maven-4.0.0.xsdhttp://maven.apache.org/xsd/maven-4.0.0.xsd

 modelVersion4.0.0/**modelVersion

 properties
plugins.maven-enforcer-**plugin.version1.3/plugins.**
maven-enforcer-plugin.version
 /properties

 groupIdch.pecunifex.maven/**groupId
 artifactIdextjars/**artifactId
 version2014.0.0-SNAPSHOT/**version
 packagingpom/packaging
 name3rd-party Jars Assembly/name
 description
 Collect all 3rd-party dependencies and assemble them for
redistribution.
 /description

 prerequisites
 maven3.0/maven
 /prerequisites

 dependencies
 dependency
 groupIdasm/groupId
 artifactIdasm-commons/**artifactId
 version3.1/version
 /dependency
 dependency
 groupIdasm/groupId
 artifactIdasm/artifactId
 version3.1/version
 /dependency
 !-- ... --
 /dependencies

 build
 defaultGoalpackage/**defaultGoal
 plugins
 plugin
groupIdorg.apache.maven.**plugins/groupId
artifactIdmaven-clean-**plugin/artifactId
 version2.4.1/version
 /plugin
 plugin
groupIdorg.apache.maven.**plugins/groupId
artifactIdmaven-deploy-**plugin/artifactId
 version2.7/version
 /plugin
 plugin
groupIdorg.apache.maven.**plugins/groupId
artifactIdmaven-install-**plugin/artifactId
 version2.3.1/version
 /plugin
 plugin
groupIdorg.apache.maven.**plugins/groupId
artifactIdmaven-site-plugin**/artifactId
 version3.0/version
 /plugin
 plugin
groupIdorg.apache.maven.**plugins/groupId
artifactIdmaven-assembly-**plugin/artifactId
 version2.4/version
 executions
 execution
 idassemble/id
 phasepackage/phase
goalsgoalsingle/goal/**goals
 configuration
appendAssemblyIdfalse/**appendAssemblyId
 descriptors
 descriptor
 extjars.xml
 /descriptor
 /descriptors
 /configuration
 /execution
 /executions
 /plugin
 plugin
groupIdorg.apache.maven.**plugins/groupId
artifactIdmaven-enforcer-**plugin/artifactId
version${plugins.maven-**enforcer-plugin.version}/**version
 executions
 execution
 idenforce-plugin-versions/**id
 goals
 goalenforce/goal
 /goals
 configuration
 rules
 requirePluginVersions
  messageBest Practice is to always
define plugin versions!/message
 /requirePluginVersions