• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Maven Build Script Problem

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a problem building my project with maven.I have to create a war file
containing a ejb jar and a war.
i have separate pom.xml for ejb project and a web project..
structure should be like this....

source project
.
.
......pom.xml
.
.
........ejb project
. .
. .
. .
. .......source code
. .
. .
. .......pom.xml
.
.
.
.
.........web project
.
.
.
.
.....source code
.
.
.
.....pom.xml


individually i am able to create ejb jar(ejb project) and war (web project).
but i want to do mvn install only on source project and it would bild the jar
(ejb project)and war(web project) and then(source project) create a ear in one
go.can any one suggest what modification i have to do on pom.xml of source project
for doing this and also web project has dependency on ejb project .Can any one please give me sample
example of source pom.how should it looks like
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is what I do. I create a master Maven project with three subprojects:one to build the WAR, one to build the JAR and one to build the EAR. Directory layout is similar to:

masterproject
masterproject/warproject
masterproject/ejbproject
masterproject/earproject

The pom.xml in masterproject calls the three subprojects. The pom.xml in the subprojects all reference the mastterproject as the parent project. When I run the masterproject pom.xml, it builds everything.
 
Deep Mukherjee
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you please give the sample pom of the parent project.....what are tags need tobe used....
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have a copy of Better Builds with Maven, right? Look in chapter 4, Building J2EE Applications, specifically section 4.3, Organizing the DayTrader Directory Structure. Or if you have Maven - The Definitive Guide, see chapter 6, A Multimodule Project; it's parent pom.xml is more complete.
 
Deep Mukherjee
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have another question,How can i inclue or exclude .java (source)file in the ejb jar or war file.I want to customize the source folder structure.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since that is a different question, you should start a new post.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic