You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mark <ja...@gmail.com> on 2006/03/22 15:51:24 UTC

Building a J2EE app under Maven 2

Is there any examples / articles on this ?

The artifacts I am looking to create a jar, war, and ear all with varying
resources in their respective META-INF folders ?

Mark.

Re: Building a J2EE app under Maven 2

Posted by Alexandre Poitras <al...@gmail.com>.
I am working on some documentation right now. If you want to see the
work in progress :
http://docs.codehaus.org/display/MAVENUSER/The+Maven+2+tutorial

On 3/22/06, Wayne Fay <wa...@gmail.com> wrote:
> this has all been "documented" in the email list multiple times
> but i'll agree it should be extracted and more officially documented
> on the Maven site somewhere
>
> also vincent m. has an onjava.com article from last year that talks
> about using maven1 for j2ee, a good bit of it is still relevant
> http://www.onjava.com/pub/a/onjava/2005/09/07/maven.html?page=1
>
> Wayne
>
>
> On 3/22/06, Mark <ja...@gmail.com> wrote:
> > I will - I guess I use the ear plugin to inculde the war since it's not
> > really a dependency ?
> >
> > Thanks guys - this needs to go on the maven site I guess ?
> >
> > On 22/03/06, Wayne Fay <wa...@gmail.com> wrote:
> > >
> > > Yes exactly. I have the following:
> > > project root
> > > -pom.xml
> > > -lib
> > > ++pom.xml
> > > -ejb
> > > ++pom.xml
> > > -war
> > > ++pom.xml
> > > -ear
> > > ++pom.xml
> > >
> > > So every directory has a pom.xml file that describes the files and
> > > dependencies for that directory, and each one has a different
> > > packaging type declared.
> > >
> > > So lib depends on a few external resources, ejb depends on lib plus a
> > > couple others, war depends on ejb and some others, and ear depends on
> > > war.
> > >
> > > This is roughly how you'd want to construct a J2EE app in Maven2.
> > >
> > > There have been a lot of discussions on J2EE in the users@ list,
> > > search the mailing list archives for examples of poms etc...
> > >
> > > Wayne
> > >
> > >
> > > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > > So I need to use more than one pom in a parent child relationship,
> > > defining
> > > > the child poms as modules in the parent pom ?
> > > >
> > > > Then everything should be OK because each module is it's own context
> > > > 'brilliant!'
> > > >
> > > > Then what you say about adding the inter-depencies makes sense too.
> > > >
> > > > Yann thanks for your time.
> > > >
> > > > ps I found this too:
> > > >
> > > >
> > > http://communitygrids.blogspot.com/2006/02/maven-2-notes-part-6-multiproject_06.html
> > > >
> > > > On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > > >
> > > > > Let Maven work for you ;)
> > > > >
> > > > > If you declare the JAR as a dependency in the WAR POM, the JAR will be
> > > > > included in the WAR. Same thing for EAR.
> > > > >
> > > > > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > > > >
> > > > > > Sure
> > > > > >
> > > > > > The ear contains the war and the war contains the jar .. but I'm
> > > getting
> > > > > > closer.
> > > > > >
> > > > > >
> > > > > > On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > > > > >
> > > > > > > I'm not sure to understand what you want to achieve. If you want
> > > to
> > > > > have
> > > > > > > some resources packaged in META-INF, just put them into :
> > > > > > > * src/main/resources/META-INF for JAR
> > > > > > > * src/main/webapp/META-INF for WAR
> > > > > > > * src/main/application/META-INF for EAR
> > > > > > >
> > > > > > > Can you explain what you mean about multiple nested artifacts ?
> > > > > > >
> > > > > > > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > > > > > >
> > > > > > > > That approach doesn't look good because I don't this one pom can
> > > > > > easily
> > > > > > > > creat multiple artifacts which are nested in some way ?
> > > > > > > >
> > > > > > > > Should I be looking at archetype ?
> > > > > > > >
> > > > > > > > On 22/03/06, Mark <ja...@gmail.com> wrote:
> > > > > > > >
> > > > > > > > >
> > > > > > > > > Well I started looking at the jar plugin first, and I couldn't
> > > see
> > > > > a
> > > > > > > way
> > > > > > > > > to limit what resources are added - not a problem for war or
> > > ear ?
> > > > > > > > >
> > > > > > > > > I suppose I could farm that out to ant ?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >  On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Mark,
> > > > > > > > > >
> > > > > > > > > > Did you check :
> > > > > > > > > > http://maven.apache.org/guides/mini/guide-webapp.html
> > > > > > > > > > http://maven.apache.org/plugins/maven-jar-plugin/
> > > > > > > > > > http://maven.apache.org/plugins/maven-war-plugin/
> > > > > > > > > > http://maven.apache.org/plugins/maven-ear-plugin/
> > > > > > > > > >
> > > > > > > > > > - Yann
> > > > > > > > > >
> > > > > > > > > > On 3/22/06, Mark <javamark@gmail.com > wrote:
> > > > > > > > > > >
> > > > > > > > > > > Is there any examples / articles on this ?
> > > > > > > > > > >
> > > > > > > > > > > The artifacts I am looking to create a jar, war, and ear
> > > all
> > > > > > with
> > > > > > > > > > varying
> > > > > > > > > > > resources in their respective META-INF folders ?
> > > > > > > > > > >
> > > > > > > > > > > Mark.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>


--
Alexandre Poitras
Québec, Canada

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


Re: Building a J2EE app under Maven 2

Posted by Wayne Fay <wa...@gmail.com>.
this has all been "documented" in the email list multiple times
but i'll agree it should be extracted and more officially documented
on the Maven site somewhere

also vincent m. has an onjava.com article from last year that talks
about using maven1 for j2ee, a good bit of it is still relevant
http://www.onjava.com/pub/a/onjava/2005/09/07/maven.html?page=1

Wayne


On 3/22/06, Mark <ja...@gmail.com> wrote:
> I will - I guess I use the ear plugin to inculde the war since it's not
> really a dependency ?
>
> Thanks guys - this needs to go on the maven site I guess ?
>
> On 22/03/06, Wayne Fay <wa...@gmail.com> wrote:
> >
> > Yes exactly. I have the following:
> > project root
> > -pom.xml
> > -lib
> > ++pom.xml
> > -ejb
> > ++pom.xml
> > -war
> > ++pom.xml
> > -ear
> > ++pom.xml
> >
> > So every directory has a pom.xml file that describes the files and
> > dependencies for that directory, and each one has a different
> > packaging type declared.
> >
> > So lib depends on a few external resources, ejb depends on lib plus a
> > couple others, war depends on ejb and some others, and ear depends on
> > war.
> >
> > This is roughly how you'd want to construct a J2EE app in Maven2.
> >
> > There have been a lot of discussions on J2EE in the users@ list,
> > search the mailing list archives for examples of poms etc...
> >
> > Wayne
> >
> >
> > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > So I need to use more than one pom in a parent child relationship,
> > defining
> > > the child poms as modules in the parent pom ?
> > >
> > > Then everything should be OK because each module is it's own context
> > > 'brilliant!'
> > >
> > > Then what you say about adding the inter-depencies makes sense too.
> > >
> > > Yann thanks for your time.
> > >
> > > ps I found this too:
> > >
> > >
> > http://communitygrids.blogspot.com/2006/02/maven-2-notes-part-6-multiproject_06.html
> > >
> > > On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > >
> > > > Let Maven work for you ;)
> > > >
> > > > If you declare the JAR as a dependency in the WAR POM, the JAR will be
> > > > included in the WAR. Same thing for EAR.
> > > >
> > > > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > > >
> > > > > Sure
> > > > >
> > > > > The ear contains the war and the war contains the jar .. but I'm
> > getting
> > > > > closer.
> > > > >
> > > > >
> > > > > On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > > > >
> > > > > > I'm not sure to understand what you want to achieve. If you want
> > to
> > > > have
> > > > > > some resources packaged in META-INF, just put them into :
> > > > > > * src/main/resources/META-INF for JAR
> > > > > > * src/main/webapp/META-INF for WAR
> > > > > > * src/main/application/META-INF for EAR
> > > > > >
> > > > > > Can you explain what you mean about multiple nested artifacts ?
> > > > > >
> > > > > > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > > > > >
> > > > > > > That approach doesn't look good because I don't this one pom can
> > > > > easily
> > > > > > > creat multiple artifacts which are nested in some way ?
> > > > > > >
> > > > > > > Should I be looking at archetype ?
> > > > > > >
> > > > > > > On 22/03/06, Mark <ja...@gmail.com> wrote:
> > > > > > >
> > > > > > > >
> > > > > > > > Well I started looking at the jar plugin first, and I couldn't
> > see
> > > > a
> > > > > > way
> > > > > > > > to limit what resources are added - not a problem for war or
> > ear ?
> > > > > > > >
> > > > > > > > I suppose I could farm that out to ant ?
> > > > > > > >
> > > > > > > >
> > > > > > > >  On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > > > > > > >
> > > > > > > > > Hi Mark,
> > > > > > > > >
> > > > > > > > > Did you check :
> > > > > > > > > http://maven.apache.org/guides/mini/guide-webapp.html
> > > > > > > > > http://maven.apache.org/plugins/maven-jar-plugin/
> > > > > > > > > http://maven.apache.org/plugins/maven-war-plugin/
> > > > > > > > > http://maven.apache.org/plugins/maven-ear-plugin/
> > > > > > > > >
> > > > > > > > > - Yann
> > > > > > > > >
> > > > > > > > > On 3/22/06, Mark <javamark@gmail.com > wrote:
> > > > > > > > > >
> > > > > > > > > > Is there any examples / articles on this ?
> > > > > > > > > >
> > > > > > > > > > The artifacts I am looking to create a jar, war, and ear
> > all
> > > > > with
> > > > > > > > > varying
> > > > > > > > > > resources in their respective META-INF folders ?
> > > > > > > > > >
> > > > > > > > > > Mark.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
>

Re: Building a J2EE app under Maven 2

Posted by Mark <ja...@gmail.com>.
yeah - I was missing <type>*war*</type> in my ear dependency list so it was
looking for a jar to add !


On 22/03/06, Mark <ja...@gmail.com> wrote:
>
> Falling at the last fence - including the war in the ear ?
>
>
>
>
>
> On 22/03/06, Mark <ja...@gmail.com> wrote:
> >
> > I will - I guess I use the ear plugin to inculde the war since it's not
> > really a dependency ?
> >
> > Thanks guys - this needs to go on the maven site I guess ?
> >
> >  On 22/03/06, Wayne Fay <wa...@gmail.com> wrote:
> > >
> > > Yes exactly. I have the following:
> > > project root
> > > -pom.xml
> > > -lib
> > > ++pom.xml
> > > -ejb
> > > ++pom.xml
> > > -war
> > > ++pom.xml
> > > -ear
> > > ++pom.xml
> > >
> > > So every directory has a pom.xml file that describes the files and
> > > dependencies for that directory, and each one has a different
> > > packaging type declared.
> > >
> > > So lib depends on a few external resources, ejb depends on lib plus a
> > > couple others, war depends on ejb and some others, and ear depends on
> > > war.
> > >
> > > This is roughly how you'd want to construct a J2EE app in Maven2.
> > >
> > > There have been a lot of discussions on J2EE in the users@ list,
> > > search the mailing list archives for examples of poms etc...
> > >
> > > Wayne
> > >
> > >
> > > On 3/22/06, Mark <javamark@gmail.com > wrote:
> > > > So I need to use more than one pom in a parent child relationship,
> > > defining
> > > > the child poms as modules in the parent pom ?
> > > >
> > > > Then everything should be OK because each module is it's own context
> > >
> > > > 'brilliant!'
> > > >
> > > > Then what you say about adding the inter-depencies makes sense too.
> > > >
> > > > Yann thanks for your time.
> > > >
> > > > ps I found this too:
> > > >
> > > > http://communitygrids.blogspot.com/2006/02/maven-2-notes-part-6-multiproject_06.html
> > >
> > > >
> > > > On 22/03/06, Yann Le Du < le.du.yann@gmail.com> wrote:
> > > > >
> > > > > Let Maven work for you ;)
> > > > >
> > > > > If you declare the JAR as a dependency in the WAR POM, the JAR
> > > will be
> > > > > included in the WAR. Same thing for EAR.
> > > > >
> > > > > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > > > >
> > > > > > Sure
> > > > > >
> > > > > > The ear contains the war and the war contains the jar .. but I'm
> > > getting
> > > > > > closer.
> > > > > >
> > > > > >
> > > > > > On 22/03/06, Yann Le Du < le.du.yann@gmail.com> wrote:
> > > > > > >
> > > > > > > I'm not sure to understand what you want to achieve. If you
> > > want to
> > > > > have
> > > > > > > some resources packaged in META-INF, just put them into :
> > > > > > > * src/main/resources/META-INF for JAR
> > > > > > > * src/main/webapp/META-INF for WAR
> > > > > > > * src/main/application/META-INF for EAR
> > > > > > >
> > > > > > > Can you explain what you mean about multiple nested artifacts
> > > ?
> > > > > > >
> > > > > > > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > > > > > >
> > > > > > > > That approach doesn't look good because I don't this one pom
> > > can
> > > > > > easily
> > > > > > > > creat multiple artifacts which are nested in some way ?
> > > > > > > >
> > > > > > > > Should I be looking at archetype ?
> > > > > > > >
> > > > > > > > On 22/03/06, Mark < javamark@gmail.com> wrote:
> > > > > > > >
> > > > > > > > >
> > > > > > > > > Well I started looking at the jar plugin first, and I
> > > couldn't see
> > > > > a
> > > > > > > way
> > > > > > > > > to limit what resources are added - not a problem for war
> > > or ear ?
> > > > > > > > >
> > > > > > > > > I suppose I could farm that out to ant ?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >  On 22/03/06, Yann Le Du <le.du.yann@gmail.com > wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Mark,
> > > > > > > > > >
> > > > > > > > > > Did you check :
> > > > > > > > > > http://maven.apache.org/guides/mini/guide-webapp.html
> > > > > > > > > > http://maven.apache.org/plugins/maven-jar-plugin/
> > > > > > > > > > http://maven.apache.org/plugins/maven-war-plugin/
> > > > > > > > > > http://maven.apache.org/plugins/maven-ear-plugin/
> > > > > > > > > >
> > > > > > > > > > - Yann
> > > > > > > > > >
> > > > > > > > > > On 3/22/06, Mark < javamark@gmail.com > wrote:
> > > > > > > > > > >
> > > > > > > > > > > Is there any examples / articles on this ?
> > > > > > > > > > >
> > > > > > > > > > > The artifacts I am looking to create a jar, war, and
> > > ear all
> > > > > > with
> > > > > > > > > > varying
> > > > > > > > > > > resources in their respective META-INF folders ?
> > > > > > > > > > >
> > > > > > > > > > > Mark.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>

