maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hughes (JIRA)" <j...@codehaus.org>
Subject [jira] Closed: (MENFORCER-99) Can't enforce Maven < 3.0.0-SNAPSHOT
Date Mon, 10 May 2010 05:00:14 GMT

     [ http://jira.codehaus.org/browse/MENFORCER-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrew Hughes closed MENFORCER-99.
----------------------------------

    Resolution: Not A Bug

Right you are!!! My apologies... I needed to move the <configuration> out from the <execution>
and directly under the <plugin>. Maybe the doco on the website could be altered so others
don't make the same mistake I did. :)

> Can't enforce Maven < 3.0.0-SNAPSHOT
> ------------------------------------
>
>                 Key: MENFORCER-99
>                 URL: http://jira.codehaus.org/browse/MENFORCER-99
>             Project: Maven 2.x Enforcer Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0-beta-1
>         Environment: Maven 3.0.0-SNAPSHOT
>            Reporter: Andrew Hughes
>            Assignee: Benjamin Bentmann
>
> I am trying to stop people using maven 3.0.0-SNAPSHOT. This occur's frequently because
m2eclipse's embedded version is 3.0.0-SNAPSHOT.
> Configuration:
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-enforcer-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<id>enforce-versions</id>
> 			<goals>
> 				<goal>enforce</goal>
> 			</goals>
> 			<configuration>
> 				<rules>
> 					<requireMavenVersion>
> 						<!-- Allow Maven 2.2.1 but not 3 -->
> 						<version>[2.2.1,2.9.9]</version>
> 					</requireMavenVersion>
> 					<requireJavaVersion>
> 						<!-- Use the latest JDK, 1.6.0-18+ -->
> 						<version>[1.6.0-18,)</version>
> 					</requireJavaVersion>
> 				</rules>
> 			</configuration>
> 		</execution>
> 	</executions>
> </plugin>
> {noformat}
> The problem is that the enforcerplugin doesn't seem to pickup the rules 
> {noformat}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce
(default-cli) on project cl2-parent: No rules are configured. Use the skip flag if you want
to disable execution. -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce
(default-cli) on project cl2-parent: No rules are configured. Use the skip flag if you want
to disable execution.
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:570)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:317)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
> 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:423)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:158)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:123)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.MojoExecutionException: No rules are configured. Use
the skip flag if you want to disable execution.
> 	at org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:225)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:562)
> 	... 14 more
> [ERROR] 
> {noformat}
> Also, this doesn't appear to be bound to any lifecycle. So it only runs with 'enforcer:enforce'
and not 'install', 'compile' e.t.c.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message