You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Matthew Smalley <de...@smalley.e7even.com> on 2005/09/12 22:10:34 UTC

[m2] packaging

What's the different possible values for <packaging> in the POM? I've seen
examples of jar, war, ear - any others?


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


Re: [m2] packaging

Posted by Brett Porter <br...@gmail.com>.
This is all correct. It is worth adding that it is impossible to have a 
definitive list as plugins can add their own - however the built in ones 
are:
jar, ejb, war, ear, rar, maven-plugin

Cheers,
Brett

On 9/13/05, Yann Le Du <le...@yahoo.com> wrote:
> 
> When you execute "m2 package" (or, more likely, "m2 install" which will 
> call
> "package"), Maven checks your <packaging> to see what plugin to use. e.g., 
> if
> your packaging is war, it will use maven-war-plugin.
> 
> I don't know if there is an official list, but you can figure it out from 
> the
> list of available plugins :
> http://maven.apache.org/maven2/plugins/index.html (not up-to-date at the
> moment)
> or
> http://www.ibiblio.org/maven2/org/apache/maven/plugins/
> 
> ejb is another possible packaging.
> 
> Regards,
> Yann
> 
> --- Matthew Smalley <de...@smalley.e7even.com> a écrit :
> 
> > Is there a definitive list somewhere, or ... What does this information 
> get
> > used for?
> >
> > -----Original Message-----
> > From: Wendell Beckwith [mailto:wbeckwith@gmail.com]
> > Sent: 12 September 2005 21:15
> > To: Maven Users List
> > Subject: Re: [m2] packaging
> >
> > maven-plugin is another.
> >
> > On 9/12/05, Matthew Smalley <de...@smalley.e7even.com> wrote:
> > >
> > > What's the different possible values for <packaging> in the POM? I've
> > > seen examples of jar, war, ear - any others?
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
> 
> 
> 
> 
> 
> 
> 
> 
> ___________________________________________________________________________
> Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
> Téléchargez cette version sur http://fr.messenger.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

Re: [m2] Nested jars

Posted by Brett Porter <br...@gmail.com>.
The way Maven is intended to work currently in this regard is that anything 
that aggregates other projects or dependencies doesn't use the packaging, 
but instead produces it as an associated artifact. So, if packaging = pom, 
you get the desired result in terms of the dependency mechanism, but you can 
still produce an assembly (jar/zip/rpm) from that.

Hope this helps. This is definitely one of the main use cases that needs 
some polishing up before final release.

Cheers,
Brett

On 9/14/05, Andrew Niefer <an...@ca.ibm.com> wrote:
> 
> The resulting artifact of a project A is a directory containing jar files,
> binaries and resources and I package this in a jar, or even a zip or rpm
> (if I had such a packaging plugin)
> 
> A jar/zip/rpm
> - nested1.jar
> - nested2.jar
> - resources/binaries
> - META-INF/manifest.mf
> 
> manifest.mf is an OSGI manifest that specifies nested1.jar and nested2.jar
> using the Bundle-ClassPath.
> 
> Consider now another project B that has a dependency on A. When building
> B, I don't want its classpath to contain A, but instead I want it to
> contain nested1.jar and nested2.jar.
> 
> Is it possible to nest jars this way? Or would something like this require
> a custom process-resources plugin?
> 
> -Andrew
> 
> 
>

Re: [m2] Nested jars

Posted by Brett Porter <br...@gmail.com>.
Cool - well, if there's anything we can do to help, just let us know. I'm 
equally new to building Eclipse plugins in general, so I'll try and get up 
to speed as soon as possible.

- Brett

On 9/16/05, Andrew Niefer <an...@ca.ibm.com> wrote:
> 
> Yes, I'm actually working for Jeff, so I'm investigating this in a general
> sense. Unfortunately I'm new to both maven and pde-build so I'm still
> trying to get a handle on the problem.
> 
> -Andrew
> Brett Porter <br...@gmail.com> wrote on 09/14/2005 09:49:42 PM:
> 
> > FWIW, I have been discussing building Eclipse plugins with m2. The
> > discussion was with Jeff McAffer on pde-build-dev@eclipse.org. I haven't
> had
> > a chance to investigate it any further at this point due to a lack of
> time,
> > but it'd be great to compare notes. Are you building your own plugin, or
> 
> > just depending on one?
> >
> > Cheers,
> > Brett
> >
> 
>

Re: [m2] Nested jars

Posted by Andrew Niefer <an...@ca.ibm.com>.
Yes, I'm actually working for Jeff, so I'm investigating this in a general 
sense.  Unfortunately I'm new to both maven and pde-build so I'm still 
trying to get a handle on the problem.

-Andrew
Brett Porter <br...@gmail.com> wrote on 09/14/2005 09:49:42 PM:

> FWIW, I have been discussing building Eclipse plugins with m2. The 
> discussion was with Jeff McAffer on pde-build-dev@eclipse.org. I haven't 
had 
> a chance to investigate it any further at this point due to a lack of 
time, 
> but it'd be great to compare notes. Are you building your own plugin, or 

> just depending on one?
> 
> Cheers,
> Brett
> 

Re: [m2] Nested jars

Posted by Brett Porter <br...@gmail.com>.
Hi Andrew,

Right - it seems like the same situation I was describing. I think you would 
have a POM that declares the dependencies included in the ZIP, and if you 
were to produce the ZIP with that it would be a "secondary" type, and you 
would just depend on the POM to aggregate its deps.

I agree that this should be an aggregating parent instead and use modules 
instead of dependencies - however, currently this won't work for the case 
you are describing (there is an open issue to allow it).

FWIW, I have been discussing building Eclipse plugins with m2. The 
discussion was with Jeff McAffer on pde-build-dev@eclipse.org. I haven't had 
a chance to investigate it any further at this point due to a lack of time, 
but it'd be great to compare notes. Are you building your own plugin, or 
just depending on one?

Cheers,
Brett

On 9/15/05, Andrew Niefer <an...@ca.ibm.com> wrote:
> 
> Basically, we are trying to depend upon an Eclipse Plugin. Some plugins
> exist as directories instead of as a jar file though they are often zipped
> for distribution. For example org.eclipse.tomcat_4.1.30.1 is a directory
> containing, among other things, 23 jars.
> 
> Project A provides some interface, so clients only know they want to
> depend on A The fact that A provides the implementation as multiple
> nested jars is a detail that clients shouldn't know or care about.
> 
> These nested jars could be subprojects (and judging by the replies, should
> be). One use case is to take an existing Eclipse plugin and describe it
> with a pom so that we can depend on it.
> 
> 
> -Andrew
> 
> Jesse McConnell <je...@gmail.com> wrote on 09/13/2005
> 08:27:05 PM:
> 
> > I am a little confused with what you are trying to do exactly..
> >
> > are you basically saying that you want one project to produce multiple
> > artifacts that you can use as a dependency seperately within another
> > project?
> >
> > are these projects really subprojects in one project with a shared root
> > pom.xml file?
> >
> > or are they discrete projects,,,?
> >
> > bit more info would be grand :)
> >
> > Jesse
> >
> > On 9/13/05, Andrew Niefer <an...@ca.ibm.com> wrote:
> > >
> > > The resulting artifact of a project A is a directory containing jar
> files,
> > > binaries and resources and I package this in a jar, or even a zip or
> rpm
> > > (if I had such a packaging plugin)
> > >
> > > A jar/zip/rpm
> > > - nested1.jar
> > > - nested2.jar
> > > - resources/binaries
> > > - META-INF/manifest.mf
> > >
> > > manifest.mf is an OSGI manifest that specifies nested1.jar and
> nested2.jar
> > > using the Bundle-ClassPath.
> > >
> > > Consider now another project B that has a dependency on A. When
> building
> > > B, I don't want its classpath to contain A, but instead I want it to
> > > contain nested1.jar and nested2.jar.
> > >
> > > Is it possible to nest jars this way? Or would something like this
> require
> > > a custom process-resources plugin?
> > >
> > > -Andrew
> > >
> > >
> > >
> >
> >
> > --
> > jesse mcconnell
> 
>

Re: [m2] Nested jars

Posted by Andrew Niefer <an...@ca.ibm.com>.
Basically, we are trying to depend upon an Eclipse Plugin.  Some plugins 
exist as directories instead of as a jar file though they are often zipped 
for distribution.  For example org.eclipse.tomcat_4.1.30.1 is a directory 
containing, among other things,  23 jars.

Project A provides some interface, so clients only know they want to 
depend on A  The fact that A provides the implementation as multiple 
nested jars is a detail that clients shouldn't know or care about.

These nested jars could be subprojects (and judging by the replies, should 
be).  One use case is to take an existing Eclipse plugin and describe it 
with a pom so that we can depend on it.


-Andrew

Jesse McConnell <je...@gmail.com> wrote on 09/13/2005 
08:27:05 PM:

> I am a little confused with what you are trying to do exactly..
> 
> are you basically saying that you want one project to produce multiple 
> artifacts that you can use as a dependency seperately within another 
> project?
> 
> are these projects really subprojects in one project with a shared root 
> pom.xml file?
> 
> or are they discrete projects,,,?
> 
> bit more info would be grand :)
> 
> Jesse
> 
> On 9/13/05, Andrew Niefer <an...@ca.ibm.com> wrote:
> > 
> > The resulting artifact of a project A is a directory containing jar 
files,
> > binaries and resources and I package this in a jar, or even a zip or 
rpm
> > (if I had such a packaging plugin)
> > 
> > A jar/zip/rpm
> > - nested1.jar
> > - nested2.jar
> > - resources/binaries
> > - META-INF/manifest.mf
> > 
> > manifest.mf is an OSGI manifest that specifies nested1.jar and 
nested2.jar
> > using the Bundle-ClassPath.
> > 
> > Consider now another project B that has a dependency on A. When 
building
> > B, I don't want its classpath to contain A, but instead I want it to
> > contain nested1.jar and nested2.jar.
> > 
> > Is it possible to nest jars this way? Or would something like this 
require
> > a custom process-resources plugin?
> > 
> > -Andrew
> > 
> > 
> > 
> 
> 
> -- 
> jesse mcconnell