Re: Building a J2EE app under Maven 2

Posted by Mark <ja...@gmail.com>.
Falling at the last fence - including the war in the ear ?





On 22/03/06, Mark <ja...@gmail.com> wrote:
>
> I will - I guess I use the ear plugin to inculde the war since it's not
> really a dependency ?
>
> Thanks guys - this needs to go on the maven site I guess ?
>
>  On 22/03/06, Wayne Fay <wa...@gmail.com> wrote:
> >
> > Yes exactly. I have the following:
> > project root
> > -pom.xml
> > -lib
> > ++pom.xml
> > -ejb
> > ++pom.xml
> > -war
> > ++pom.xml
> > -ear
> > ++pom.xml
> >
> > So every directory has a pom.xml file that describes the files and
> > dependencies for that directory, and each one has a different
> > packaging type declared.
> >
> > So lib depends on a few external resources, ejb depends on lib plus a
> > couple others, war depends on ejb and some others, and ear depends on
> > war.
> >
> > This is roughly how you'd want to construct a J2EE app in Maven2.
> >
> > There have been a lot of discussions on J2EE in the users@ list,
> > search the mailing list archives for examples of poms etc...
> >
> > Wayne
> >
> >
> > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > So I need to use more than one pom in a parent child relationship,
> > defining
> > > the child poms as modules in the parent pom ?
> > >
> > > Then everything should be OK because each module is it's own context
> > > 'brilliant!'
> > >
> > > Then what you say about adding the inter-depencies makes sense too.
> > >
> > > Yann thanks for your time.
> > >
> > > ps I found this too:
> > >
> > > http://communitygrids.blogspot.com/2006/02/maven-2-notes-part-6-multiproject_06.html
> >
> > >
> > > On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > >
> > > > Let Maven work for you ;)
> > > >
> > > > If you declare the JAR as a dependency in the WAR POM, the JAR will
> > be
> > > > included in the WAR. Same thing for EAR.
> > > >
> > > > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > > >
> > > > > Sure
> > > > >
> > > > > The ear contains the war and the war contains the jar .. but I'm
> > getting
> > > > > closer.
> > > > >
> > > > >
> > > > > On 22/03/06, Yann Le Du < le.du.yann@gmail.com> wrote:
> > > > > >
> > > > > > I'm not sure to understand what you want to achieve. If you want
> > to
> > > > have
> > > > > > some resources packaged in META-INF, just put them into :
> > > > > > * src/main/resources/META-INF for JAR
> > > > > > * src/main/webapp/META-INF for WAR
> > > > > > * src/main/application/META-INF for EAR
> > > > > >
> > > > > > Can you explain what you mean about multiple nested artifacts ?
> > > > > >
> > > > > > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > > > > >
> > > > > > > That approach doesn't look good because I don't this one pom
> > can
> > > > > easily
> > > > > > > creat multiple artifacts which are nested in some way ?
> > > > > > >
> > > > > > > Should I be looking at archetype ?
> > > > > > >
> > > > > > > On 22/03/06, Mark <ja...@gmail.com> wrote:
> > > > > > >
> > > > > > > >
> > > > > > > > Well I started looking at the jar plugin first, and I
> > couldn't see
> > > > a
> > > > > > way
> > > > > > > > to limit what resources are added - not a problem for war or
> > ear ?
> > > > > > > >
> > > > > > > > I suppose I could farm that out to ant ?
> > > > > > > >
> > > > > > > >
> > > > > > > >  On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > > > > > > >
> > > > > > > > > Hi Mark,
> > > > > > > > >
> > > > > > > > > Did you check :
> > > > > > > > > http://maven.apache.org/guides/mini/guide-webapp.html
> > > > > > > > > http://maven.apache.org/plugins/maven-jar-plugin/
> > > > > > > > > http://maven.apache.org/plugins/maven-war-plugin/
> > > > > > > > > http://maven.apache.org/plugins/maven-ear-plugin/
> > > > > > > > >
> > > > > > > > > - Yann
> > > > > > > > >
> > > > > > > > > On 3/22/06, Mark < javamark@gmail.com > wrote:
> > > > > > > > > >
> > > > > > > > > > Is there any examples / articles on this ?
> > > > > > > > > >
> > > > > > > > > > The artifacts I am looking to create a jar, war, and ear
> > all
> > > > > with
> > > > > > > > > varying
> > > > > > > > > > resources in their respective META-INF folders ?
> > > > > > > > > >
> > > > > > > > > > Mark.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
>

