On 2/4/2011 2:33 PM, Marshall Schor wrote:
> We have a maven plugin that does pear packaging; we use it ourselves in some 
> builds.
>
> It's maven coordinates are:
>
> GroupId: org.apache.uima
> ArtifactId: PearPackagingMavenPlugin
>
> Maven, when running a specific plugin, specifies that plugin using the syntax:
> mvn groupId:artifactId:version:goal
>
> So to run the pear packager, people have to type:
>
> mvn org.apache.uima:PearPackagingMavenPlugin:2.3.1:package
>
> The page
> http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
> describes several shortenings of this, based on conventions.
>
> 1) to run the "latest" version, leave off the version: mvn
> org.apache.uima:PearPackagingMavenPlugin:package
>
> 2) If the plugin artifactId follows the naming convention of 
> maven-$name-plugin
> or $name-maven-plugin, then you can type mvn groupId:$name:version:goal.  An
> email thread (see http://markmail.org/message/h3dit6ml4nrciysv ) says that the
> first of these forms is reserved for the artifacts in the groupId of
> org.apache.maven.plugins.  The 2nd was originally reserved (I think?) for the
> groupId of org.codehaus.mojo, but also can be used for other groupIds.
>
> If we renamed our plugin to follow this convention, to be the artifactId
> uimapear-maven-plugin, then to run the latest version of this from the mvn
> command line, you would type:
>
> mvn org.apache.uima:uimapear:package
>
> If this convention is followed, then with an additional entry in a local
> .m2/settings.xml file that adds the org.apache.uima "groupId" to the list of
> groupIds for the maven plugin lookup mechanism to use, you can reduce this
> further to:
>
> mvn uimapear:package

If we were sufficiently *bold*, we could even name the plugin
"pear-maven-plugin", kind of analogous to the "jar" plugin. Then, the maven
command to package up a pear would be:

mvn pear:package

Which has a nice "ring" to it I think :-)

-Marshall
> I think it is probably a good idea to change the artifactId to follow the
> $name-maven-plugin convention.
>
> Other opinions?  If we do change the name, is $name = uimapear a good 
> candidate?
> (This would allow future expansion of the functionality, although currently it
> only supports a"package" goal).
>
> The bad side effect is that it would affect existing users (if they currently
> have scripts using the old name), when/if they upgraded.  I'm not sure the 
> best
> way to mitigate this...
>
> -Marshall
>
>
>
>
>
>
>
>

Reply via email to