maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baptiste Mathus ...@batmat.net>
Subject Re: Using Plugin Truncated Name
Date Tue, 07 Jan 2014 21:07:21 GMT
Hi Omar,
Well, what Stephen advices *is* actually at least a part of the solution
you're looking for.

Stephen says you MUST NOT use the org.apache.maven.plugins and
maven-yourplugin-plugin naming scheme because this is a naming strategy
reserved for core maven plugins.
See the first section of
http://maven.apache.org/guides/plugin/guide-java-plugin-development.html for
example.

In your case, maybe even more specifically this page:
http://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html

(btw, note the sentence "If your plugin's artifactId fits this pattern,
Maven will automatically map your plugin to the correct prefix in the
metadata stored within your plugin's groupId path on the repository").

HTH
Cheers


2014/1/6 Omar@Gmail <omarnetbox@googlemail.com>

> Thanks Stephen,
>
> What you suggest sounds like good practice (not sure why though) however
> not a fix for my issue.
>
> The fix is as follows: - somehow your response inspired me :)
>
> In the pom.xml file of the custom plugin there is a plugin configured
> maven-plugin-plugin in that plugin add configuration
>
> <goalPrefix>pce</goalPrefix>
>
> I then installed the plugin and I tried mvn pce:pull and that worked fine.
> Job done.
>
>
>
> On 6 January 2014 12:44, Stephen Connolly
> <stephen.alan.connolly@gmail.com>wrote:
>
> > On 6 January 2014 12:40, Omar@Gmail <omarnetbox@googlemail.com> wrote:
> >
> > > I have written my own maven mojo plugin and wish to use the truncated
> > name
> > > instead of the long name to invoke it, like so:
> > >
> > > Instead of
> > > mvn org.apache.maven.plugins:maven-pce-plugin:pull
> > >
> > > I want use:
> > >
> > > mvn pce:pull
> > >
> > > But even though I put it under group 'org.apache.maven.plugins' and
> named
> > > it maven-pce-plugin I still get error message:
> > >
> >
> > Nooooo don't put it there... you don't own that group Id.
> >
> > Put it in your own groupId and then in your settings.xml just add your
> > group Id as the <pluginGroups>
> > http://maven.apache.org/settings.html#Plugin_Groups
> >
> >
> > > No plugin found for prefix 'pce' in the current project and in the
> plugin
> > > groups [*org.apache.maven.plugins*, org.codehaus.mojo] available from
> the
> > > repositories [local (C:\Users\omar\.m2\repository), central (
> > > http://repo.maven.apache.org/maven2)]
> > >
> > > What am I doing wrong? thanks for the help.
> > >
> >
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor ! nbsp;!
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message