Re: Building a J2EE app under Maven 2

Posted by Mark <ja...@gmail.com>.
I will - I guess I use the ear plugin to inculde the war since it's not
really a dependency ?

Thanks guys - this needs to go on the maven site I guess ?

On 22/03/06, Wayne Fay <wa...@gmail.com> wrote:
>
> Yes exactly. I have the following:
> project root
> -pom.xml
> -lib
> ++pom.xml
> -ejb
> ++pom.xml
> -war
> ++pom.xml
> -ear
> ++pom.xml
>
> So every directory has a pom.xml file that describes the files and
> dependencies for that directory, and each one has a different
> packaging type declared.
>
> So lib depends on a few external resources, ejb depends on lib plus a
> couple others, war depends on ejb and some others, and ear depends on
> war.
>
> This is roughly how you'd want to construct a J2EE app in Maven2.
>
> There have been a lot of discussions on J2EE in the users@ list,
> search the mailing list archives for examples of poms etc...
>
> Wayne
>
>
> On 3/22/06, Mark <ja...@gmail.com> wrote:
> > So I need to use more than one pom in a parent child relationship,
> defining
> > the child poms as modules in the parent pom ?
> >
> > Then everything should be OK because each module is it's own context
> > 'brilliant!'
> >
> > Then what you say about adding the inter-depencies makes sense too.
> >
> > Yann thanks for your time.
> >
> > ps I found this too:
> >
> >
> http://communitygrids.blogspot.com/2006/02/maven-2-notes-part-6-multiproject_06.html
> >
> > On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > >
> > > Let Maven work for you ;)
> > >
> > > If you declare the JAR as a dependency in the WAR POM, the JAR will be
> > > included in the WAR. Same thing for EAR.
> > >
> > > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > >
> > > > Sure
> > > >
> > > > The ear contains the war and the war contains the jar .. but I'm
> getting
> > > > closer.
> > > >
> > > >
> > > > On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > > >
> > > > > I'm not sure to understand what you want to achieve. If you want
> to
> > > have
> > > > > some resources packaged in META-INF, just put them into :
> > > > > * src/main/resources/META-INF for JAR
> > > > > * src/main/webapp/META-INF for WAR
> > > > > * src/main/application/META-INF for EAR
> > > > >
> > > > > Can you explain what you mean about multiple nested artifacts ?
> > > > >
> > > > > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > > > >
> > > > > > That approach doesn't look good because I don't this one pom can
> > > > easily
> > > > > > creat multiple artifacts which are nested in some way ?
> > > > > >
> > > > > > Should I be looking at archetype ?
> > > > > >
> > > > > > On 22/03/06, Mark <ja...@gmail.com> wrote:
> > > > > >
> > > > > > >
> > > > > > > Well I started looking at the jar plugin first, and I couldn't
> see
> > > a
> > > > > way
> > > > > > > to limit what resources are added - not a problem for war or
> ear ?
> > > > > > >
> > > > > > > I suppose I could farm that out to ant ?
> > > > > > >
> > > > > > >
> > > > > > >  On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > > > > > >
> > > > > > > > Hi Mark,
> > > > > > > >
> > > > > > > > Did you check :
> > > > > > > > http://maven.apache.org/guides/mini/guide-webapp.html
> > > > > > > > http://maven.apache.org/plugins/maven-jar-plugin/
> > > > > > > > http://maven.apache.org/plugins/maven-war-plugin/
> > > > > > > > http://maven.apache.org/plugins/maven-ear-plugin/
> > > > > > > >
> > > > > > > > - Yann
> > > > > > > >
> > > > > > > > On 3/22/06, Mark <javamark@gmail.com > wrote:
> > > > > > > > >
> > > > > > > > > Is there any examples / articles on this ?
> > > > > > > > >
> > > > > > > > > The artifacts I am looking to create a jar, war, and ear
> all
> > > > with
> > > > > > > > varying
> > > > > > > > > resources in their respective META-INF folders ?
> > > > > > > > >
> > > > > > > > > Mark.
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>

Re: Building a J2EE app under Maven 2

Posted by Wayne Fay <wa...@gmail.com>.
Yes exactly. I have the following:
project root
-pom.xml
-lib
++pom.xml
-ejb
++pom.xml
-war
++pom.xml
-ear
++pom.xml

