You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by st...@apache.org on 2011/05/21 02:21:26 UTC

svn commit: r1125604 - /maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java

Author: stephenc
Date: Sat May 21 00:21:26 2011
New Revision: 1125604

URL: http://svn.apache.org/viewvc?rev=1125604&view=rev
Log:
No point sitting on this change any longer.

Modified:
    maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java

Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java?rev=1125604&r1=1125603&r2=1125604&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java Sat May 21 00:21:26 2011
@@ -125,6 +125,16 @@ public abstract class AbstractGeneratorM
             return;
         }
 
+        if ( project.getArtifactId().toLowerCase().startsWith( "maven-" ) 
+            && project.getArtifactId().toLowerCase().endsWith( "-plugin" )
+            && !"org.apache.maven.plugin".equals( project.getGroupId() ) )
+        {
+            getLog().error( "\n\nArtifact Ids of the format maven-___-plugin are reserved for \n" 
+                                + "plugins in the Group Id org.apache.maven.plugins\n"
+                                + "Please change your artifactId to the format ___-maven-plugin\n"
+                                + "In the future this error will break the build.\n\n" );
+        }
+
         String defaultGoalPrefix = PluginDescriptor.getGoalPrefixFromArtifactId( project.getArtifactId() );
         if ( goalPrefix == null )
         {



Re: svn commit: r1125604 - /maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java

Posted by Arnaud Héritier <ah...@gmail.com>.
Well see ;)

Le 21 mai 2011 à 19:28, Anders Hammar <an...@hammar.net> a écrit :

> But the groupId of Apache Maven plugins is "org.apache.maven.plugins". The
> code checks against "org.apache.maven.plugin"...
> 
> /Anders
> 
> On Sat, May 21, 2011 at 10:26, Dennis Lundberg <de...@apache.org> wrote:
> 
>> Excellent stuff Stephen, thanks.
>> We should try to get this into a release as soon as possible.
>> 
>> On 2011-05-21 02:21, stephenc@apache.org wrote:
>>> Author: stephenc
>>> Date: Sat May 21 00:21:26 2011
>>> New Revision: 1125604
>>> 
>>> URL: http://svn.apache.org/viewvc?rev=1125604&view=rev
>>> Log:
>>> No point sitting on this change any longer.
>>> 
>>> Modified:
>>> 
>> maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
>>> 
>>> Modified:
>> maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
>>> URL:
>> http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java?rev=1125604&r1=1125603&r2=1125604&view=diff
>>> 
>> ==============================================================================
>>> ---
>> maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
>> (original)
>>> +++
>> maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
>> Sat May 21 00:21:26 2011
>>> @@ -125,6 +125,16 @@ public abstract class AbstractGeneratorM
>>>             return;
>>>         }
>>> 
>>> +        if ( project.getArtifactId().toLowerCase().startsWith( "maven-"
>> )
>>> +            && project.getArtifactId().toLowerCase().endsWith( "-plugin"
>> )
>>> +            && !"org.apache.maven.plugin".equals( project.getGroupId() )
>> )
>>> +        {
>>> +            getLog().error( "\n\nArtifact Ids of the format
>> maven-___-plugin are reserved for \n"
>>> +                                + "plugins in the Group Id
>> org.apache.maven.plugins\n"
>>> +                                + "Please change your artifactId to the
>> format ___-maven-plugin\n"
>>> +                                + "In the future this error will break
>> the build.\n\n" );
>>> +        }
>>> +
>>>         String defaultGoalPrefix =
>> PluginDescriptor.getGoalPrefixFromArtifactId( project.getArtifactId() );
>>>         if ( goalPrefix == null )
>>>         {
>>> 
>>> 
>>> 
>> 
>> 
>> --
>> Dennis Lundberg
>> 
>> ---------------------------------------------------------------------
>> 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


Re: svn commit: r1125604 - /maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java

Posted by Mark Struberg <st...@yahoo.de>.
Actually this is the recommendation since years. I'm sure this was discussed a few times in the past already. Remember, maven-jetty-plugin got renamed to jetty-maven-plugin exactly because of that.

But yes, this piece of source was pretty useless the way it got implemented...

LieGrue,
strub

--- On Sat, 5/21/11, Karl Heinz Marbaise <kh...@gmx.de> wrote:

> From: Karl Heinz Marbaise <kh...@gmx.de>
> Subject: Re: svn commit: r1125604 - /maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
> To: dev@maven.apache.org
> Date: Saturday, May 21, 2011, 5:46 PM
> Hi, just a question about that...
> 
> does this mean that in the future a Maven Plugin is not
> allowed to be named like:
> 
> maven-WhatEverThisIs-plugin ? Based on the given code this
> means that future plugin developers have to change their
> plugin names into WhatEverThisIs-maven-plugin...
> 
> Is this the intention ?
> 
> Furthermore isn't this a clash with the pluginGroup setting
> in the settings.xml file ?
> 
> When exactly will this be activated?
> 
> Shouldn't this be documented on the Maven plugin
> development area (wiki?, http://maven.apache.org/plugin-developers/index.html)...
> 
> Kind regards
> 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
> 
> 

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


Re: svn commit: r1125604 - /maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java

Posted by Stephen Connolly <st...@gmail.com>.
1. yes there is a typo. as soon as I am at a pc the typo will be fixed.

2. the pmc is permitting persons who develop plugins for maven to use the
mark maven in their plugin name provided the name and its usage meets
certain criteria, amongst which is the "___ maven plugin" naming scheme. we
will be writing up a page explaining all this on the near future as well as
the full criteria for using the maven mark.

3. the pluginGroup controls which groupIds will be searched for matching
goalPrefixes. this does not affected that logic. currently if your
artifactId matches _-m-p or m-_-p and you don't specify the goalPrefix then
it will default to _ otherwise it defaults to the entire artifactid

4. activation kicks in when we have the page explaining how you can use the
marks correctly, but  in any case you should  ensure you are in compliance
with the Apache policy on the use of Apache marks right now. the pmc will be
explaining some safe usages of the maven marks, until that time if you have
any queries on your use of Apache marks please email either private@ the
respective apache projects org the vp of brand management with your query.

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 21 May 2011 18:47, "Karl Heinz Marbaise" <kh...@gmx.de> wrote:

Re: svn commit: r1125604 - /maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi, just a question about that...

does this mean that in the future a Maven Plugin is not allowed to be 
named like:

maven-WhatEverThisIs-plugin ? Based on the given code this means that 
future plugin developers have to change their plugin names into 
WhatEverThisIs-maven-plugin...

Is this the intention ?

Furthermore isn't this a clash with the pluginGroup setting in the 
settings.xml file ?

When exactly will this be activated?

Shouldn't this be documented on the Maven plugin development area 
(wiki?, http://maven.apache.org/plugin-developers/index.html)...

Kind regards
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: svn commit: r1125604 - /maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java

Posted by Dan Tran <da...@gmail.com>.
good catch Anders, wonder what is the original intention of that code :-)

-Dan

On Sat, May 21, 2011 at 10:28 AM, Anders Hammar <an...@hammar.net> wrote:
> But the groupId of Apache Maven plugins is "org.apache.maven.plugins". The
> code checks against "org.apache.maven.plugin"...
>
> /Anders
>
> On Sat, May 21, 2011 at 10:26, Dennis Lundberg <de...@apache.org> wrote:
>
>> Excellent stuff Stephen, thanks.
>> We should try to get this into a release as soon as possible.
>>
>> On 2011-05-21 02:21, stephenc@apache.org wrote:
>> > Author: stephenc
>> > Date: Sat May 21 00:21:26 2011
>> > New Revision: 1125604
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1125604&view=rev
>> > Log:
>> > No point sitting on this change any longer.
>> >
>> > Modified:
>> >
>> maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
>> >
>> > Modified:
>> maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
>> > URL:
>> http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java?rev=1125604&r1=1125603&r2=1125604&view=diff
>> >
>> ==============================================================================
>> > ---
>> maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
>> (original)
>> > +++
>> maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
>> Sat May 21 00:21:26 2011
>> > @@ -125,6 +125,16 @@ public abstract class AbstractGeneratorM
>> >              return;
>> >          }
>> >
>> > +        if ( project.getArtifactId().toLowerCase().startsWith( "maven-"
>> )
>> > +            && project.getArtifactId().toLowerCase().endsWith( "-plugin"
>> )
>> > +            && !"org.apache.maven.plugin".equals( project.getGroupId() )
>> )
>> > +        {
>> > +            getLog().error( "\n\nArtifact Ids of the format
>> maven-___-plugin are reserved for \n"
>> > +                                + "plugins in the Group Id
>> org.apache.maven.plugins\n"
>> > +                                + "Please change your artifactId to the
>> format ___-maven-plugin\n"
>> > +                                + "In the future this error will break
>> the build.\n\n" );
>> > +        }
>> > +
>> >          String defaultGoalPrefix =
>> PluginDescriptor.getGoalPrefixFromArtifactId( project.getArtifactId() );
>> >          if ( goalPrefix == null )
>> >          {
>> >
>> >
>> >
>>
>>
>> --
>> Dennis Lundberg
>>
>> ---------------------------------------------------------------------
>> 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


Re: svn commit: r1125604 - /maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java

Posted by Anders Hammar <an...@hammar.net>.
But the groupId of Apache Maven plugins is "org.apache.maven.plugins". The
code checks against "org.apache.maven.plugin"...

/Anders

On Sat, May 21, 2011 at 10:26, Dennis Lundberg <de...@apache.org> wrote:

> Excellent stuff Stephen, thanks.
> We should try to get this into a release as soon as possible.
>
> On 2011-05-21 02:21, stephenc@apache.org wrote:
> > Author: stephenc
> > Date: Sat May 21 00:21:26 2011
> > New Revision: 1125604
> >
> > URL: http://svn.apache.org/viewvc?rev=1125604&view=rev
> > Log:
> > No point sitting on this change any longer.
> >
> > Modified:
> >
> maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
> >
> > Modified:
> maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
> > URL:
> http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java?rev=1125604&r1=1125603&r2=1125604&view=diff
> >
> ==============================================================================
> > ---
> maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
> (original)
> > +++
> maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
> Sat May 21 00:21:26 2011
> > @@ -125,6 +125,16 @@ public abstract class AbstractGeneratorM
> >              return;
> >          }
> >
> > +        if ( project.getArtifactId().toLowerCase().startsWith( "maven-"
> )
> > +            && project.getArtifactId().toLowerCase().endsWith( "-plugin"
> )
> > +            && !"org.apache.maven.plugin".equals( project.getGroupId() )
> )
> > +        {
> > +            getLog().error( "\n\nArtifact Ids of the format
> maven-___-plugin are reserved for \n"
> > +                                + "plugins in the Group Id
> org.apache.maven.plugins\n"
> > +                                + "Please change your artifactId to the
> format ___-maven-plugin\n"
> > +                                + "In the future this error will break
> the build.\n\n" );
> > +        }
> > +
> >          String defaultGoalPrefix =
> PluginDescriptor.getGoalPrefixFromArtifactId( project.getArtifactId() );
> >          if ( goalPrefix == null )
> >          {
> >
> >
> >
>
>
> --
> Dennis Lundberg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: svn commit: r1125604 - /maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java

Posted by Dennis Lundberg <de...@apache.org>.
Excellent stuff Stephen, thanks.
We should try to get this into a release as soon as possible.

On 2011-05-21 02:21, stephenc@apache.org wrote:
> Author: stephenc
> Date: Sat May 21 00:21:26 2011
> New Revision: 1125604
> 
> URL: http://svn.apache.org/viewvc?rev=1125604&view=rev
> Log:
> No point sitting on this change any longer.
> 
> Modified:
>     maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
> 
> Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
> URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java?rev=1125604&r1=1125603&r2=1125604&view=diff
> ==============================================================================
> --- maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java (original)
> +++ maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java Sat May 21 00:21:26 2011
> @@ -125,6 +125,16 @@ public abstract class AbstractGeneratorM
>              return;
>          }
>  
> +        if ( project.getArtifactId().toLowerCase().startsWith( "maven-" ) 
> +            && project.getArtifactId().toLowerCase().endsWith( "-plugin" )
> +            && !"org.apache.maven.plugin".equals( project.getGroupId() ) )
> +        {
> +            getLog().error( "\n\nArtifact Ids of the format maven-___-plugin are reserved for \n" 
> +                                + "plugins in the Group Id org.apache.maven.plugins\n"
> +                                + "Please change your artifactId to the format ___-maven-plugin\n"
> +                                + "In the future this error will break the build.\n\n" );
> +        }
> +
>          String defaultGoalPrefix = PluginDescriptor.getGoalPrefixFromArtifactId( project.getArtifactId() );
>          if ( goalPrefix == null )
>          {
> 
> 
> 


-- 
Dennis Lundberg

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