You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nick Stolwijk <ni...@gmail.com> on 2008/12/12 15:28:19 UTC

Enforce plugin versions and reporting plugins

I've been trying to enforce my plugin versions with the enforcer
plugin and this works fine for plugins used during the build, but I am
a bit confused about the plugins used by the reporting section.

A few cases:

1. Declare reporting plugin in reporting section without a version
     -Enforcer plugins fails on plugin without a version
     - help:effective-pom doesn't show a version

2. Declare reporting plugin in reporting section with a version
    - Enforcer plugin doesn't complain.
    - help:effective-pom shows the version

3. Declare reporting plugin in reporting section without a version and
declare a build/pluginmanagement/plugin with a version
    - Enforcer plugin doesn't complain.
    - help:effective-pom doesn't show a version

Especially use case 3 seems a bit off.

I know of the issues with missing reporting/pluginmanagment tag, but
can this be solved in the requirepluginversions rule?

With regards,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl

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


RE: Enforce plugin versions and reporting plugins

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
This was the analysis I did that the time: http://www.nabble.com/releasing-the-enforcer-tt18419873.html#a18419873

-----Original Message-----
From: Nick Stolwijk [mailto:nick.stolwijk@gmail.com] 
Sent: Saturday, December 13, 2008 11:35 AM
To: Maven Users List
Subject: Re: Enforce plugin versions and reporting plugins

mvn help:effective-pom shows that there is no version declared. So,
somehow, it should be possible to check this. Is it possible to parse
the output of help:effective-pom to create an extra rule to check on
the reporting plugins?

With regards,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Fri, Dec 12, 2008 at 9:53 PM, Brian E. Fox <br...@reply.infinity.nu> wrote:
> The reporting plugin / plugin interaction is a known issue. It's not easy to solve in the current 2.0.x code and I chose to release it anyway pending a more thorough fix down the road. Use case 3 is the only time it should show up.
>
> The problem is that when you run site lifecycle phases, the reporting plugins are injected into the model in the plugin section, so there's no way for me to tell them apart. There's an open jira for this.
>
> -----Original Message-----
> From: Nick Stolwijk [mailto:nick.stolwijk@gmail.com]
> Sent: Friday, December 12, 2008 9:28 AM
> To: Maven Users List
> Subject: Enforce plugin versions and reporting plugins
>
> I've been trying to enforce my plugin versions with the enforcer
> plugin and this works fine for plugins used during the build, but I am
> a bit confused about the plugins used by the reporting section.
>
> A few cases:
>
> 1. Declare reporting plugin in reporting section without a version
>     -Enforcer plugins fails on plugin without a version
>     - help:effective-pom doesn't show a version
>
> 2. Declare reporting plugin in reporting section with a version
>    - Enforcer plugin doesn't complain.
>    - help:effective-pom shows the version
>
> 3. Declare reporting plugin in reporting section without a version and
> declare a build/pluginmanagement/plugin with a version
>    - Enforcer plugin doesn't complain.
>    - help:effective-pom doesn't show a version
>
> Especially use case 3 seems a bit off.
>
> I know of the issues with missing reporting/pluginmanagment tag, but
> can this be solved in the requirepluginversions rule?
>
> With regards,
>
> Nick Stolwijk
> ~Java Developer~
>
> Iprofs BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> www.iprofs.nl
>
> ---------------------------------------------------------------------
> 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 plugin versions and reporting plugins

Posted by Nick Stolwijk <ni...@gmail.com>.
mvn help:effective-pom shows that there is no version declared. So,
somehow, it should be possible to check this. Is it possible to parse
the output of help:effective-pom to create an extra rule to check on
the reporting plugins?

With regards,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Fri, Dec 12, 2008 at 9:53 PM, Brian E. Fox <br...@reply.infinity.nu> wrote:
> The reporting plugin / plugin interaction is a known issue. It's not easy to solve in the current 2.0.x code and I chose to release it anyway pending a more thorough fix down the road. Use case 3 is the only time it should show up.
>
> The problem is that when you run site lifecycle phases, the reporting plugins are injected into the model in the plugin section, so there's no way for me to tell them apart. There's an open jira for this.
>
> -----Original Message-----
> From: Nick Stolwijk [mailto:nick.stolwijk@gmail.com]
> Sent: Friday, December 12, 2008 9:28 AM
> To: Maven Users List
> Subject: Enforce plugin versions and reporting plugins
>
> I've been trying to enforce my plugin versions with the enforcer
> plugin and this works fine for plugins used during the build, but I am
> a bit confused about the plugins used by the reporting section.
>
> A few cases:
>
> 1. Declare reporting plugin in reporting section without a version
>     -Enforcer plugins fails on plugin without a version
>     - help:effective-pom doesn't show a version
>
> 2. Declare reporting plugin in reporting section with a version
>    - Enforcer plugin doesn't complain.
>    - help:effective-pom shows the version
>
> 3. Declare reporting plugin in reporting section without a version and
> declare a build/pluginmanagement/plugin with a version
>    - Enforcer plugin doesn't complain.
>    - help:effective-pom doesn't show a version
>
> Especially use case 3 seems a bit off.
>
> I know of the issues with missing reporting/pluginmanagment tag, but
> can this be solved in the requirepluginversions rule?
>
> With regards,
>
> Nick Stolwijk
> ~Java Developer~
>
> Iprofs BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> www.iprofs.nl
>
> ---------------------------------------------------------------------
> 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 plugin versions and reporting plugins

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
The reporting plugin / plugin interaction is a known issue. It's not easy to solve in the current 2.0.x code and I chose to release it anyway pending a more thorough fix down the road. Use case 3 is the only time it should show up.