So every directory has a pom.xml file that describes the files and
dependencies for that directory, and each one has a different
packaging type declared.

So lib depends on a few external resources, ejb depends on lib plus a
couple others, war depends on ejb and some others, and ear depends on
war.

This is roughly how you'd want to construct a J2EE app in Maven2.

There have been a lot of discussions on J2EE in the users@ list,
search the mailing list archives for examples of poms etc...

Wayne


On 3/22/06, Mark <ja...@gmail.com> wrote:
> So I need to use more than one pom in a parent child relationship, defining
> the child poms as modules in the parent pom ?
>
> Then everything should be OK because each module is it's own context
> 'brilliant!'
>
> Then what you say about adding the inter-depencies makes sense too.
>
> Yann thanks for your time.
>
> ps I found this too:
>
> http://communitygrids.blogspot.com/2006/02/maven-2-notes-part-6-multiproject_06.html
>
> On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> >
> > Let Maven work for you ;)
> >
> > If you declare the JAR as a dependency in the WAR POM, the JAR will be
> > included in the WAR. Same thing for EAR.
> >
> > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > >
> > > Sure
> > >
> > > The ear contains the war and the war contains the jar .. but I'm getting
> > > closer.
> > >
> > >
> > > On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > >
> > > > I'm not sure to understand what you want to achieve. If you want to
> > have
> > > > some resources packaged in META-INF, just put them into :
> > > > * src/main/resources/META-INF for JAR
> > > > * src/main/webapp/META-INF for WAR
> > > > * src/main/application/META-INF for EAR
> > > >
> > > > Can you explain what you mean about multiple nested artifacts ?
> > > >
> > > > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > > >
> > > > > That approach doesn't look good because I don't this one pom can
> > > easily
> > > > > creat multiple artifacts which are nested in some way ?
> > > > >
> > > > > Should I be looking at archetype ?
> > > > >
> > > > > On 22/03/06, Mark <ja...@gmail.com> wrote:
> > > > >
> > > > > >
> > > > > > Well I started looking at the jar plugin first, and I couldn't see
> > a
> > > > way
> > > > > > to limit what resources are added - not a problem for war or ear ?
> > > > > >
> > > > > > I suppose I could farm that out to ant ?
> > > > > >
> > > > > >
> > > > > >  On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > > > > >
> > > > > > > Hi Mark,
> > > > > > >
> > > > > > > Did you check :
> > > > > > > http://maven.apache.org/guides/mini/guide-webapp.html
> > > > > > > http://maven.apache.org/plugins/maven-jar-plugin/
> > > > > > > http://maven.apache.org/plugins/maven-war-plugin/
> > > > > > > http://maven.apache.org/plugins/maven-ear-plugin/
> > > > > > >
> > > > > > > - Yann
> > > > > > >
> > > > > > > On 3/22/06, Mark <javamark@gmail.com > wrote:
> > > > > > > >
> > > > > > > > Is there any examples / articles on this ?
> > > > > > > >
> > > > > > > > The artifacts I am looking to create a jar, war, and ear all
> > > with
> > > > > > > varying
> > > > > > > > resources in their respective META-INF folders ?
> > > > > > > >
> > > > > > > > Mark.
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Re: Building a J2EE app under Maven 2

Posted by Mark <ja...@gmail.com>.
So I need to use more than one pom in a parent child relationship, defining
the child poms as modules in the parent pom ?

Then everything should be OK because each module is it's own context
'brilliant!'

Then what you say about adding the inter-depencies makes sense too.

Yann thanks for your time.

ps I found this too:

http://communitygrids.blogspot.com/2006/02/maven-2-notes-part-6-multiproject_06.html

