You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by an...@nokia.com on 2006/03/11 11:46:55 UTC

[m2] defining new lifecycle / packaging with maven-plugin-tools-ant

Hi,
 
some of you might have followed my trials to setup a new project [1]: I'm now trying to work on the first step, which is using the assembly plugin to stuff all generated sources into a zip/jar file. The problem is, that during the build lifecycle I actually only want two plugins to be executed:
1) my custom plugin in the generate-sources phase and 
2) the assembly plugin for packaging. 
 
How can that be achieved? When I define only those plugins and no packaging, maven defaults to the jar packaging, which is invoking a lot of other unwanted plugins/mojos. 
 
I tried to define a new packaging in my plugin for the source code generation, but I don't know how to do that. I was following the giode [2] so far, but there isn't explained how the plexus/components.xml can be integrated, or if it's possible at all.
 
[1] http://www.mail-archive.com/users@maven.apache.org/msg37006.html
[2] http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html
 
Thanks for your feedback.
 
Andreas Ebbert-Karroum 
  Software Design Engineer - Nokia Networks Services / Middleware 
  phone: +49-211-94123928, fax: +49-211-94123838 
  Heltorfer Straße 1, 40472 Düsseldorf, Germany 


________________________________

This message is confidential. If you have received this message in error, please delete it from your system. You should not copy it for any purpose, or disclose its contents to any other person. Internet communications are not secure and therefore Nokia GmbH does not accept legal responsibility for the contents of this message as it has been transmitted over a public network. Thank you. 

Nokia GmbH, Nokia Networks is a German Company. Further information about the Company is available from its principal offices at Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the website at http://www.nokia.com/ 
________________________________



RE: [m2] defining new lifecycle / packaging with maven-plugin-tools-ant

Posted by an...@nokia.com.
Hi Lester,

Thanks for your feedback! I know the page about the build lifecycle, and I tried it, but I'm at a loss where to out the META-INF/plexus/components.xml in the standard directory layout, when I'm using the maven-plugin-plugin and maven-plugin-tools-ant as described here: 

>>http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html

Maybe I just have to try out different locations like src/main/scripts/META-INF/plexus/components.xml and others...

 _         __                _  _
//\ndreas.[|-bbert-[]/arroum(a)[|\|okia.com
           `-        `
   Andreas Ebbert-Karroum
   Software Design Engineer - Nokia Networks Services / Middleware 
   phone: +49-211-94123928, fax: +49-211-9412-3838
   Heltorfer Straße 1, 40472 Düsseldorf, Germany 

----------------------------------------------------------------------
This message is confidential. If you have received this message in error,
please delete it from your system. You should not copy it for any purpose,
or disclose its contents to any other person. Internet communications are
not secure and therefore Nokia GmbH does not accept legal responsibility
for the contents of this message as it has been transmitted over a public
network. Thank you.
Nokia GmbH, Nokia Networks is a German Company. Further information
about the Company is available from its principal offices at
Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the
website at http://www.nokia.com/
----------------------------------------------------------------------

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


Re: [m2] defining new lifecycle / packaging with maven-plugin-tools-ant

Posted by Lester Ecarma <le...@exist.com>.
Hi,

I think what you're looking for is in here:
    
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

There's a section there discussing how you can specify a new packaging.

-lester

andreas.ebbert-karroum@nokia.com wrote:

>Hi,
> 
>some of you might have followed my trials to setup a new project [1]: I'm now trying to work on the first step, which is using the assembly plugin to stuff all generated sources into a zip/jar file. The problem is, that during the build lifecycle I actually only want two plugins to be executed:
>1) my custom plugin in the generate-sources phase and 
>2) the assembly plugin for packaging. 
> 
>How can that be achieved? When I define only those plugins and no packaging, maven defaults to the jar packaging, which is invoking a lot of other unwanted plugins/mojos. 
> 
>I tried to define a new packaging in my plugin for the source code generation, but I don't know how to do that. I was following the giode [2] so far, but there isn't explained how the plexus/components.xml can be integrated, or if it's possible at all.
> 
>[1] http://www.mail-archive.com/users@maven.apache.org/msg37006.html
>[2] http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html
> 
>Thanks for your feedback.
> 
>Andreas Ebbert-Karroum 
>  Software Design Engineer - Nokia Networks Services / Middleware 
>  phone: +49-211-94123928, fax: +49-211-94123838 
>  Heltorfer Straße 1, 40472 Düsseldorf, Germany 
>
>
>________________________________
>
>This message is confidential. If you have received this message in error, please delete it from your system. You should not copy it for any purpose, or disclose its contents to any other person. Internet communications are not secure and therefore Nokia GmbH does not accept legal responsibility for the contents of this message as it has been transmitted over a public network. Thank you. 
>
>Nokia GmbH, Nokia Networks is a German Company. Further information about the Company is available from its principal offices at Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the website at http://www.nokia.com/ 
>________________________________
>
>
>
>  
>


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


RE: [m2] defining new lifecycle / packaging with maven-plugin-tools-ant

Posted by an...@nokia.com.
Ok, thanks for your help, I solved it on my own. In case anybody is having the same question and goes through the mail thread in the archive:

I've added the components.xml in src/main/resources/META-INF/plexus/components.xml

>From there, it's picked automatically by the resources:resources mojo and added to the target directory.

That's it. I'll open also a request in JIRA to enhance the documentation.

 _         __                _  _
//\ndreas.[|-bbert-[]/arroum(a)[|\|okia.com
           `-        `
   Andreas Ebbert-Karroum
   Software Design Engineer - Nokia Networks Services / Middleware 
   phone: +49-211-94123928, fax: +49-211-9412-3838
   Heltorfer Straße 1, 40472 Düsseldorf, Germany 

