You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Thompson <Mi...@webifysolutions.com> on 2005/11/18 01:07:29 UTC
new artifact type
All,
So we are delving into the world maven2 and eclipse plugins. In order
to package my plugin, I think I need a new artifact type since the
standard jar packaging won't suffice. Just FYI, eclipse plugins are
actually zip files that contain your class files in a contained jar,
dependency jars, a special manifest and your resources.
So my questions are:
1. Is a new artifact type needed? Or can I do this by having a
really fancy pom.xml?
2. If a new artifact type is needed, I can envision a couple places
in the build life cycle that I need to override (process-resources and
package). Would the standard approach be to create one plugin for the
artifact lifecycle override (components.xml) and 2 more plugins for the
2 stages of the life cycle I want to override?
Thanks in advance!
--m
Re: new artifact type
Posted by John Tolentino <jo...@mergere.com>.
Hi Michael,
Have you looked at the maven-assembly-plugin
(http://maven.apache.org/plugins/index.html)? It packages the whole
project, including dependencies, into a jar. Since jars are also zips,
this might be the solution you're looking for.
As for your class files that should be contained in a jar, specify jar
as your packaging
(http://maven.apache.org/maven-model/maven.html#class_project).
If you follow the standard directory layout
(http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html),
by default, your resources will be included. If you need to customize
the number of resources and target folders, add them to the resources
section of your POM
(http://maven.apache.org/maven-model/maven.html#class_build).
I hope this is an easier way to resolve your problem.
Regards,
John
Michael Thompson wrote:
>All,
>
> So we are delving into the world maven2 and eclipse plugins. In order
>to package my plugin, I think I need a new artifact type since the
>standard jar packaging won't suffice. Just FYI, eclipse plugins are
>actually zip files that contain your class files in a contained jar,
>dependency jars, a special manifest and your resources.
>
>
>
>So my questions are:
>
>
>
>1. Is a new artifact type needed? Or can I do this by having a
>really fancy pom.xml?
>2. If a new artifact type is needed, I can envision a couple places
>in the build life cycle that I need to override (process-resources and
>package). Would the standard approach be to create one plugin for the
>artifact lifecycle override (components.xml) and 2 more plugins for the
>2 stages of the life cycle I want to override?
>
>
>
>Thanks in advance!
>
> --m
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: new artifact type
Posted by John Tolentino <jo...@mergere.com>.
By the way, please add [m2] to your subject so other Maven 2 developers
would take note. They might skip/miss out on your email, thinking it's a
m1 question. :-)
Regards,
John
Michael Thompson wrote:
>All,
>
> So we are delving into the world maven2 and eclipse plugins. In order
>to package my plugin, I think I need a new artifact type since the
>standard jar packaging won't suffice. Just FYI, eclipse plugins are
>actually zip files that contain your class files in a contained jar,
>dependency jars, a special manifest and your resources.
>
>
>
>So my questions are:
>
>
>
>1. Is a new artifact type needed? Or can I do this by having a
>really fancy pom.xml?
>2. If a new artifact type is needed, I can envision a couple places
>in the build life cycle that I need to override (process-resources and
>package). Would the standard approach be to create one plugin for the
>artifact lifecycle override (components.xml) and 2 more plugins for the
>2 stages of the life cycle I want to override?
>
>
>
>Thanks in advance!
>
> --m
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org