On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
>
> Let Maven work for you ;)
>
> If you declare the JAR as a dependency in the WAR POM, the JAR will be
> included in the WAR. Same thing for EAR.
>
> On 3/22/06, Mark <ja...@gmail.com> wrote:
> >
> > Sure
> >
> > The ear contains the war and the war contains the jar .. but I'm getting
> > closer.
> >
> >
> > On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > >
> > > I'm not sure to understand what you want to achieve. If you want to
> have
> > > some resources packaged in META-INF, just put them into :
> > > * src/main/resources/META-INF for JAR
> > > * src/main/webapp/META-INF for WAR
> > > * src/main/application/META-INF for EAR
> > >
> > > Can you explain what you mean about multiple nested artifacts ?
> > >
> > > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > > >
> > > > That approach doesn't look good because I don't this one pom can
> > easily
> > > > creat multiple artifacts which are nested in some way ?
> > > >
> > > > Should I be looking at archetype ?
> > > >
> > > > On 22/03/06, Mark <ja...@gmail.com> wrote:
> > > >
> > > > >
> > > > > Well I started looking at the jar plugin first, and I couldn't see
> a
> > > way
> > > > > to limit what resources are added - not a problem for war or ear ?
> > > > >
> > > > > I suppose I could farm that out to ant ?
> > > > >
> > > > >
> > > > >  On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > > > >
> > > > > > Hi Mark,
> > > > > >
> > > > > > Did you check :
> > > > > > http://maven.apache.org/guides/mini/guide-webapp.html
> > > > > > http://maven.apache.org/plugins/maven-jar-plugin/
> > > > > > http://maven.apache.org/plugins/maven-war-plugin/
> > > > > > http://maven.apache.org/plugins/maven-ear-plugin/
> > > > > >
> > > > > > - Yann
> > > > > >
> > > > > > On 3/22/06, Mark <javamark@gmail.com > wrote:
> > > > > > >
> > > > > > > Is there any examples / articles on this ?
> > > > > > >
> > > > > > > The artifacts I am looking to create a jar, war, and ear all
> > with
> > > > > > varying
> > > > > > > resources in their respective META-INF folders ?
> > > > > > >
> > > > > > > Mark.
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Re: Building a J2EE app under Maven 2

Posted by Yann Le Du <le...@gmail.com>.
Let Maven work for you ;)

If you declare the JAR as a dependency in the WAR POM, the JAR will be
included in the WAR. Same thing for EAR.

On 3/22/06, Mark <ja...@gmail.com> wrote:
>
> Sure
>
> The ear contains the war and the war contains the jar .. but I'm getting
> closer.
>
>
> On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> >
> > I'm not sure to understand what you want to achieve. If you want to have
> > some resources packaged in META-INF, just put them into :
> > * src/main/resources/META-INF for JAR
> > * src/main/webapp/META-INF for WAR
> > * src/main/application/META-INF for EAR
> >
> > Can you explain what you mean about multiple nested artifacts ?
> >
> > On 3/22/06, Mark <ja...@gmail.com> wrote:
> > >
> > > That approach doesn't look good because I don't this one pom can
> easily
> > > creat multiple artifacts which are nested in some way ?
> > >
> > > Should I be looking at archetype ?
> > >
> > > On 22/03/06, Mark <ja...@gmail.com> wrote:
> > >
> > > >
> > > > Well I started looking at the jar plugin first, and I couldn't see a
> > way
> > > > to limit what resources are added - not a problem for war or ear ?
> > > >
> > > > I suppose I could farm that out to ant ?
> > > >
> > > >
> > > >  On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > > >
> > > > > Hi Mark,
> > > > >
> > > > > Did you check :
> > > > > http://maven.apache.org/guides/mini/guide-webapp.html
> > > > > http://maven.apache.org/plugins/maven-jar-plugin/
> > > > > http://maven.apache.org/plugins/maven-war-plugin/
> > > > > http://maven.apache.org/plugins/maven-ear-plugin/
> > > > >
> > > > > - Yann
> > > > >
> > > > > On 3/22/06, Mark <javamark@gmail.com > wrote:
> > > > > >
> > > > > > Is there any examples / articles on this ?
> > > > > >
> > > > > > The artifacts I am looking to create a jar, war, and ear all
> with
> > > > > varying
> > > > > > resources in their respective META-INF folders ?
> > > > > >
> > > > > > Mark.
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
> >
>
>

Re: Building a J2EE app under Maven 2

Posted by Mark <ja...@gmail.com>.
Sure

The ear contains the war and the war contains the jar .. but I'm getting
closer.


On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
>
> I'm not sure to understand what you want to achieve. If you want to have
> some resources packaged in META-INF, just put them into :
> * src/main/resources/META-INF for JAR
> * src/main/webapp/META-INF for WAR
> * src/main/application/META-INF for EAR
>
> Can you explain what you mean about multiple nested artifacts ?
>
> On 3/22/06, Mark <ja...@gmail.com> wrote:
> >
> > That approach doesn't look good because I don't this one pom can easily
> > creat multiple artifacts which are nested in some way ?
> >
> > Should I be looking at archetype ?
> >
> > On 22/03/06, Mark <ja...@gmail.com> wrote:
> >
> > >
> > > Well I started looking at the jar plugin first, and I couldn't see a
> way
> > > to limit what resources are added - not a problem for war or ear ?
> > >
> > > I suppose I could farm that out to ant ?
> > >
> > >
> > >  On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > > >
> > > > Hi Mark,
> > > >
> > > > Did you check :
> > > > http://maven.apache.org/guides/mini/guide-webapp.html
> > > > http://maven.apache.org/plugins/maven-jar-plugin/
> > > > http://maven.apache.org/plugins/maven-war-plugin/
> > > > http://maven.apache.org/plugins/maven-ear-plugin/
> > > >
> > > > - Yann
> > > >
> > > > On 3/22/06, Mark <javamark@gmail.com > wrote:
> > > > >
> > > > > Is there any examples / articles on this ?
> > > > >
> > > > > The artifacts I am looking to create a jar, war, and ear all with
> > > > varying
> > > > > resources in their respective META-INF folders ?
> > > > >
> > > > > Mark.
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>
>