The problem is that when you run site lifecycle phases, the reporting plugins are injected into the model in the plugin section, so there's no way for me to tell them apart. There's an open jira for this.

-----Original Message-----
From: Nick Stolwijk [mailto:nick.stolwijk@gmail.com] 
Sent: Friday, December 12, 2008 9:28 AM
To: Maven Users List
Subject: Enforce plugin versions and reporting plugins

I've been trying to enforce my plugin versions with the enforcer
plugin and this works fine for plugins used during the build, but I am
a bit confused about the plugins used by the reporting section.

A few cases:

1. Declare reporting plugin in reporting section without a version
     -Enforcer plugins fails on plugin without a version
     - help:effective-pom doesn't show a version

2. Declare reporting plugin in reporting section with a version
    - Enforcer plugin doesn't complain.
    - help:effective-pom shows the version

3. Declare reporting plugin in reporting section without a version and
declare a build/pluginmanagement/plugin with a version
    - Enforcer plugin doesn't complain.
    - help:effective-pom doesn't show a version

Especially use case 3 seems a bit off.

I know of the issues with missing reporting/pluginmanagment tag, but
can this be solved in the requirepluginversions rule?

With regards,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl

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


Re: Enforce plugin versions and reporting plugins

Posted by Jörg Schaible <jo...@gmx.de>.
Baptiste MATHUS wrote at Freitag, 12. Dezember 2008 16:38:

>  I'm not sure what you want to achieve. You want to enforce used plugin
> versions without specifying them? If so, then I don't think
> enforcer-plugin can do that. It's just here to check what was specified,
> not to modify the model to put a version.
> 
> Which version of maven are you using? The core plugin should at least
> display the inherited version number (beginning with maven 2.0.9 where the
> super-pom fixed the plugin versions).
> 
> I might be wrong, but globally specifying is not the responsability of the
> enforcer plugin. Enforcer will just check what you ask it to. Global
> specification is to be put in dependency/pluginManagement.

And just to add: the report section does not inherit from the
pluginManagement - unfortunately.

- Jörg


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


Re: Enforce plugin versions and reporting plugins

Posted by Baptiste MATHUS <ml...@batmat.net>.
 I'm not sure what you want to achieve. You want to enforce used plugin
versions without specifying them? If so, then I don't think enforcer-plugin
can do that. It's just here to check what was specified, not to modify the
model to put a version.

Which version of maven are you using? The core plugin should at least
display the inherited version number (beginning with maven 2.0.9 where the
super-pom fixed the plugin versions).

I might be wrong, but globally specifying is not the responsability of the
enforcer plugin. Enforcer will just check what you ask it to. Global
specification is to be put in dependency/pluginManagement.

Cheers.

2008/12/12 Nick Stolwijk <ni...@gmail.com>

> I've been trying to enforce my plugin versions with the enforcer
> plugin and this works fine for plugins used during the build, but I am
> a bit confused about the plugins used by the reporting section.
>
> A few cases:
>
> 1. Declare reporting plugin in reporting section without a version
>     -Enforcer plugins fails on plugin without a version
>     - help:effective-pom doesn't show a version
>

> 2. Declare reporting plugin in reporting section with a version
>    - Enforcer plugin doesn't complain.
>    - help:effective-pom shows the version
>
> 3. Declare reporting plugin in reporting section without a version and
> declare a build/pluginmanagement/plugin with a version
>    - Enforcer plugin doesn't complain.
>    - help:effective-pom doesn't show a version
>
> Especially use case 3 seems a bit off.
>
> I know of the issues with missing reporting/pluginmanagment tag, but
> can this be solved in the requirepluginversions rule?
>
> With regards,
>
> Nick Stolwijk
> ~Java Developer~
>
>


-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

Re: Enforce plugin versions and reporting plugins

Posted by Heinrich Nirschl <he...@gmail.com>.
On Fri, Dec 12, 2008 at 7:22 PM, Wendy Smoak <ws...@gmail.com> wrote:
> On Fri, Dec 12, 2008 at 7:28 AM, Nick Stolwijk <ni...@gmail.com> wrote:
>> 3. Declare reporting plugin in reporting section without a version and
>> declare a build/pluginmanagement/plugin with a version
>>    - Enforcer plugin doesn't complain.
>>    - help:effective-pom doesn't show a version
>>
>> Especially use case 3 seems a bit off.
>
> As Jörg mentioned, (and you discovered,) pluginManagement does not
> apply to reporting plugins.
>
> There are a couple of related issues in JIRA you might want to watch/vote for:
>
> http://jira.codehaus.org/browse/MNG-2578 Make it possible to set
> default versions for reporting-plugins (i.e. plugins under
> <reporting>)
>
> http://jira.codehaus.org/browse/MNG-1931 Add a reportingManagement section

So the enforcer plugin should complain in this case, shouldn't it?

- Henry

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


Re: Enforce plugin versions and reporting plugins

Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Dec 12, 2008 at 7:28 AM, Nick Stolwijk <ni...@gmail.com> wrote:
> 3. Declare reporting plugin in reporting section without a version and
> declare a build/pluginmanagement/plugin with a version
>    - Enforcer plugin doesn't complain.
>    - help:effective-pom doesn't show a version
>
> Especially use case 3 seems a bit off.

As Jörg mentioned, (and you discovered,) pluginManagement does not
apply to reporting plugins.

There are a couple of related issues in JIRA you might want to watch/vote for:

http://jira.codehaus.org/browse/MNG-2578 Make it possible to set
default versions for reporting-plugins (i.e. plugins under
<reporting>)

http://jira.codehaus.org/browse/MNG-1931 Add a reportingManagement section

-- 
Wendy

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