My 2 cents.
While you could probably figure out a way to do this you won't be doing
yourself any favors. One of the strengths of using Maven is having a
common build methodology so that developers can just come in and start
working without learning how your custom build works. For example, I was
kind of upset when I went to build a project here at Apache and mvn
install tried to build the web site for the project and failed. Then you
have to go searching around in their poms to try to figure out how to
get the thing to work without doing that since all I wanted was the jar
in my local repo.
In your case, developers are going to expect that modules 1 and 2 have
their own target directory and their own build artifact. The main module
would then have a dependency on modules 1 and 2 and could create the ear.
I would suggest looking at
http://www.sonatype.com/book/reference/public-book.html#. Chapters 6 & 7
discuss multi-project builds.
munlubb wrote:
Hello,
I has been evaluating Maven to start using it to replace our existing Ant
build scripts. To give you a background:
- My work is such that I have multiple projects that I do for multiple
customers but the nature of the project is mostly the same. I basically
customize a base product of a particular company and integrate or modify the
base code.
- The folder structure is such that I have a project lets say:
---PROJECT1
|
----Module1
|
---- New Java/EJB classes
|
---- New JSPs and war components
|
-----Module2 (similar structure)
|
-----MAIN MODULE
|
----- Modifications to the base product Java classes
|
----- Modifications to the base product JSPs
|
------Promoted JSPs and Java classes from modules
above.
- Currently, my ant build scripts, promote the JSPs and compiled java
classes from ALL the modules in to the MAIN MODULE where everything
(including the JSPs and Java classes of the MAIN Module and the promoted
ones) are packaged into One EAR file.
- I would like to get a suggestion or a best way to migrate to the Maven
structure so that there are minimal changes to the folder structure and I am
able to accomplish my task of creating one customized EAR file.
Can you please guide me for the best practise to follow to help me migrate
to Maven 2.
Thanks
Shilpa
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]