While converting an existing project to use maven I ran into this issue. I needed to be able to provide a set of ant tasks that existed in the ant only version of the project.

My solution was to create a general purpose ant macrodef that could be used to ensure a project module was up to date, run mvn install if needed, provide access to project related data such as classpath and artifact file paths.

You can see this build.xml here: http://developer.ja-sig.org/source/browse/~raw,r=42472/jasigsvn/up2/trunk/build.xml Search for the maven-artifact-macro to see the raw macrodef and then below it you can see declarations of the macrodef for the specific modules in the project. The targets up at the top of the build make use of the specific macrodefs to ensure artifacts are built and up to date before doing there work.

I'd me more than happy to answer questions about this approach which has been working very well for us to provide both maven goals and ant tasks.
-Eric

Graham Leggett wrote:
On Thu, September 27, 2007 1:15 pm, Stefan Prange wrote:

I'm building an artifact with a mixture of ANT and Maven. The artifact has
the packaging type "war" but I need to have it wrapped also in an EAR
file.
Instead of creating a second EAR-Maven-Module I decided to have only one
module with an additional ANT build.xml file. The ANT file should let
Maven
build the WAR and after that do the EAR wrapping.

Is there a reason for this decision? The simplest way to handle ears and
wars is to have the war as an artifact, and the ear as an artifact, and
just let maven do everything for you.

What does building the ear yourself buy you?

Regards,
Graham
--



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to