Re: [m2] Nested jars

Posted by Jesse McConnell <je...@gmail.com>.
I am a little confused with what you are trying to do exactly..

are you basically saying that you want one project to produce multiple 
artifacts that you can use as a dependency seperately within another 
project?

are these projects really subprojects in one project with a shared root 
pom.xml file?

or are they discrete projects,,,?

bit more info would be grand :)

Jesse

On 9/13/05, Andrew Niefer <an...@ca.ibm.com> wrote:
> 
> The resulting artifact of a project A is a directory containing jar files,
> binaries and resources and I package this in a jar, or even a zip or rpm
> (if I had such a packaging plugin)
> 
> A jar/zip/rpm
> - nested1.jar
> - nested2.jar
> - resources/binaries
> - META-INF/manifest.mf
> 
> manifest.mf is an OSGI manifest that specifies nested1.jar and nested2.jar
> using the Bundle-ClassPath.
> 
> Consider now another project B that has a dependency on A. When building
> B, I don't want its classpath to contain A, but instead I want it to
> contain nested1.jar and nested2.jar.
> 
> Is it possible to nest jars this way? Or would something like this require
> a custom process-resources plugin?
> 
> -Andrew
> 
> 
> 


-- 
jesse mcconnell

[m2] Nested jars

Posted by Andrew Niefer <an...@ca.ibm.com>.
The resulting artifact of a project A is a directory containing jar files, 
binaries and resources and I package this in a jar, or even a zip or rpm 
(if I had such a packaging  plugin)

A  jar/zip/rpm
        - nested1.jar
        - nested2.jar
        - resources/binaries
        - META-INF/manifest.mf

manifest.mf is an OSGI manifest that specifies nested1.jar and nested2.jar 
using the Bundle-ClassPath.

Consider now another project B that has a dependency on A.  When building 
B, I don't want its classpath to contain A, but instead I want it to 
contain nested1.jar and nested2.jar.

Is it possible to nest jars this way? Or would something like this require 
a custom process-resources plugin?

-Andrew


RE: [m2] packaging

Posted by Yann Le Du <le...@yahoo.com>.
When you execute "m2 package" (or, more likely, "m2 install" which will call
"package"), Maven checks your <packaging> to see what plugin to use. e.g., if
your packaging is war, it will use maven-war-plugin.

I don't know if there is an official list, but you can figure it out from the
list of available plugins :
http://maven.apache.org/maven2/plugins/index.html (not up-to-date at the
moment)
or
http://www.ibiblio.org/maven2/org/apache/maven/plugins/

ejb is another possible packaging.

Regards,
Yann

--- Matthew Smalley <de...@smalley.e7even.com> a écrit :

> Is there a definitive list somewhere, or ... What does this information get
> used for? 
> 
> -----Original Message-----
> From: Wendell Beckwith [mailto:wbeckwith@gmail.com] 
> Sent: 12 September 2005 21:15
> To: Maven Users List
> Subject: Re: [m2] packaging
> 
> maven-plugin is another.
> 
> On 9/12/05, Matthew Smalley <de...@smalley.e7even.com> wrote:
> > 
> > What's the different possible values for <packaging> in the POM? I've 
> > seen examples of jar, war, ear - any others?
> > 
> > 
> > ---------------------------------------------------------------------
> > 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
> 
> 



	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com

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


RE: [m2] packaging

Posted by Matthew Smalley <de...@smalley.e7even.com>.
Is there a definitive list somewhere, or ... What does this information get
used for? 

-----Original Message-----
From: Wendell Beckwith [mailto:wbeckwith@gmail.com] 
Sent: 12 September 2005 21:15
To: Maven Users List
Subject: Re: [m2] packaging

maven-plugin is another.

On 9/12/05, Matthew Smalley <de...@smalley.e7even.com> wrote:
> 
> What's the different possible values for <packaging> in the POM? I've 
> seen examples of jar, war, ear - any others?
> 
> 
> ---------------------------------------------------------------------
> 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] packaging

Posted by Wendell Beckwith <wb...@gmail.com>.
maven-plugin is another.

On 9/12/05, Matthew Smalley <de...@smalley.e7even.com> wrote:
> 
> What's the different possible values for <packaging> in the POM? I've seen
> examples of jar, war, ear - any others?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>