Comments inline.

Regards,

        /James


>>2009/12/9 Nord, James <jn...@nds.com>:
>> I'm having a really strange error in Maven 2.2.1 and the enforcer plugin.
>>
>> Basically it appears as though the super pom is missing version definitions 
>> for the following even though they should be present according to the web 
>> documentation (and performing a help:effective-pom shows them listed in the 
>> pluginManagement section):
>> *       maven-clean-plugin
>> *       maven-deploy-plugin
>> *       maven-install-plugin
>> *       maven-site-plugin
>>
>> Anyone any ideas what's happening?

>If I read your mail correctly then you're thinking the Enforcer plugin
>should not complain about missing versions if those versions are
>provided by the super pom.

Correct.

>But think about it, if you upgrade to a
>newer Maven version then you could get a different super pom and as
>such your build is not reproducible.

But the build is reproducible - you made an invalid assumption.  In our builds 
we record the Maven version used to do the build so if we want to reproduce it 
we use exactly the same maven version on exactly the same platform with exactly 
the same JDK.
I don't expect any maven version to give exactly the same results as a 
different version.

>You should explicitly list the versions of everything you use. Don't
>depend on the super pom to do it for you. The Enforcer plugin is just
>doing what you asked it to do.

From the documentation:
"The Super POM is Maven's default POM. All POMs extend the Super POM unless 
explicitly set"

"This rule enforces that all plugins have a version defined, either in the 
plugin or pluginManagement section of the pom or a parent pom."

The combination of the two says to me that my POM implicitly has the Super POM 
as its parent, and hence *does* have the versions defined.

My take on the Enforcer plugin is to make builds reproducible given the same 
environment at a latter date.  Changing Maven version (or JDK!) changes the 
environment and is out of scope IMHO.  This is especially the case if you 
explicitly limit the version of Maven and JDK (and OS!) used in the enforcer 
rules, and setting these does make sure your build is reproducible.





**************************************************************************************
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes. To protect the environment please do not 
print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes.
To protect the environment please do not print this e-mail unless necessary.

An NDS Group Limited company. www.nds.com

Reply via email to