----------------------------------------------------------------------
This message is confidential. If you have received this message in error,
please delete it from your system. You should not copy it for any purpose,
or disclose its contents to any other person. Internet communications are
not secure and therefore Nokia GmbH does not accept legal responsibility
for the contents of this message as it has been transmitted over a public
network. Thank you.
Nokia GmbH, Nokia Networks is a German Company. Further information
about the Company is available from its principal offices at
Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the
website at http://www.nokia.com/
----------------------------------------------------------------------

>-----Original Message-----
>From: ext 
>users-return-42466-andreas.ebbert-karroum=nokia.com@maven.apach
e.org [mailto:users-return-42466-andreas.ebbert->karroum=nokia.com@maven.apache.org] 
>Sent: 14 March, 2006 17:47
>To: users@maven.apache.org
>Subject: RE: [m2] defining new lifecycle / packaging with 
>maven-plugin-tools-ant
>
>Hi,
>
>My problem is still existing, I tried to put the 
>components.xml to various places, to be picked up 
>automatically, but that did not work out. How do I do it?
>
>Thanks,
> _         __                _  _
>//\ndreas.[|-bbert-[]/arroum(a)[|\|okia.com
>           `-        `
>   Andreas Ebbert-Karroum
>   Software Design Engineer - Nokia Networks Services / Middleware
>   phone: +49-211-94123928, fax: +49-211-9412-3838
>   Heltorfer Straße 1, 40472 Düsseldorf, Germany 
>
>>-----Original Message-----
>>From: ext
>>users-return-42251-andreas.ebbert-karroum=nokia.com@maven.apach
>>e.org
>>[mailto:users-return-42251-andreas.ebbert-karroum=nokia.com@mav
>>en.apache.org]
>>Sent: 11 March, 2006 11:47
>>To: users@maven.apache.org
>>Subject: [m2] defining new lifecycle / packaging with 
>>maven-plugin-tools-ant
>>
>>Hi,
>> 
>>some of you might have followed my trials to setup a new project [1]: 
>>I'm now trying to work on the first step, which is using the assembly 
>>plugin to stuff all generated sources into a zip/jar file. 
>The problem 
>>is, that during the build lifecycle I actually only want two 
>plugins to 
>>be executed:
>>1) my custom plugin in the generate-sources phase and
>>2) the assembly plugin for packaging. 
>> 
>>How can that be achieved? When I define only those plugins and no 
>>packaging, maven defaults to the jar packaging, which is 
>invoking a lot 
>>of other unwanted plugins/mojos.
>> 
>>I tried to define a new packaging in my plugin for the source code 
>>generation, but I don't know how to do that. I was following 
>the giode 
>>[2] so far, but there isn't explained how the 
>plexus/components.xml can 
>>be integrated, or if it's possible at all.
>> 
>>[1] http://www.mail-archive.com/users@maven.apache.org/msg37006.html
>>[2]
>>http://maven.apache.org/guides/plugin/guide-ant-plugin-develop
ment.html
>> 
>>Thanks for your feedback.
>> 
>

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


RE: [m2] defining new lifecycle / packaging with maven-plugin-tools-ant

Posted by an...@nokia.com.
Hi,

My problem is still existing, I tried to put the components.xml to various places, to be picked up automatically, but that did not work out. How do I do it?

Thanks,
 _         __                _  _
//\ndreas.[|-bbert-[]/arroum(a)[|\|okia.com
           `-        `
   Andreas Ebbert-Karroum
   Software Design Engineer - Nokia Networks Services / Middleware 
   phone: +49-211-94123928, fax: +49-211-9412-3838
   Heltorfer Straße 1, 40472 Düsseldorf, Germany 

>-----Original Message-----
>From: ext 
>users-return-42251-andreas.ebbert-karroum=nokia.com@maven.apach
>e.org 
>[mailto:users-return-42251-andreas.ebbert-karroum=nokia.com@mav
>en.apache.org] 
>Sent: 11 March, 2006 11:47
>To: users@maven.apache.org
>Subject: [m2] defining new lifecycle / packaging with 
>maven-plugin-tools-ant
>
>Hi,
> 
>some of you might have followed my trials to setup a new 
>project [1]: I'm now trying to work on the first step, which 
>is using the assembly plugin to stuff all generated sources 
>into a zip/jar file. The problem is, that during the build 
>lifecycle I actually only want two plugins to be executed:
>1) my custom plugin in the generate-sources phase and
>2) the assembly plugin for packaging. 
> 
>How can that be achieved? When I define only those plugins and 
>no packaging, maven defaults to the jar packaging, which is 
>invoking a lot of other unwanted plugins/mojos. 
> 
>I tried to define a new packaging in my plugin for the source 
>code generation, but I don't know how to do that. I was 
>following the giode [2] so far, but there isn't explained how 
>the plexus/components.xml can be integrated, or if it's 
>possible at all.
> 
>[1] http://www.mail-archive.com/users@maven.apache.org/msg37006.html
>[2] 
>http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html
> 
>Thanks for your feedback.
> 
>Andreas Ebbert-Karroum
>  Software Design Engineer - Nokia Networks Services / Middleware
>  phone: +49-211-94123928, fax: +49-211-94123838
>  Heltorfer Straße 1, 40472 Düsseldorf, Germany 
>

----------------------------------------------------------------------
This message is confidential. If you have received this message in error,
please delete it from your system. You should not copy it for any purpose,
or disclose its contents to any other person. Internet communications are
not secure and therefore Nokia GmbH does not accept legal responsibility
for the contents of this message as it has been transmitted over a public
network. Thank you.
Nokia GmbH, Nokia Networks is a German Company. Further information
about the Company is available from its principal offices at
Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the
website at http://www.nokia.com/
---------------------------------------------------------------------- 

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