You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wim Deblauwe <wi...@gmail.com> on 2005/11/15 17:41:57 UTC

[m2] Problem creating plugin with alternative lifecycle

Hi,

I'm testing to create a new plugin that can generate a different kind of
artifact (InstallShield Merge Module). Following the Guide to Developing
Java plugins and Introduction to the build lifecycle, I come to the
following:

I made a components.xml file:

<component-set>
<components>
<component>
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
<role-hint>msm</role-hint>
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
</implementation>
<configuration>
<phases>
<compile>msm:compile</compile>
<package>msm:package</package>
<install>install:install</install>
<deploy>deploy:deploy</deploy>
</phases>
</configuration>
</component>
</components>
</component-set>

Then in my pom.xml I set the <packaging> to 'msm' and added this:

<plugins>
<plugin>
<groupId>com.mycomp.mavenplugin</groupId>
<artifactId>maven-msm-plugin</artifactId>
<extensions>true</extensions>
</plugin>
</plugins>

I then get the following error:

[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building Utils Logging MSM Module
[INFO] task-segment: [install]
[INFO]
----------------------------------------------------------------------------
[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] Mapped-prefix lookup of mojos are only supported from direct
invocation. Please use specification of the form
groupId:artifactId[:version]:goal instead. (Offending mojo: 'msm:compile',
invoked
via: 'install')
[INFO]
----------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
----------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Tue Nov 15 17:38:44 CET 2005
[INFO] Final Memory: 1M/3M
[INFO]
----------------------------------------------------------------------------


What am I doing wrong? I did a 'mvn -DupdateReleaseInfo=true install' to
install my custom plugin and added
<pluginGroups>
<pluginGroup>com.barcoview.mavenplugin</pluginGroup>
</pluginGroups>

to my settings.xml

any help is very much appreciated!

regards,

Wim

Re: [m2] Problem creating plugin with alternative lifecycle

Posted by Wim Deblauwe <wi...@gmail.com>.
ok, thanks! I just found out also :)

regards,

Wim

2005/11/16, Nitko2 <ni...@gmail.com>:
>
> Wim, you have to use full plugin specification:
> groupId:artifactId[:version]:goal
>
> So, instead of install:install you use
> org.apache.maven.plugins:install:2.0:install
>
> Filip.
>
>
>
>
> Wim Deblauwe wrote:
> > Hi,
> >
> > I'm testing to create a new plugin that can generate a different kind of
> > artifact (InstallShield Merge Module). Following the Guide to Developing
> > Java plugins and Introduction to the build lifecycle, I come to the
> > following:
> >
> > I made a components.xml file:
> >
> > <component-set>
> > <components>
> > <component>
> > <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
> > <role-hint>msm</role-hint>
> > <implementation>
> org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
> > </implementation>
> > <configuration>
> > <phases>
> > <compile>msm:compile</compile>
> > <package>msm:package</package>
> > <install>install:install</install>
> > <deploy>deploy:deploy</deploy>
> > </phases>
> > </configuration>
> > </component>
> > </components>
> > </component-set>
> >
> > Then in my pom.xml I set the <packaging> to 'msm' and added this:
> >
> > <plugins>
> > <plugin>
> > <groupId>com.mycomp.mavenplugin</groupId>
> > <artifactId>maven-msm-plugin</artifactId>
> > <extensions>true</extensions>
> > </plugin>
> > </plugins>
> >
> > I then get the following error:
> >
> > [INFO] Scanning for projects...
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > [INFO] Building Utils Logging MSM Module
> > [INFO] task-segment: [install]
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > [INFO] Mapped-prefix lookup of mojos are only supported from direct
> > invocation. Please use specification of the form
> > groupId:artifactId[:version]:goal instead. (Offending mojo:
> 'msm:compile',
> > invoked
> > via: 'install')
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > [INFO] For more information, run Maven with the -e switch
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > [INFO] Total time: < 1 second
> > [INFO] Finished at: Tue Nov 15 17:38:44 CET 2005
> > [INFO] Final Memory: 1M/3M
> > [INFO]
> >
> ----------------------------------------------------------------------------
> >
> >
> > What am I doing wrong? I did a 'mvn -DupdateReleaseInfo=true install' to
> > install my custom plugin and added
> > <pluginGroups>
> > <pluginGroup>com.barcoview.mavenplugin</pluginGroup>
> > </pluginGroups>
> >
> > to my settings.xml
> >
> > any help is very much appreciated!
> >
> > regards,
> >
> > Wim
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: [m2] Problem creating plugin with alternative lifecycle

Posted by Nitko2 <ni...@gmail.com>.
Wim, you have to use full plugin specification: groupId:artifactId[:version]:goal

So, instead of install:install you use org.apache.maven.plugins:install:2.0:install

Filip.




Wim Deblauwe wrote:
> Hi,
> 
> I'm testing to create a new plugin that can generate a different kind of
> artifact (InstallShield Merge Module). Following the Guide to Developing
> Java plugins and Introduction to the build lifecycle, I come to the
> following:
> 
> I made a components.xml file:
> 
> <component-set>
> <components>
> <component>
> <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
> <role-hint>msm</role-hint>
> <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
> </implementation>
> <configuration>
> <phases>
> <compile>msm:compile</compile>
> <package>msm:package</package>
> <install>install:install</install>
> <deploy>deploy:deploy</deploy>
> </phases>
> </configuration>
> </component>
> </components>
> </component-set>
> 
> Then in my pom.xml I set the <packaging> to 'msm' and added this:
> 
> <plugins>
> <plugin>
> <groupId>com.mycomp.mavenplugin</groupId>
> <artifactId>maven-msm-plugin</artifactId>
> <extensions>true</extensions>
> </plugin>
> </plugins>
> 
> I then get the following error:
> 
> [INFO] Scanning for projects...
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Building Utils Logging MSM Module
> [INFO] task-segment: [install]
> [INFO]
> ----------------------------------------------------------------------------
> [INFO]
> ----------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Mapped-prefix lookup of mojos are only supported from direct
> invocation. Please use specification of the form
> groupId:artifactId[:version]:goal instead. (Offending mojo: 'msm:compile',
> invoked
> via: 'install')
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Tue Nov 15 17:38:44 CET 2005
> [INFO] Final Memory: 1M/3M
> [INFO]
> ----------------------------------------------------------------------------
> 
> 
> What am I doing wrong? I did a 'mvn -DupdateReleaseInfo=true install' to
> install my custom plugin and added
> <pluginGroups>
> <pluginGroup>com.barcoview.mavenplugin</pluginGroup>
> </pluginGroups>
> 
> to my settings.xml
> 
> any help is very much appreciated!
> 
> regards,
> 
> Wim
> 

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