Re: Building a J2EE app under Maven 2

Posted by Yann Le Du <le...@gmail.com>.
I'm not sure to understand what you want to achieve. If you want to have
some resources packaged in META-INF, just put them into :
* src/main/resources/META-INF for JAR
* src/main/webapp/META-INF for WAR
* src/main/application/META-INF for EAR

Can you explain what you mean about multiple nested artifacts ?

On 3/22/06, Mark <ja...@gmail.com> wrote:
>
> That approach doesn't look good because I don't this one pom can easily
> creat multiple artifacts which are nested in some way ?
>
> Should I be looking at archetype ?
>
> On 22/03/06, Mark <ja...@gmail.com> wrote:
>
> >
> > Well I started looking at the jar plugin first, and I couldn't see a way
> > to limit what resources are added - not a problem for war or ear ?
> >
> > I suppose I could farm that out to ant ?
> >
> >
> >  On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> > >
> > > Hi Mark,
> > >
> > > Did you check :
> > > http://maven.apache.org/guides/mini/guide-webapp.html
> > > http://maven.apache.org/plugins/maven-jar-plugin/
> > > http://maven.apache.org/plugins/maven-war-plugin/
> > > http://maven.apache.org/plugins/maven-ear-plugin/
> > >
> > > - Yann
> > >
> > > On 3/22/06, Mark <javamark@gmail.com > wrote:
> > > >
> > > > Is there any examples / articles on this ?
> > > >
> > > > The artifacts I am looking to create a jar, war, and ear all with
> > > varying
> > > > resources in their respective META-INF folders ?
> > > >
> > > > Mark.
> > > >
> > > >
> > >
> > >
> >
>
>

Re: Building a J2EE app under Maven 2

Posted by Mark <ja...@gmail.com>.
That approach doesn't look good because I don't this one pom can easily
creat multiple artifacts which are nested in some way ?

Should I be looking at archetype ?

On 22/03/06, Mark <ja...@gmail.com> wrote:

>
> Well I started looking at the jar plugin first, and I couldn't see a way
> to limit what resources are added - not a problem for war or ear ?
>
> I suppose I could farm that out to ant ?
>
>
>  On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
> >
> > Hi Mark,
> >
> > Did you check :
> > http://maven.apache.org/guides/mini/guide-webapp.html
> > http://maven.apache.org/plugins/maven-jar-plugin/
> > http://maven.apache.org/plugins/maven-war-plugin/
> > http://maven.apache.org/plugins/maven-ear-plugin/
> >
> > - Yann
> >
> > On 3/22/06, Mark <javamark@gmail.com > wrote:
> > >
> > > Is there any examples / articles on this ?
> > >
> > > The artifacts I am looking to create a jar, war, and ear all with
> > varying
> > > resources in their respective META-INF folders ?
> > >
> > > Mark.
> > >
> > >
> >
> >
>

Re: Building a J2EE app under Maven 2

Posted by Mark <ja...@gmail.com>.
Well I started looking at the jar plugin first, and I couldn't see a way
to limit what resources are added - not a problem for war or ear ?

I suppose I could farm that out to ant ?


On 22/03/06, Yann Le Du <le...@gmail.com> wrote:
>
> Hi Mark,
>
> Did you check :
> http://maven.apache.org/guides/mini/guide-webapp.html
> http://maven.apache.org/plugins/maven-jar-plugin/
> http://maven.apache.org/plugins/maven-war-plugin/
> http://maven.apache.org/plugins/maven-ear-plugin/
>
> - Yann
>
> On 3/22/06, Mark <ja...@gmail.com> wrote:
> >
> > Is there any examples / articles on this ?
> >
> > The artifacts I am looking to create a jar, war, and ear all with
> varying
> > resources in their respective META-INF folders ?
> >
> > Mark.
> >
> >
>
>

Re: Building a J2EE app under Maven 2

Posted by Yann Le Du <le...@gmail.com>.
Hi Mark,

Did you check :
http://maven.apache.org/guides/mini/guide-webapp.html
http://maven.apache.org/plugins/maven-jar-plugin/
http://maven.apache.org/plugins/maven-war-plugin/
http://maven.apache.org/plugins/maven-ear-plugin/

- Yann

On 3/22/06, Mark <ja...@gmail.com> wrote:
>
> Is there any examples / articles on this ?
>
> The artifacts I am looking to create a jar, war, and ear all with varying
> resources in their respective META-INF folders ?
>
> Mark.
>
>