You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by deckrider <de...@gmail.com> on 2008/02/28 18:51:07 UTC

enforce versions for plugins

I see that the maven release plugin enforces versioned dependencies.
I like this, since it makes the build reproduce-able.  However, I
think I want the same enforcement for all plugins referenced within
pom.xml should depend on exact versions.  Is this possible?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: enforce versions for plugins

Posted by Heinrich Nirschl <he...@gmail.com>.
However, the version of the enforcer plugin supporting this goal is
not yet released ...

- Henry

On Thu, Feb 28, 2008 at 7:04 PM,  <ni...@planet.nl> wrote:
> This is possible with the enforcer plugin [1] and esspecially the requirePluginVersion rule [2].
>
>  Hth,
>
>  Nick Stolwijk
>
>  [1] http://maven.apache.org/plugins/maven-enforcer-plugin/
>  [2] http://maven.apache.org/plugins/maven-enforcer-plugin/rules/requirePluginVersions.html
>
>
>
>
>  -----Original Message-----
>  From: deckrider [mailto:deckrider@gmail.com]
>  Sent: Thu 2/28/2008 18:51
>  To: Maven Users List
>  Subject: enforce versions for plugins
>
>  I see that the maven release plugin enforces versioned dependencies.
>  I like this, since it makes the build reproduce-able.  However, I
>  think I want the same enforcement for all plugins referenced within
>  pom.xml should depend on exact versions.  Is this possible?
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  For additional commands, e-mail: users-help@maven.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: enforce versions for plugins

Posted by Martin Höller <ma...@xss.co.at>.
On Thursday 28 February 2008 wrote deckrider:
> Cool, except when I put the example in my corporate pom:
>
> http://maven.apache.org/plugins/maven-enforcer-plugin/rules/requirePlugin
>Versions.html
>
> I get the following error:
>
> [INFO] Failed to configure plugin parameters for:
> org.apache.maven.plugins:maven-enforcer-plugin:1.0-alpha-3

You have to use the latest snapshot version for this to work.

hth,
- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: enforce versions for plugins

Posted by deckrider <de...@gmail.com>.
Cool, except when I put the example in my corporate pom:

http://maven.apache.org/plugins/maven-enforcer-plugin/rules/requirePluginVersions.html

I get the following error:

[INFO] Failed to configure plugin parameters for:
org.apache.maven.plugins:maven-enforcer-plugin:1.0-alpha-3

Cause: Class 'org.apache.maven.shared.enforcer.rule.api.EnforcerRule'
cannot be instantiated

So when I re-run with more debugging, I get this:

Cause: Class 'org.apache.maven.shared.enforcer.rule.api.EnforcerRule'
cannot be instantiated
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error
configuring: org.apache.maven.plugins:maven-enforcer-plugin. Reason:
Unable to parse the created DOM for plugin configuration
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:568)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.PluginConfigurationException: Error
configuring: org.apache.maven.plugins:maven-enforcer-plugin. Reason:
Unable to parse the created DOM for plugin configuration
        at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1157)
        at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:618)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:425)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        ... 16 more
Caused by: org.codehaus.plexus.component.configurator.ComponentConfigurationException:
Class 'org.apache.maven.shared.enforcer.rule.api.EnforcerRule' cannot
be instantiated
        at org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.instantiateObject(AbstractConfigurationConverter.java:121)
        at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.fromConfiguration(ObjectWithFieldsConverter.java:88)
        at org.codehaus.plexus.component.configurator.converters.composite.ArrayConverter.fromConfiguration(ArrayConverter.java:135)
        at org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:207)
        at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137)
       at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
        at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1151)
        ... 19 more
Caused by: java.lang.InstantiationException:
org.apache.maven.shared.enforcer.rule.api.EnforcerRule
        at java.lang.Class.newInstance0(Class.java:335)
        at java.lang.Class.newInstance(Class.java:303)
        at org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.instantiateObject(AbstractConfigurationConverter.java:111)
        ... 25 more


On Thu, Feb 28, 2008 at 11:04 AM,  <ni...@planet.nl> wrote:
> This is possible with the enforcer plugin [1] and esspecially the requirePluginVersion rule [2].
>
>  Hth,
>
>  Nick Stolwijk
>
>  [1] http://maven.apache.org/plugins/maven-enforcer-plugin/
>  [2] http://maven.apache.org/plugins/maven-enforcer-plugin/rules/requirePluginVersions.html
>
>
>
>
>  -----Original Message-----
>  From: deckrider [mailto:deckrider@gmail.com]
>  Sent: Thu 2/28/2008 18:51
>  To: Maven Users List
>  Subject: enforce versions for plugins
>
>  I see that the maven release plugin enforces versioned dependencies.
>  I like this, since it makes the build reproduce-able.  However, I
>  think I want the same enforcement for all plugins referenced within
>  pom.xml should depend on exact versions.  Is this possible?
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  For additional commands, e-mail: users-help@maven.apache.org
>
>
>



-- 
ASCII ribbon campaign:
()  against HTML email
/\  against Microsoft attachments
    Information:  http://www.expita.com/nomime.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: enforce versions for plugins

Posted by ni...@planet.nl.
This is possible with the enforcer plugin [1] and esspecially the requirePluginVersion rule [2].

Hth,

Nick Stolwijk

[1] http://maven.apache.org/plugins/maven-enforcer-plugin/
[2] http://maven.apache.org/plugins/maven-enforcer-plugin/rules/requirePluginVersions.html


-----Original Message-----
From: deckrider [mailto:deckrider@gmail.com]
Sent: Thu 2/28/2008 18:51
To: Maven Users List
Subject: enforce versions for plugins
 
I see that the maven release plugin enforces versioned dependencies.
I like this, since it makes the build reproduce-able.  However, I
think I want the same enforcement for all plugins referenced within
pom.xml should depend on exact versions.  Is this possible?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org