I don't know this plugin/rule well, but looking at your output, could it relate to the underscore versus hyphen in the detected versus normalized JDK version string? Maybe try a hyphen in your version rule.
Brett On 8/19/10, EJ Ciramella <ecirame...@casenetinc.com> wrote: > Mvn version output: > > Apache Maven 3.0-beta-2 (r983206; 2010-08-07 07:00:51-0400) > Java version: 1.5.0_18 > Java home: C:\Program Files (x86)\Java\jdk1.5.0_18\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows xp" version: "5.2" arch: "x86" Family: "windows" > 'cmd' is not recognized as an internal or external command, > operable program or batch file. > > Plugin Config: > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-enforcer-plugin</artifactId> > <version>1.0-beta-1</version> > <executions> > <execution> > <id>enforce-versions</id> > <goals> > <goal>enforce</goal> > </goals> > <configuration> > <rules> > <requireJavaVersion> > <version>[1.5.0_18,)</version> > <message>[ERROR] The currently supported version of java is > 1.5.0_18 or higher</message> > </requireJavaVersion> > </rules> > </configuration> > </execution> > </executions> > </plugin> > > Stacktraces: > > [DEBUG] > ======================================================================= > [INFO] > [INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-versions) @ > <foo> --- > [DEBUG] Created new class realm > plugin>org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1 > [DEBUG] Created new class realm maven.api > [DEBUG] Populating class realm > plugin>org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1 > [DEBUG] Included: > org.apache.maven.plugins:maven-enforcer-plugin:maven-plugin:1.0-beta-1 > [DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:1.5.8 > [DEBUG] Included: > org.apache.maven.reporting:maven-reporting-api:jar:2.0.9 > [DEBUG] Included: org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-10 > [DEBUG] Included: commons-cli:commons-cli:jar:1.0 > [DEBUG] Included: > org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4 > [DEBUG] Included: commons-lang:commons-lang:jar:2.3 > [DEBUG] Included: org.apache.maven.enforcer:enforcer-api:jar:1.0-beta-1 > [DEBUG] Included: org.apache.maven.enforcer:enforcer-rules:jar:1.0-beta-1 > [DEBUG] Included: org.beanshell:bsh:jar:2.0b4 > [DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0.9 > [DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0.9 > [DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0.9 > [DEBUG] Excluded: org.apache.maven:maven-settings:jar:2.0.9 > [DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0.9 > [DEBUG] Excluded: > org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 > [DEBUG] Excluded: classworlds:classworlds:jar:1.1 > [DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0.9 > [DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.9 > [DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.9 > [DEBUG] Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.9 > [DEBUG] Excluded: org.apache.maven:maven-core:jar:2.0.9 > [DEBUG] Excluded: > org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9 > [DEBUG] Excluded: org.apache.maven:maven-error-diagnostics:jar:2.0.9 > [DEBUG] Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.0.9 > [DEBUG] Excluded: org.apache.maven:maven-monitor:jar:2.0.9 > [DEBUG] Configuring mojo > org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce from > plugin realm ClassRealm[plugin>org > .apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1, parent: > ClassRealm[maven.api, parent: null]] > [DEBUG] Configuring mojo > 'org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce' with > basic configurator --> > [DEBUG] (s) fail = true > [DEBUG] (s) failFast = false > [DEBUG] (f) ignoreCache = false > [DEBUG] (s) project = MavenProject: <foo> @ <foo> > [DEBUG] (s) version = [1.5.0_18,) > [DEBUG] (f) message = [ERROR] The currently supported version of java is > 1.5.0_18 or higher > [DEBUG] (s) rules = > [org.apache.maven.plugins.enforcer.requirejavavers...@d72200] > [DEBUG] (s) session = org.apache.maven.execution.mavensess...@1a80aea > [DEBUG] (s) skip = false > [DEBUG] -- end configuration -- > [DEBUG] Executing rule: > org.apache.maven.plugins.enforcer.RequireJavaVersion > [DEBUG] Rule org.apache.maven.plugins.enforcer.RequireJavaVersion is > cacheable. > [DEBUG] Detected Java String: 1.5.0_18 > [DEBUG] Normalized Java String: 1.5.0-18 > [DEBUG] Parsed Version: Major: 1 Minor: 5 Incremental: 0 Build: 18 > Qualifier: null > [DEBUG] Adding failure due to exception > org.apache.maven.enforcer.rule.api.EnforcerRuleException: [ERROR] The > currently supported version of java is 1.5.0_18 or higher > at > org.apache.maven.plugins.enforcer.AbstractVersionEnforcer.enforceVersion(AbstractVersionEnforcer.java:101) > at > org.apache.maven.plugins.enforcer.RequireJavaVersion.execute(RequireJavaVersion.java:65) > at > org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:185) > at > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:144) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:87) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:79) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:86) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:58) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:252) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:100) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:443) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:166) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:130) > 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:585) > 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) > [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion > failed with message: > [ERROR] The currently supported version of java is 1.5.0_18 or higher > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 0.953s > [INFO] Finished at: Wed Aug 18 10:05:56 EDT 2010 > [INFO] Final Memory: 3M/508M > [INFO] > ------------------------------------------------------------------------ > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce > (enforce-versions) on project <foo>: Some Enforcer rules have failed. Look > above for specific messages explaining why the rule failed. -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.maven.plugins:maven-enforcer-plugin:1.0- > beta-1:enforce (enforce-versions) on project <foo>: Some Enforcer rules have > failed. Look above for specific messages exp > laining why the rule failed. > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:152) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:87) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:79) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:86) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:58) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:252) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:100) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:443) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:166) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:130) > 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:585) > 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: Some Enforcer > rules have failed. Look above for specific messages expla > ining why the rule failed. > at > org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:218) > at > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:144) > ... 19 more > [ERROR] > [ERROR] > [ERROR] For more information about the errors and possible solutions, please > read the following articles: > [ERROR] [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException > 'cmd' is not recognized as an internal or external command, > > -----Original Message----- > From: bmat...@gmail.com [mailto:bmat...@gmail.com] On Behalf Of Baptiste > MATHUS > Sent: Wednesday, August 18, 2010 8:56 AM > To: Maven Users List > Subject: Re: maven 3 and the enforcer plugin > > Le 16 août 2010 19:21:14 UTC+2, EJ Ciramella <ecirame...@casenetinc.com> a > écrit : > >> Hello list - >> >> I've noticed during upgrade testing that maven 3 and the enforcer plugin >> (1.0-beta-1) is starting to fail a jdk enforcement test. >> >> I've set it up to accept 1.5.0_18 and beyond (nothing earlier) but now >> it's >> failing even though I'm running that exact jdk. >> > > Did you try running mvn -X or -e ? This will print stack trace and provide > you with more informations. Please post this output here. > > Cheers > -- > Baptiste <Batmat> MATHUS - http://batmat.net > Sauvez un arbre, > Mangez un castor ! > > CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within > including any attachments is only for the recipient(s) to which it is > intended and may contain confidential and/or privileged material. Any > review, retransmission, dissemination or other use of; or taking of any > action in reliance upon this information by persons or entities other than > the intended recipient is prohibited. If you received this in error, please > send the e-mail back by replying to the sender and permanently delete the > entire message and its attachments from all computers and network systems > involved in its receipt. > -- Sent from my mobile device --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org