You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Karl Heinz Marbaise <kh...@gmx.de> on 2014/02/12 21:07:28 UTC
Maven Issue - pluginManagement - build Area Plugin
Hi,
i have a question. The following situation. Pom file which uses the
following parent:
<parent>
<groupId>org.codehaus</groupId>
<artifactId>codehaus-parent</artifactId>
<version>4</version>
</parent>
<prerequisites>
<maven>${mavenVersion}</maven>
</prerequisites>
and the following part in my pom file:
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
... The rule does not matter..
So if i call (Maven 2.2.1)
mvn clean package I got the following error:
[INFO] [clean:clean {execution: default-clean}]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to configure plugin parameters for:
org.apache.maven.plugins:maven-enforcer-plugin:1.0
Cause: Class 'org.apache.maven.enforcer.rule.api.EnforcerRule' cannot be
instantiated
So if i call with Maven 3.0.5:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce
(enforce-maven) on project test-enforcer: Unable to parse configuration
of mojo org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce for
parameter requireSameVersions: Abstract class or interface
'org.apache.maven.enforcer.rule.api.EnforcerRule' cannot be instantiated
-> [Help 1]
Maven 3.1.X and Maven 3.2.X tested as well...
So this looks to me that the pluginManagement does not overwrite the
version 1.0 which is defined in the codehaus-parent. To be honest the
codehaus-parent does not define it via pluginManagement it just uses the
following:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
<message>Maven 2.1.0 and 2.2.0
produce incorrect GPG signatures and checksums respectively.</message>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
First the codehaus-parent seemed to be wrong...so i can't overwrite the
version of the plugin by using a pluginManagement block in inherited
project which forces me to define the version explicitly in my pom in
the build block to get that working like this:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
<executions>
WDYT ? Bug ? Right behaviour ?
Kind regards
Karl-Heinz Marbaise
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Maven Issue - pluginManagement - build Area Plugin
Posted by Anders Hammar <an...@hammar.net>.
Right. It seems no one knows where the source is.
I think this is better to discuss in the JIRA ticket. It's not for this
list.
I'm sure that e.g. the Mojo team could take responsibility of
codehaus-parent. Just need Ben to set up a repo.
/Anders
On Fri, Feb 14, 2014 at 9:09 AM, Baptiste Mathus <ml...@batmat.net> wrote:
> Seems like this super pom is versioned at github under the sonatype
> organization (?).
>
> Cf. scm tag in
>
> http://repo1.maven.org/maven2/org/codehaus/codehaus-parent/4/codehaus-parent-4.pom
> But https://github.com/sonatype/codehaus-parent gives a 404...
>
> Anyone?
>
>
>
> 2014-02-14 9:01 GMT+01:00 Karl Heinz Marbaise <kh...@gmx.de>:
>
> > Hi Anders,
> >
> >
> > > I reported this Codehaus parent issue a long time ago (HAUS-2245 [1]).
> >
> > Good to know...
> >
> >
> > Unfortunately the codehaus-parent seems to be in a unmaintained state.
> >>
> >
> > Who is responsible for the codehaus-parent ? Can we (or i) take the issue
> > and fix it ?
> >
> >
> >
> >> /Anders
> >>
> >> [1] http://jira.codehaus.org/i#browse/HAUS-2245
> >>
> >>
> >> On Wed, Feb 12, 2014 at 9:07 PM, Karl Heinz Marbaise <khmarbaise@gmx.de
> >> >wrote:
> >>
> >> Hi,
> >>> i have a question. The following situation. Pom file which uses the
> >>> following parent:
> >>>
> >>> <parent>
> >>> <groupId>org.codehaus</groupId>
> >>> <artifactId>codehaus-parent</artifactId>
> >>> <version>4</version>
> >>> </parent>
> >>>
> >>> <prerequisites>
> >>> <maven>${mavenVersion}</maven>
> >>> </prerequisites>
> >>>
> >>> and the following part in my pom file:
> >>>
> >>> <build>
> >>> <pluginManagement>
> >>> <plugins>
> >>> <plugin>
> >>> <groupId>org.apache.maven.plugins</groupId>
> >>> <artifactId>maven-enforcer-plugin</artifactId>
> >>> <version>1.3.1</version>
> >>> </plugin>
> >>> </plugins>
> >>> </pluginManagement>
> >>> <plugins>
> >>> <plugin>
> >>> <groupId>org.apache.maven.plugins</groupId>
> >>> <artifactId>maven-enforcer-plugin</artifactId>
> >>> <executions>
> >>> <execution>
> >>> <id>enforce-maven</id>
> >>> <goals>
> >>> ... The rule does not matter..
> >>>
> >>>
> >>> So if i call (Maven 2.2.1)
> >>>
> >>> mvn clean package I got the following error:
> >>>
> >>> [INFO] [clean:clean {execution: default-clean}]
> >>> [INFO] ------------------------------------------------------------
> >>> ------------
> >>> [ERROR] BUILD ERROR
> >>> [INFO] ------------------------------------------------------------
> >>> ------------
> >>> [INFO] Failed to configure plugin parameters for:
> >>> org.apache.maven.plugins:
> >>> maven-enforcer-plugin:1.0
> >>>
> >>> Cause: Class 'org.apache.maven.enforcer.rule.api.EnforcerRule' cannot
> be
> >>> instantiated
> >>>
> >>> So if i call with Maven 3.0.5:
> >>>
> >>> [ERROR] Failed to execute goal org.apache.maven.plugins:
> >>> maven-enforcer-plugin:1.0:enforce (enforce-maven) on project
> >>> test-enforcer: Unable to parse configuration of mojo
> >>> org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce for
> parameter
> >>> requireSameVersions: Abstract class or interface
> >>> 'org.apache.maven.enforcer.rule.api.EnforcerRule'
> >>> cannot be instantiated -> [Help 1]
> >>>
> >>> Maven 3.1.X and Maven 3.2.X tested as well...
> >>>
> >>> So this looks to me that the pluginManagement does not overwrite the
> >>> version 1.0 which is defined in the codehaus-parent. To be honest the
> >>> codehaus-parent does not define it via pluginManagement it just uses
> the
> >>> following:
> >>>
> >>> <build>
> >>> <plugins>
> >>> <plugin>
> >>> <groupId>org.apache.maven.plugins</groupId>
> >>> <artifactId>maven-enforcer-plugin</artifactId>
> >>> <version>1.0</version>
> >>> <executions>
> >>> <execution>
> >>> <id>enforce-maven</id>
> >>> <goals>
> >>> <goal>enforce</goal>
> >>> </goals>
> >>> <configuration>
> >>> <rules>
> >>> <requireMavenVersion>
> >>>
> >>> <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
> >>> <message>Maven 2.1.0 and 2.2.0
> >>> produce
> >>> incorrect GPG signatures and checksums respectively.</message>
> >>> </requireMavenVersion>
> >>> </rules>
> >>> </configuration>
> >>> </execution>
> >>> </executions>
> >>> </plugin>
> >>> </plugins>
> >>>
> >>>
> >>> First the codehaus-parent seemed to be wrong...so i can't overwrite the
> >>> version of the plugin by using a pluginManagement block in inherited
> >>> project which forces me to define the version explicitly in my pom in
> the
> >>> build block to get that working like this:
> >>>
> >>> <plugins>
> >>> <plugin>
> >>> <groupId>org.apache.maven.plugins</groupId>
> >>> <artifactId>maven-enforcer-plugin</artifactId>
> >>> <version>1.3.1</version>
> >>> <executions>
> >>>
> >>>
> >>> WDYT ? Bug ? Right behaviour ?
> >>>
> >>>
> >>> Kind regards
> >>> Karl-Heinz Marbaise
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >>> For additional commands, e-mail: dev-help@maven.apache.org
> >>>
> >>>
> >>>
> >>
> >
> > Mit freundlichem Gruß
> > Karl-Heinz Marbaise
> > --
> > SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
> > Dipl.Ing.(FH) Karl-Heinz Marbaise ICQ#: 135949029
> > Hauptstrasse 177 USt.IdNr: DE191347579
> > 52146 Würselen http://www.soebes.de
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> > --
> > Baptiste <Batmat> MATHUS - http://batmat.net
> > Sauvez un arbre,
> > Mangez un castor ! nbsp;! <de...@maven.apache.org>
> >
>
Re: Maven Issue - pluginManagement - build Area Plugin
Posted by Stuart McCulloch <mc...@gmail.com>.
On 14 Feb 2014, at 08:09, Baptiste Mathus <ml...@batmat.net> wrote:
> Seems like this super pom is versioned at github under the sonatype
> organization (?).
>
> Cf. scm tag in
> http://repo1.maven.org/maven2/org/codehaus/codehaus-parent/4/codehaus-parent-4.pom
> But https://github.com/sonatype/codehaus-parent gives a 404...
>
> Anyone?
Looks like it was moved into a general OSS parent pom repo:
https://github.com/sonatype/oss-parents/blob/master/codehaus-parent/pom.xml
> 2014-02-14 9:01 GMT+01:00 Karl Heinz Marbaise <kh...@gmx.de>:
>
>> Hi Anders,
>>
>>
>>> I reported this Codehaus parent issue a long time ago (HAUS-2245 [1]).
>>
>> Good to know...
>>
>>
>> Unfortunately the codehaus-parent seems to be in a unmaintained state.
>>>
>>
>> Who is responsible for the codehaus-parent ? Can we (or i) take the issue
>> and fix it ?
>>
>>
>>
>>> /Anders
>>>
>>> [1] http://jira.codehaus.org/i#browse/HAUS-2245
>>>
>>>
>>> On Wed, Feb 12, 2014 at 9:07 PM, Karl Heinz Marbaise <khmarbaise@gmx.de
>>>> wrote:
>>>
>>> Hi,
>>>> i have a question. The following situation. Pom file which uses the
>>>> following parent:
>>>>
>>>> <parent>
>>>> <groupId>org.codehaus</groupId>
>>>> <artifactId>codehaus-parent</artifactId>
>>>> <version>4</version>
>>>> </parent>
>>>>
>>>> <prerequisites>
>>>> <maven>${mavenVersion}</maven>
>>>> </prerequisites>
>>>>
>>>> and the following part in my pom file:
>>>>
>>>> <build>
>>>> <pluginManagement>
>>>> <plugins>
>>>> <plugin>
>>>> <groupId>org.apache.maven.plugins</groupId>
>>>> <artifactId>maven-enforcer-plugin</artifactId>
>>>> <version>1.3.1</version>
>>>> </plugin>
>>>> </plugins>
>>>> </pluginManagement>
>>>> <plugins>
>>>> <plugin>
>>>> <groupId>org.apache.maven.plugins</groupId>
>>>> <artifactId>maven-enforcer-plugin</artifactId>
>>>> <executions>
>>>> <execution>
>>>> <id>enforce-maven</id>
>>>> <goals>
>>>> ... The rule does not matter..
>>>>
>>>>
>>>> So if i call (Maven 2.2.1)
>>>>
>>>> mvn clean package I got the following error:
>>>>
>>>> [INFO] [clean:clean {execution: default-clean}]
>>>> [INFO] ------------------------------------------------------------
>>>> ------------
>>>> [ERROR] BUILD ERROR
>>>> [INFO] ------------------------------------------------------------
>>>> ------------
>>>> [INFO] Failed to configure plugin parameters for:
>>>> org.apache.maven.plugins:
>>>> maven-enforcer-plugin:1.0
>>>>
>>>> Cause: Class 'org.apache.maven.enforcer.rule.api.EnforcerRule' cannot be
>>>> instantiated
>>>>
>>>> So if i call with Maven 3.0.5:
>>>>
>>>> [ERROR] Failed to execute goal org.apache.maven.plugins:
>>>> maven-enforcer-plugin:1.0:enforce (enforce-maven) on project
>>>> test-enforcer: Unable to parse configuration of mojo
>>>> org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce for parameter
>>>> requireSameVersions: Abstract class or interface
>>>> 'org.apache.maven.enforcer.rule.api.EnforcerRule'
>>>> cannot be instantiated -> [Help 1]
>>>>
>>>> Maven 3.1.X and Maven 3.2.X tested as well...
>>>>
>>>> So this looks to me that the pluginManagement does not overwrite the
>>>> version 1.0 which is defined in the codehaus-parent. To be honest the
>>>> codehaus-parent does not define it via pluginManagement it just uses the
>>>> following:
>>>>
>>>> <build>
>>>> <plugins>
>>>> <plugin>
>>>> <groupId>org.apache.maven.plugins</groupId>
>>>> <artifactId>maven-enforcer-plugin</artifactId>
>>>> <version>1.0</version>
>>>> <executions>
>>>> <execution>
>>>> <id>enforce-maven</id>
>>>> <goals>
>>>> <goal>enforce</goal>
>>>> </goals>
>>>> <configuration>
>>>> <rules>
>>>> <requireMavenVersion>
>>>>
>>>> <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
>>>> <message>Maven 2.1.0 and 2.2.0
>>>> produce
>>>> incorrect GPG signatures and checksums respectively.</message>
>>>> </requireMavenVersion>
>>>> </rules>
>>>> </configuration>
>>>> </execution>
>>>> </executions>
>>>> </plugin>
>>>> </plugins>
>>>>
>>>>
>>>> First the codehaus-parent seemed to be wrong...so i can't overwrite the
>>>> version of the plugin by using a pluginManagement block in inherited
>>>> project which forces me to define the version explicitly in my pom in the
>>>> build block to get that working like this:
>>>>
>>>> <plugins>
>>>> <plugin>
>>>> <groupId>org.apache.maven.plugins</groupId>
>>>> <artifactId>maven-enforcer-plugin</artifactId>
>>>> <version>1.3.1</version>
>>>> <executions>
>>>>
>>>>
>>>> WDYT ? Bug ? Right behaviour ?
>>>>
>>>>
>>>> Kind regards
>>>> Karl-Heinz Marbaise
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>>
>>>>
>>>>
>>>
>>
>> Mit freundlichem Gruß
>> Karl-Heinz Marbaise
>> --
>> SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
>> Dipl.Ing.(FH) Karl-Heinz Marbaise ICQ#: 135949029
>> Hauptstrasse 177 USt.IdNr: DE191347579
>> 52146 Würselen http://www.soebes.de
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>> --
>> Baptiste <Batmat> MATHUS - http://batmat.net
>> Sauvez un arbre,
>> Mangez un castor ! nbsp;! <de...@maven.apache.org>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Maven Issue - pluginManagement - build Area Plugin
Posted by Baptiste Mathus <ml...@batmat.net>.
Seems like this super pom is versioned at github under the sonatype
organization (?).
Cf. scm tag in
http://repo1.maven.org/maven2/org/codehaus/codehaus-parent/4/codehaus-parent-4.pom
But https://github.com/sonatype/codehaus-parent gives a 404...
Anyone?
2014-02-14 9:01 GMT+01:00 Karl Heinz Marbaise <kh...@gmx.de>:
> Hi Anders,
>
>
> > I reported this Codehaus parent issue a long time ago (HAUS-2245 [1]).
>
> Good to know...
>
>
> Unfortunately the codehaus-parent seems to be in a unmaintained state.
>>
>
> Who is responsible for the codehaus-parent ? Can we (or i) take the issue
> and fix it ?
>
>
>
>> /Anders
>>
>> [1] http://jira.codehaus.org/i#browse/HAUS-2245
>>
>>
>> On Wed, Feb 12, 2014 at 9:07 PM, Karl Heinz Marbaise <khmarbaise@gmx.de
>> >wrote:
>>
>> Hi,
>>> i have a question. The following situation. Pom file which uses the
>>> following parent:
>>>
>>> <parent>
>>> <groupId>org.codehaus</groupId>
>>> <artifactId>codehaus-parent</artifactId>
>>> <version>4</version>
>>> </parent>
>>>
>>> <prerequisites>
>>> <maven>${mavenVersion}</maven>
>>> </prerequisites>
>>>
>>> and the following part in my pom file:
>>>
>>> <build>
>>> <pluginManagement>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-enforcer-plugin</artifactId>
>>> <version>1.3.1</version>
>>> </plugin>
>>> </plugins>
>>> </pluginManagement>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-enforcer-plugin</artifactId>
>>> <executions>
>>> <execution>
>>> <id>enforce-maven</id>
>>> <goals>
>>> ... The rule does not matter..
>>>
>>>
>>> So if i call (Maven 2.2.1)
>>>
>>> mvn clean package I got the following error:
>>>
>>> [INFO] [clean:clean {execution: default-clean}]
>>> [INFO] ------------------------------------------------------------
>>> ------------
>>> [ERROR] BUILD ERROR
>>> [INFO] ------------------------------------------------------------
>>> ------------
>>> [INFO] Failed to configure plugin parameters for:
>>> org.apache.maven.plugins:
>>> maven-enforcer-plugin:1.0
>>>
>>> Cause: Class 'org.apache.maven.enforcer.rule.api.EnforcerRule' cannot be
>>> instantiated
>>>
>>> So if i call with Maven 3.0.5:
>>>
>>> [ERROR] Failed to execute goal org.apache.maven.plugins:
>>> maven-enforcer-plugin:1.0:enforce (enforce-maven) on project
>>> test-enforcer: Unable to parse configuration of mojo
>>> org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce for parameter
>>> requireSameVersions: Abstract class or interface
>>> 'org.apache.maven.enforcer.rule.api.EnforcerRule'
>>> cannot be instantiated -> [Help 1]
>>>
>>> Maven 3.1.X and Maven 3.2.X tested as well...
>>>
>>> So this looks to me that the pluginManagement does not overwrite the
>>> version 1.0 which is defined in the codehaus-parent. To be honest the
>>> codehaus-parent does not define it via pluginManagement it just uses the
>>> following:
>>>
>>> <build>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-enforcer-plugin</artifactId>
>>> <version>1.0</version>
>>> <executions>
>>> <execution>
>>> <id>enforce-maven</id>
>>> <goals>
>>> <goal>enforce</goal>
>>> </goals>
>>> <configuration>
>>> <rules>
>>> <requireMavenVersion>
>>>
>>> <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
>>> <message>Maven 2.1.0 and 2.2.0
>>> produce
>>> incorrect GPG signatures and checksums respectively.</message>
>>> </requireMavenVersion>
>>> </rules>
>>> </configuration>
>>> </execution>
>>> </executions>
>>> </plugin>
>>> </plugins>
>>>
>>>
>>> First the codehaus-parent seemed to be wrong...so i can't overwrite the
>>> version of the plugin by using a pluginManagement block in inherited
>>> project which forces me to define the version explicitly in my pom in the
>>> build block to get that working like this:
>>>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-enforcer-plugin</artifactId>
>>> <version>1.3.1</version>
>>> <executions>
>>>
>>>
>>> WDYT ? Bug ? Right behaviour ?
>>>
>>>
>>> Kind regards
>>> Karl-Heinz Marbaise
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>>
>>
>
> Mit freundlichem Gruß
> Karl-Heinz Marbaise
> --
> SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
> Dipl.Ing.(FH) Karl-Heinz Marbaise ICQ#: 135949029
> Hauptstrasse 177 USt.IdNr: DE191347579
> 52146 Würselen http://www.soebes.de
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor ! nbsp;! <de...@maven.apache.org>
>
Re: Maven Issue - pluginManagement - build Area Plugin
Posted by Robert Scholte <rf...@apache.org>.
Op Fri, 14 Feb 2014 09:01:14 +0100 schreef Karl Heinz Marbaise
<kh...@gmx.de>:
> Hi Anders,
>
> > I reported this Codehaus parent issue a long time ago (HAUS-2245 [1]).
>
> Good to know...
>
>> Unfortunately the codehaus-parent seems to be in a unmaintained state.
>
> Who is responsible for the codehaus-parent ? Can we (or i) take the
> issue and fix it ?
>
Juven Xu used to maintain this.
Robert
>>
>> /Anders
>>
>> [1] http://jira.codehaus.org/i#browse/HAUS-2245
>>
>>
>> On Wed, Feb 12, 2014 at 9:07 PM, Karl Heinz Marbaise
>> <kh...@gmx.de>wrote:
>>
>>> Hi,
>>> i have a question. The following situation. Pom file which uses the
>>> following parent:
>>>
>>> <parent>
>>> <groupId>org.codehaus</groupId>
>>> <artifactId>codehaus-parent</artifactId>
>>> <version>4</version>
>>> </parent>
>>>
>>> <prerequisites>
>>> <maven>${mavenVersion}</maven>
>>> </prerequisites>
>>>
>>> and the following part in my pom file:
>>>
>>> <build>
>>> <pluginManagement>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-enforcer-plugin</artifactId>
>>> <version>1.3.1</version>
>>> </plugin>
>>> </plugins>
>>> </pluginManagement>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-enforcer-plugin</artifactId>
>>> <executions>
>>> <execution>
>>> <id>enforce-maven</id>
>>> <goals>
>>> ... The rule does not matter..
>>>
>>>
>>> So if i call (Maven 2.2.1)
>>>
>>> mvn clean package I got the following error:
>>>
>>> [INFO] [clean:clean {execution: default-clean}]
>>> [INFO] ------------------------------------------------------------
>>> ------------
>>> [ERROR] BUILD ERROR
>>> [INFO] ------------------------------------------------------------
>>> ------------
>>> [INFO] Failed to configure plugin parameters for:
>>> org.apache.maven.plugins:
>>> maven-enforcer-plugin:1.0
>>>
>>> Cause: Class 'org.apache.maven.enforcer.rule.api.EnforcerRule' cannot
>>> be
>>> instantiated
>>>
>>> So if i call with Maven 3.0.5:
>>>
>>> [ERROR] Failed to execute goal org.apache.maven.plugins:
>>> maven-enforcer-plugin:1.0:enforce (enforce-maven) on project
>>> test-enforcer: Unable to parse configuration of mojo
>>> org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce for
>>> parameter
>>> requireSameVersions: Abstract class or interface
>>> 'org.apache.maven.enforcer.rule.api.EnforcerRule'
>>> cannot be instantiated -> [Help 1]
>>>
>>> Maven 3.1.X and Maven 3.2.X tested as well...
>>>
>>> So this looks to me that the pluginManagement does not overwrite the
>>> version 1.0 which is defined in the codehaus-parent. To be honest the
>>> codehaus-parent does not define it via pluginManagement it just uses
>>> the
>>> following:
>>>
>>> <build>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-enforcer-plugin</artifactId>
>>> <version>1.0</version>
>>> <executions>
>>> <execution>
>>> <id>enforce-maven</id>
>>> <goals>
>>> <goal>enforce</goal>
>>> </goals>
>>> <configuration>
>>> <rules>
>>> <requireMavenVersion>
>>>
>>> <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
>>> <message>Maven 2.1.0 and 2.2.0
>>> produce
>>> incorrect GPG signatures and checksums respectively.</message>
>>> </requireMavenVersion>
>>> </rules>
>>> </configuration>
>>> </execution>
>>> </executions>
>>> </plugin>
>>> </plugins>
>>>
>>>
>>> First the codehaus-parent seemed to be wrong...so i can't overwrite the
>>> version of the plugin by using a pluginManagement block in inherited
>>> project which forces me to define the version explicitly in my pom in
>>> the
>>> build block to get that working like this:
>>>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-enforcer-plugin</artifactId>
>>> <version>1.3.1</version>
>>> <executions>
>>>
>>>
>>> WDYT ? Bug ? Right behaviour ?
>>>
>>>
>>> Kind regards
>>> Karl-Heinz Marbaise
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>
>
>
> Mit freundlichem Gruß
> Karl-Heinz Marbaise
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Maven Issue - pluginManagement - build Area Plugin
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi Anders,
> I reported this Codehaus parent issue a long time ago (HAUS-2245 [1]).
Good to know...
> Unfortunately the codehaus-parent seems to be in a unmaintained state.
Who is responsible for the codehaus-parent ? Can we (or i) take the
issue and fix it ?
>
> /Anders
>
> [1] http://jira.codehaus.org/i#browse/HAUS-2245
>
>
> On Wed, Feb 12, 2014 at 9:07 PM, Karl Heinz Marbaise <kh...@gmx.de>wrote:
>
>> Hi,
>> i have a question. The following situation. Pom file which uses the
>> following parent:
>>
>> <parent>
>> <groupId>org.codehaus</groupId>
>> <artifactId>codehaus-parent</artifactId>
>> <version>4</version>
>> </parent>
>>
>> <prerequisites>
>> <maven>${mavenVersion}</maven>
>> </prerequisites>
>>
>> and the following part in my pom file:
>>
>> <build>
>> <pluginManagement>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-enforcer-plugin</artifactId>
>> <version>1.3.1</version>
>> </plugin>
>> </plugins>
>> </pluginManagement>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-enforcer-plugin</artifactId>
>> <executions>
>> <execution>
>> <id>enforce-maven</id>
>> <goals>
>> ... The rule does not matter..
>>
>>
>> So if i call (Maven 2.2.1)
>>
>> mvn clean package I got the following error:
>>
>> [INFO] [clean:clean {execution: default-clean}]
>> [INFO] ------------------------------------------------------------
>> ------------
>> [ERROR] BUILD ERROR
>> [INFO] ------------------------------------------------------------
>> ------------
>> [INFO] Failed to configure plugin parameters for: org.apache.maven.plugins:
>> maven-enforcer-plugin:1.0
>>
>> Cause: Class 'org.apache.maven.enforcer.rule.api.EnforcerRule' cannot be
>> instantiated
>>
>> So if i call with Maven 3.0.5:
>>
>> [ERROR] Failed to execute goal org.apache.maven.plugins:
>> maven-enforcer-plugin:1.0:enforce (enforce-maven) on project
>> test-enforcer: Unable to parse configuration of mojo
>> org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce for parameter
>> requireSameVersions: Abstract class or interface 'org.apache.maven.enforcer.rule.api.EnforcerRule'
>> cannot be instantiated -> [Help 1]
>>
>> Maven 3.1.X and Maven 3.2.X tested as well...
>>
>> So this looks to me that the pluginManagement does not overwrite the
>> version 1.0 which is defined in the codehaus-parent. To be honest the
>> codehaus-parent does not define it via pluginManagement it just uses the
>> following:
>>
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-enforcer-plugin</artifactId>
>> <version>1.0</version>
>> <executions>
>> <execution>
>> <id>enforce-maven</id>
>> <goals>
>> <goal>enforce</goal>
>> </goals>
>> <configuration>
>> <rules>
>> <requireMavenVersion>
>>
>> <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
>> <message>Maven 2.1.0 and 2.2.0 produce
>> incorrect GPG signatures and checksums respectively.</message>
>> </requireMavenVersion>
>> </rules>
>> </configuration>
>> </execution>
>> </executions>
>> </plugin>
>> </plugins>
>>
>>
>> First the codehaus-parent seemed to be wrong...so i can't overwrite the
>> version of the plugin by using a pluginManagement block in inherited
>> project which forces me to define the version explicitly in my pom in the
>> build block to get that working like this:
>>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-enforcer-plugin</artifactId>
>> <version>1.3.1</version>
>> <executions>
>>
>>
>> WDYT ? Bug ? Right behaviour ?
>>
>>
>> Kind regards
>> Karl-Heinz Marbaise
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
Mit freundlichem Gruß
Karl-Heinz Marbaise
--
SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl-Heinz Marbaise ICQ#: 135949029
Hauptstrasse 177 USt.IdNr: DE191347579
52146 Würselen http://www.soebes.de
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Maven Issue - pluginManagement - build Area Plugin
Posted by Anders Hammar <an...@hammar.net>.
I reported this Codehaus parent issue a long time ago (HAUS-2245 [1]).
Unfortunately the codehaus-parent seems to be in a unmaintained state.
/Anders
[1] http://jira.codehaus.org/i#browse/HAUS-2245
On Wed, Feb 12, 2014 at 9:07 PM, Karl Heinz Marbaise <kh...@gmx.de>wrote:
> Hi,
> i have a question. The following situation. Pom file which uses the
> following parent:
>
> <parent>
> <groupId>org.codehaus</groupId>
> <artifactId>codehaus-parent</artifactId>
> <version>4</version>
> </parent>
>
> <prerequisites>
> <maven>${mavenVersion}</maven>
> </prerequisites>
>
> and the following part in my pom file:
>
> <build>
> <pluginManagement>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-enforcer-plugin</artifactId>
> <version>1.3.1</version>
> </plugin>
> </plugins>
> </pluginManagement>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-enforcer-plugin</artifactId>
> <executions>
> <execution>
> <id>enforce-maven</id>
> <goals>
> ... The rule does not matter..
>
>
> So if i call (Maven 2.2.1)
>
> mvn clean package I got the following error:
>
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] ------------------------------------------------------------
> ------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------
> ------------
> [INFO] Failed to configure plugin parameters for: org.apache.maven.plugins:
> maven-enforcer-plugin:1.0
>
> Cause: Class 'org.apache.maven.enforcer.rule.api.EnforcerRule' cannot be
> instantiated
>
> So if i call with Maven 3.0.5:
>
> [ERROR] Failed to execute goal org.apache.maven.plugins:
> maven-enforcer-plugin:1.0:enforce (enforce-maven) on project
> test-enforcer: Unable to parse configuration of mojo
> org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce for parameter
> requireSameVersions: Abstract class or interface 'org.apache.maven.enforcer.rule.api.EnforcerRule'
> cannot be instantiated -> [Help 1]
>
> Maven 3.1.X and Maven 3.2.X tested as well...
>
> So this looks to me that the pluginManagement does not overwrite the
> version 1.0 which is defined in the codehaus-parent. To be honest the
> codehaus-parent does not define it via pluginManagement it just uses the
> following:
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-enforcer-plugin</artifactId>
> <version>1.0</version>
> <executions>
> <execution>
> <id>enforce-maven</id>
> <goals>
> <goal>enforce</goal>
> </goals>
> <configuration>
> <rules>
> <requireMavenVersion>
>
> <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
> <message>Maven 2.1.0 and 2.2.0 produce
> incorrect GPG signatures and checksums respectively.</message>
> </requireMavenVersion>
> </rules>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
>
>
> First the codehaus-parent seemed to be wrong...so i can't overwrite the
> version of the plugin by using a pluginManagement block in inherited
> project which forces me to define the version explicitly in my pom in the
> build block to get that working like this:
>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-enforcer-plugin</artifactId>
> <version>1.3.1</version>
> <executions>
>
>
> WDYT ? Bug ? Right behaviour ?
>
>
> Kind regards
> Karl-Heinz Marbaise
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
Re: Maven Issue - pluginManagement - build Area Plugin
Posted by Hervé BOUTEMY <he...@free.fr>.
Hi,
See model builder algorithm [1]
If someone codes a version in build/plugin, that mean he wants to override
value injected from build/pluginManagement
consequence is that once overridden, pluginManagement doesn't apply any more
so: defining a version in build/plugin in a global parent pom is generally a
bad idea
Regards,
Hervé
[1] http://maven.apache.org/ref/3-LATEST/maven-model-builder/
Le mercredi 12 février 2014 21:07:28 Karl Heinz Marbaise a écrit :
> Hi,
> i have a question. The following situation. Pom file which uses the
> following parent:
>
> <parent>
> <groupId>org.codehaus</groupId>
> <artifactId>codehaus-parent</artifactId>
> <version>4</version>
> </parent>
>
> <prerequisites>
> <maven>${mavenVersion}</maven>
> </prerequisites>
>
> and the following part in my pom file:
>
> <build>
> <pluginManagement>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-enforcer-plugin</artifactId>
> <version>1.3.1</version>
> </plugin>
> </plugins>
> </pluginManagement>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-enforcer-plugin</artifactId>
> <executions>
> <execution>
> <id>enforce-maven</id>
> <goals>
> ... The rule does not matter..
>
>
> So if i call (Maven 2.2.1)
>
> mvn clean package I got the following error:
>
> [INFO] [clean:clean {execution: default-clean}]
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to configure plugin parameters for:
> org.apache.maven.plugins:maven-enforcer-plugin:1.0
>
> Cause: Class 'org.apache.maven.enforcer.rule.api.EnforcerRule' cannot be
> instantiated
>
> So if i call with Maven 3.0.5:
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce
> (enforce-maven) on project test-enforcer: Unable to parse configuration
> of mojo org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce for
> parameter requireSameVersions: Abstract class or interface
> 'org.apache.maven.enforcer.rule.api.EnforcerRule' cannot be instantiated
> -> [Help 1]
>
> Maven 3.1.X and Maven 3.2.X tested as well...
>
> So this looks to me that the pluginManagement does not overwrite the
> version 1.0 which is defined in the codehaus-parent. To be honest the
> codehaus-parent does not define it via pluginManagement it just uses the
> following:
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-enforcer-plugin</artifactId>
> <version>1.0</version>
> <executions>
> <execution>
> <id>enforce-maven</id>
> <goals>
> <goal>enforce</goal>
> </goals>
> <configuration>
> <rules>
> <requireMavenVersion>
>
> <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
> <message>Maven 2.1.0 and 2.2.0
> produce incorrect GPG signatures and checksums respectively.</message>
> </requireMavenVersion>
> </rules>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
>
>
> First the codehaus-parent seemed to be wrong...so i can't overwrite the
> version of the plugin by using a pluginManagement block in inherited
> project which forces me to define the version explicitly in my pom in
> the build block to get that working like this:
>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-enforcer-plugin</artifactId>
> <version>1.3.1</version>
> <executions>
>
>
> WDYT ? Bug ? Right behaviour ?
>
>
> Kind regards
> Karl-Heinz Marbaise
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org