You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by mika <mi...@konglomerat.ch> on 2005/09/28 14:47:35 UTC

[m2-b2] trouble creating sar packaging plugin

Hi,

I just started to play around with maven 2 yesterday and really want to 
move from maven 1... i tried to create a simple plugin to package 
projects as SAR (Service ARchives in jboss). Now after some struggling 
using beta-1, the plugin seems to be built and installed correctly using 
beta-2. Invoking the goal "sar:sar" directly from a project (with 
<packaging>sar</packaging>) works fine, but when invoked indirectly 
through the lifecycle process (e.g. m2 install) i get the folloging error:

...
----------------------------------------------------------------------------
[ERROR] Nonexistent component: 
org.apache.maven.lifecycle.mapping.LifecycleMappingsar
[INFO] 
----------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] 
----------------------------------------------------------------------------
[INFO] Diagnosis: Cannot find lifecycle mapping for packaging: 'sar'.
[INFO] 
----------------------------------------------------------------------------
[INFO] 
----------------------------------------------------------------------------
FATAL ERROR: Error executing Maven for a project
For more information, run with the -e flag


The SAR-plugin is actually just a modified jar plugin - replaced jar 
with sar.

The generated plugin-descriptor looks quite the same as the one of the 
jar plugin, except the prefix / goal / implementation of course.

Am i missing something? Should i add some lifecycle information to the 
project's pom? where?

thanks in advance,
mika

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


Re: [m2-b2] trouble creating sar packaging plugin

Posted by Brett Porter <br...@gmail.com>.
This is a missing instruction on the build lifecycle page. You need to
add the plugin to the project, <extensions>true</extensions>

- Brett

On 9/28/05, mika <mi...@konglomerat.ch> wrote:
> Hi,
>
> I just started to play around with maven 2 yesterday and really want to
> move from maven 1... i tried to create a simple plugin to package
> projects as SAR (Service ARchives in jboss). Now after some struggling
> using beta-1, the plugin seems to be built and installed correctly using
> beta-2. Invoking the goal "sar:sar" directly from a project (with
> <packaging>sar</packaging>) works fine, but when invoked indirectly
> through the lifecycle process (e.g. m2 install) i get the folloging error:
>
> ...
> ----------------------------------------------------------------------------
> [ERROR] Nonexistent component:
> org.apache.maven.lifecycle.mapping.LifecycleMappingsar
> [INFO]
> ----------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Diagnosis: Cannot find lifecycle mapping for packaging: 'sar'.
> [INFO]
> ----------------------------------------------------------------------------
> [INFO]
> ----------------------------------------------------------------------------
> FATAL ERROR: Error executing Maven for a project
> For more information, run with the -e flag
>
>
> The SAR-plugin is actually just a modified jar plugin - replaced jar
> with sar.
>
> The generated plugin-descriptor looks quite the same as the one of the
> jar plugin, except the prefix / goal / implementation of course.
>
> Am i missing something? Should i add some lifecycle information to the
> project's pom? where?
>
> thanks in advance,
> mika
>
> ---------------------------------------------------------------------
> 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: [m2-b2] trouble creating sar packaging plugin

Posted by mika <mi...@konglomerat.ch>.
Ok, thanks a lot! I hadn't any time to further investigate and get it to 
work right now anyway; a "common" solution for this type of packaging 
certainly would be the nicest approach ;-)

cheers,
mika

Trygve Laugstøl wrote:
> On Wed, 2005-09-28 at 14:47 +0200, mika wrote:
> 
>>Hi,
>>
>>I just started to play around with maven 2 yesterday and really want to 
>>move from maven 1... i tried to create a simple plugin to package 
>>projects as SAR (Service ARchives in jboss). Now after some struggling 
>>using beta-1, the plugin seems to be built and installed correctly using 
>>beta-2. Invoking the goal "sar:sar" directly from a project (with 
>><packaging>sar</packaging>) works fine, but when invoked indirectly 
>>through the lifecycle process (e.g. m2 install) i get the folloging error:
> 
> 
> There was someone on dev@maven or mojo that was working on the same
> thing. If I can figure out who it was I'll let you know. Ideally this
> plugin would be hosted by either jboss or on the mojo project[1].
> 
> [1]: http://mojo.codehaus.org
> 
> --
> Trygve
> 
> 
> ---------------------------------------------------------------------
> 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: [m2-b2] trouble creating sar packaging plugin

Posted by Trygve Laugstøl <tr...@codehaus.org>.
On Wed, 2005-09-28 at 14:47 +0200, mika wrote:
> Hi,
> 
> I just started to play around with maven 2 yesterday and really want to 
> move from maven 1... i tried to create a simple plugin to package 
> projects as SAR (Service ARchives in jboss). Now after some struggling 
> using beta-1, the plugin seems to be built and installed correctly using 
> beta-2. Invoking the goal "sar:sar" directly from a project (with 
> <packaging>sar</packaging>) works fine, but when invoked indirectly 
> through the lifecycle process (e.g. m2 install) i get the folloging error:

There was someone on dev@maven or mojo that was working on the same
thing. If I can figure out who it was I'll let you know. Ideally this
plugin would be hosted by either jboss or on the mojo project[1].

[1]: http://mojo.codehaus.org

--
Trygve


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