When you run a plugin from the command line directly, it does not pick up the configuration in side an execution. You could move it outside the executions and it would work, however the enforcer is meant to be bound to a lifecycle by default. Just run mvn verify or greater and you'll see it run.
-----Original Message----- From: Aaron Kaplan [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2008 6:25 AM To: [email protected] Subject: Problem using enforcer plugin The following POM is copied from the example at http://maven.apache.org/plugins/maven-enforcer-plugin/rules/requireJavaV ersion.html . The only thing I've changed is to add the required project properties (groupId, artifactId, version, and name) in place of the [...] in the example. Running mvn enforcer:enforce on this pom results in the following error: [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] One or more required plugin parameters are invalid/missing for 'enforcer:enforce' [0] inside the definition for plugin: 'maven-enforcer-plugin'specify the following: <configuration> ... <rules>VALUE</rules> </configuration>. Is this a bug in the example or the plugin? -Aaron ---------------------- <project> <modelVersion>4.0.0</modelVersion> <groupId>foo</groupId> <artifactId>bar</artifactId> <version>1.0-SNAPSHOT</version> <name>baz</name> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <executions> <execution> <id>enforce-java</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireJavaVersion> <version>1.5.0</version> </requireJavaVersion> </rules> </configuration> </execution> </executions> </plugin> </plugins> </build> </project> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
