Hi all, 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? > mvn validate [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building example [INFO] task-segment: [validate] [INFO] ------------------------------------------------------------------------ [INFO] [enforcer:enforce {execution: enforce-rules}] [INFO] artifact org.apache.maven.plugins:maven-site-plugin: checking for updates from central [WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequirePluginVersions failed with message: Some plugins are missing valid versions:(LATEST RELEASE SNAPSHOT are not allowed ) org.apache.maven.plugins:maven-clean-plugin. The version currently in use is 2.3 org.apache.maven.plugins:maven-deploy-plugin. The version currently in use is 2.4 org.apache.maven.plugins:maven-install-plugin. The version currently in use is 2.3 org.apache.maven.plugins:maven-site-plugin. The version currently in use is 2.0.1 Found plugins without fixed release version defined. Build is not reproducible. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4 seconds [INFO] Finished at: Wed Dec 09 18:09:15 GMT 2009 [INFO] Final Memory: 6M/254M [INFO] ------------------------------------------------------------------------ >mvn --version Apache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100) Java version: 1.6.0_16 Java home: C:\Java\jdk1.6.0_16\jre Default locale: en_GB, platform encoding: Cp1252 OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows" -- begin pom.xml - <?xml version="1.0" encoding="UTF-8"?> <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>example</groupId> <artifactId>myPom</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <name>example</name> <build> <plugins> <plugin> <artifactId>maven-enforcer-plugin</artifactId> <version>1.0-beta-1</version> <executions> <execution> <id>enforce-rules</id> <goals> <goal>enforce</goal> </goals> <phase>validate</phase> <configuration> <rules> <requireMavenVersion> <version>2.2.1</version> </requireMavenVersion> <requirePluginVersions> <message>Found plugins without fixed release version defined. Build is not reproducible.</message> </requirePluginVersions> </rules> </configuration> </execution> </executions> </plugin> </plugins> </build> </project> -- end pom.xml - ________________________________ ************************************************************************************** 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