You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Lawrie Gallardo <la...@hotmail.com> on 2005/11/02 10:08:39 UTC

Example Ant 1.6 build files for project with multiple WAR and JAR modules?

Hi,

I need to put together Ant 1.6 build files for a project which will have an 
EAR module and several WAR and JAR modules. I ideally want to make good use 
of Ant 1.6 features such as import, macrodef and subant tasks to produce a 
common build file (which each individual module's build file can then import 
and override), a master build file, and a release build file. To avoid 
re-inventing the wheel, I have tried to find an open source project with 
suitable build files to use as a starting block, but I have not been able to 
find anything that fits the bill.

Does anyone know of an open source project with build files that would be 
worth me taking a look at?

Or has anybody already put together something along these lines for an 
existing project? If so, I'd be incredibly grateful if you could mail me a 
copy of these build files so that I could use them as a starting point to 
adapt and amend to fit my project's requirements. I know this sounds a bit 
cheeky, but I'd really like to avoid the unproductive effort of starting 
completely from scratch and re-inventing the wheel...

Thanks in advance,

Lawrie.
eMail: lawriegallardo at hotmail dot com

_________________________________________________________________
MSN Messenger 7.5 is now out. Download it for FREE here. 
http://messenger.msn.co.uk


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Example Ant 1.6 build files for project with multiple WAR and JAR modules?

Posted by Yves Martin <yv...@elca.ch>.
"Lawrie Gallardo" <la...@hotmail.com> writes:

> Hi,
>
> I need to put together Ant 1.6 build files for a project which will have an EAR
> module and several WAR and JAR modules. I ideally want to make good use of Ant
> 1.6 features such as import, macrodef and subant tasks to produce a common
> build file (which each individual module's build file can then import and
> override), a master build file, and a release build file. To avoid re-inventing
> the wheel, I have tried to find an open source project with suitable build
> files to use as a starting block, but I have not been able to find anything
> that fits the bill.
>
> Does anyone know of an open source project with build files that would be
> worth me taking a look at?

  To avoid to re-invent the wheel, I have designed a light buildsystem 'EL4Ant'
  with modules, dependencies and execution target (for the company I work in
  and then open source). It is really easy to extend with your own targets
  thanks to plugins.

  I really think the code itself is easy to understand (easier than Maven) for
  a Ant user because everything is pure Java and Ant tasks.

    http://sourceforge.net/projects/el4ant/

  It is usable (since january) but I'm aware many improvements are possible.

-- 
Yves Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: *****spam***** Re: Example Ant 1.6 build files for project with multiple WAR and JAR modules?

Posted by Geoffrey Mitchell <ga...@imail.kwcorp.com>.
> XDoclet 1.2.x doesnt work on java1.5???
>
> I had no idea - I had to stick with java1.4 on my last project. 
> Ignorance is bliss, as they say...
>
> You got me scurrying to Google, though, and there would now appear to 
> be an XJavaDoc snapshot release which lets you use XDoclet 1.2.x with 
> Java 1.5., although it wasn't immediately apparent whether this just 
> meant that XDoclet would crash if your non-annotated code uses Java 
> 1.5 features, or whether you could actually annotate Java1.5 
> constructs like fields using generics.
>
>
xjavadoc 1.5-snapshot050611 (and presumably later) supports 1.5 syntax 
in-so-far as it will no longer consider it a syntax error.  Ejbdoclet 
will still not recognize that you have defined an interface to use 
generics.  If you have a method in your EJB class that returns 
List<Foo>, ejbdoclet will generate a remote interface which returns List. 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Example Ant 1.6 build files for project with multiple WAR and JAR modules?

Posted by Steve Loughran <st...@apache.org>.
Lawrie Gallardo wrote:
>> Steve Loughran wrote:
>>
>>>> <item type="gratuitous product placement" entry="2" >
>>>>
>>>> As and when I complete the second edition of Java development with 
>>>> Ant (yes, I am behind schedule), there will be some sample stuff 
>>>> that does it more simply. I havent written the target to zip up all 
>>>> the source tree to provide an example, but I could do that in the 
>>>> next couple of days if you'd like.
>>>>
>>>> </item>
>>>
>>>
>>>
>>> Thanks, Steve, that would be incredibly helpful if you could.
>>>
>>> BTW I'm really looking forward to the book, so I hope you haven't got 
>>> too much left to do!
>>>
>>
>> well, the 'big project' chapter did take about 10 weeks all in; it is 
>> probably so big that it should split into two.
>>
>> But I'm backing off from any XDoclet coverage because
>>  -XDoclet 1.2.x doesnt work on java1.5
>>  -XDoclet 2.0 isnt there yet
>>  -Java 5 annotations threaten the value of the tool
> 
> 
> XDoclet 1.2.x doesnt work on java1.5???
> 
> I had no idea - I had to stick with java1.4 on my last project. 
> Ignorance is bliss, as they say...
> 
> You got me scurrying to Google, though, and there would now appear to be 
> an XJavaDoc snapshot release which lets you use XDoclet 1.2.x with Java 
> 1.5., although it wasn't immediately apparent whether this just meant 
> that XDoclet would crash if your non-annotated code uses Java 1.5 
> features, or whether you could actually annotate Java1.5 constructs like 
> fields using generics.


XDoclet CVS_HEAD works on 1.5; I have it generating servlets and taglibs.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Example Ant 1.6 build files for project with multiple WAR and JAR modules?

Posted by Lawrie Gallardo <la...@hotmail.com>.
>Steve Loughran wrote:
>
>>><item type="gratuitous product placement" entry="2" >
>>>
>>>As and when I complete the second edition of Java development with Ant 
>>>(yes, I am behind schedule), there will be some sample stuff that does it 
>>>more simply. I havent written the target to zip up all the source tree to 
>>>provide an example, but I could do that in the next couple of days if 
>>>you'd like.
>>>
>>></item>
>>
>>
>>Thanks, Steve, that would be incredibly helpful if you could.
>>
>>BTW I'm really looking forward to the book, so I hope you haven't got too 
>>much left to do!
>>
>
>well, the 'big project' chapter did take about 10 weeks all in; it is 
>probably so big that it should split into two.
>
>But I'm backing off from any XDoclet coverage because
>  -XDoclet 1.2.x doesnt work on java1.5
>  -XDoclet 2.0 isnt there yet
>  -Java 5 annotations threaten the value of the tool

XDoclet 1.2.x doesnt work on java1.5???

I had no idea - I had to stick with java1.4 on my last project. Ignorance is 
bliss, as they say...

You got me scurrying to Google, though, and there would now appear to be an 
XJavaDoc snapshot release which lets you use XDoclet 1.2.x with Java 1.5., 
although it wasn't immediately apparent whether this just meant that XDoclet 
would crash if your non-annotated code uses Java 1.5 features, or whether 
you could actually annotate Java1.5 constructs like fields using generics.

>However, there aint java5 annotations for doing taglibs, servlet 
>declarations, or even (I believe) hibernate bindings. All we get are stuff 
>to do with EJB3 (sigh) and JAX-RPC 2.0 bindings of methods to SOAP calls 
>(IMO, RPC is the wrong metaphor for distributed computing over SOAP). Which 
>is what you get when you have JCP working groups full of EJB and WS 
>vendors.

I couldn't agree with you more. You only have to look at the JDO vs EJB 
fiasco to wonder whether it is a good idea to let the big vendors have so 
much influence...

>Who is doing the java5 annotations for taglibs, servlets &c? Maybe there is 
>something in tomcat-land. Otherwise I Dont know what to say on that topic.

Sorry, I'm afraid I can't offer anything here. I'd like to think that 
someone was on to this even though I don't find myself writing many taglibs 
of servlets these days...

Regards,
Lawrie

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! 
http://www.msn.co.uk/newsletters


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Example Ant 1.6 build files for project with multiple WAR and JAR modules?

Posted by Steve Loughran <st...@apache.org>.
Lawrie Gallardo wrote:

>> <item type="gratuitous product placement" entry="2" >
>>
>> As and when I complete the second edition of Java development with Ant 
>> (yes, I am behind schedule), there will be some sample stuff that does 
>> it more simply. I havent written the target to zip up all the source 
>> tree to provide an example, but I could do that in the next couple of 
>> days if you'd like.
>>
>> </item>
> 
> 
> Thanks, Steve, that would be incredibly helpful if you could.
> 
> BTW I'm really looking forward to the book, so I hope you haven't got 
> too much left to do!
> 

well, the 'big project' chapter did take about 10 weeks all in; it is 
probably so big that it should split into two.

But I'm backing off from any XDoclet coverage because
  -XDoclet 1.2.x doesnt work on java1.5
  -XDoclet 2.0 isnt there yet
  -Java 5 annotations threaten the value of the tool

However, there aint java5 annotations for doing taglibs, servlet 
declarations, or even (I believe) hibernate bindings. All we get are 
stuff to do with EJB3 (sigh) and JAX-RPC 2.0 bindings of methods to SOAP 
calls (IMO, RPC is the wrong metaphor for distributed computing over 
SOAP). Which is what you get when you have JCP working groups full of 
EJB and WS vendors.

Who is doing the java5 annotations for taglibs, servlets &c? Maybe there 
is something in tomcat-land. Otherwise I Dont know what to say on that 
topic.

-stve

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Example Ant 1.6 build files for project with multiple WAR and JAR modules?

Posted by Lawrie Gallardo <la...@hotmail.com>.
Hi Steve,

>From: Steve Loughran <st...@apache.org>
>Reply-To: "Ant Users List" <us...@ant.apache.org>
>To: Ant Users List <us...@ant.apache.org>
>Subject: Re: Example Ant 1.6 build files for project with multiple WAR and 
>JAR modules?
>Date: Thu, 03 Nov 2005 11:33:13 +0000
>
>Lawrie Gallardo wrote:
>>Hi Ron,
>>
>>I have searched through the Apache projects, but none of them seem to do 
>>anything like I am trying to do with Ant (i.e. project containing multiple 
>>WAR and JAR modules awith common build file which the individual module's 
>>build files import and override, plus a master build file that runs the 
>>same target(s) for all build files), or else, like you say, they use 
>>Maven.
>>
>>I am interested in using Maven in the future, and when Maven 2.0 is 
>>released (not just Beta, with some of the plug-ins I need not available) I 
>>think this might well be the way to go. However, for the moment I need to 
>>stick with Ant, but I'm really struggling to find any examples - surely 
>>somebody out there must have written Ant build files along the lines I've 
>>mentioned???
>>
>>Regards,
>>Lawrie.
>>
>
><item type="gratuitous product placement" entry="1" >
>
>I will point you at the project I work on by day, smartfrog, and its 
>evolving build process
>
>http://cvs.sourceforge.net/viewcvs.py/*checkout*/smartfrog/core/antbuild/doc/third_generation_build_process.sxw
>
>This is very bleeding edge, very complex. Its using the maven2 tasks to 
>share artifacts between projects, and to pull stuff in from the net. It 
>also uses ant1.7 import semantics (tuned since ant1.6), so some projects 
>only build on Ant1.7 (and java1.5, that is a side issue).
>
></item>

I have tried working my way through the Smartfrog build files, but they are 
slightly overwhelming to say the least. Something slightly less complex 
would certainly be easier to get my head around...


><item type="gratuitous product placement" entry="2" >
>
>As and when I complete the second edition of Java development with Ant 
>(yes, I am behind schedule), there will be some sample stuff that does it 
>more simply. I havent written the target to zip up all the source tree to 
>provide an example, but I could do that in the next couple of days if you'd 
>like.
>
></item>

Thanks, Steve, that would be incredibly helpful if you could.

BTW I'm really looking forward to the book, so I hope you haven't got too 
much left to do!

Cheers,
Lawrie.

_________________________________________________________________
MSN Messenger 7.5 is now out. Download it for FREE here. 
http://messenger.msn.co.uk


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Example Ant 1.6 build files for project with multiple WAR and JAR modules?

Posted by Steve Loughran <st...@apache.org>.
Lawrie Gallardo wrote:
> Hi Ron,
> 
> I have searched through the Apache projects, but none of them seem to do 
> anything like I am trying to do with Ant (i.e. project containing 
> multiple WAR and JAR modules awith common build file which the 
> individual module's build files import and override, plus a master build 
> file that runs the same target(s) for all build files), or else, like 
> you say, they use Maven.
> 
> I am interested in using Maven in the future, and when Maven 2.0 is 
> released (not just Beta, with some of the plug-ins I need not available) 
> I think this might well be the way to go. However, for the moment I need 
> to stick with Ant, but I'm really struggling to find any examples - 
> surely somebody out there must have written Ant build files along the 
> lines I've mentioned???
> 
> Regards,
> Lawrie.
> 

<item type="gratuitous product placement" entry="1" >

I will point you at the project I work on by day, smartfrog, and its 
evolving build process

http://cvs.sourceforge.net/viewcvs.py/*checkout*/smartfrog/core/antbuild/doc/third_generation_build_process.sxw

This is very bleeding edge, very complex. Its using the maven2 tasks to 
share artifacts between projects, and to pull stuff in from the net. It 
also uses ant1.7 import semantics (tuned since ant1.6), so some projects 
only build on Ant1.7 (and java1.5, that is a side issue).

</item>

<item type="gratuitous product placement" entry="2" >

As and when I complete the second edition of Java development with Ant 
(yes, I am behind schedule), there will be some sample stuff that does 
it more simply. I havent written the target to zip up all the source 
tree to provide an example, but I could do that in the next couple of 
days if you'd like.

</item>

-steve




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Example Ant 1.6 build files for project with multiple WAR and JAR modules?

Posted by Lawrie Gallardo <la...@hotmail.com>.
Hi Ron,

I have searched through the Apache projects, but none of them seem to do 
anything like I am trying to do with Ant (i.e. project containing multiple 
WAR and JAR modules awith common build file which the individual module's 
build files import and override, plus a master build file that runs the same 
target(s) for all build files), or else, like you say, they use Maven.

I am interested in using Maven in the future, and when Maven 2.0 is released 
(not just Beta, with some of the plug-ins I need not available) I think this 
might well be the way to go. However, for the moment I need to stick with 
Ant, but I'm really struggling to find any examples - surely somebody out 
there must have written Ant build files along the lines I've mentioned???

Regards,
Lawrie.

>From: Ron Wheeler <rw...@artifact-software.com>
>Reply-To: rwheeler@artifact-software.com
>To: Ant Users List <us...@ant.apache.org>
>Subject: Re: Example Ant 1.6 build files for project with multiple WAR and 
>JAR modules?
>Date: Wed, 02 Nov 2005 07:40:31 -0500
>
>Did you look at the Apache projects?
>Many of them are using Maven which may be closer to what you want.
>What about Ant itself?
>
>Ron
>
>Lawrie Gallardo wrote:
>
>>Hi,
>>
>>I need to put together Ant 1.6 build files for a project which will have 
>>an EAR module and several WAR and JAR modules. I ideally want to make good 
>>use of Ant 1.6 features such as import, macrodef and subant tasks to 
>>produce a common build file (which each individual module's build file can 
>>then import and override), a master build file, and a release build file. 
>>To avoid re-inventing the wheel, I have tried to find an open source 
>>project with suitable build files to use as a starting block, but I have 
>>not been able to find anything that fits the bill.
>>
>>Does anyone know of an open source project with build files that would be 
>>worth me taking a look at?
>>
>>Or has anybody already put together something along these lines for an 
>>existing project? If so, I'd be incredibly grateful if you could mail me a 
>>copy of these build files so that I could use them as a starting point to 
>>adapt and amend to fit my project's requirements. I know this sounds a bit 
>>cheeky, but I'd really like to avoid the unproductive effort of starting 
>>completely from scratch and re-inventing the wheel...
>>
>>Thanks in advance,
>>
>>Lawrie.
>>eMail: lawriegallardo at hotmail dot com
>>
>>_________________________________________________________________
>>MSN Messenger 7.5 is now out. Download it for FREE here. 
>>http://messenger.msn.co.uk
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! 
http://www.msn.co.uk/newsletters


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Example Ant 1.6 build files for project with multiple WAR and JAR modules?

Posted by Ron Wheeler <rw...@artifact-software.com>.
Did you look at the Apache projects?
Many of them are using Maven which may be closer to what you want.
What about Ant itself?

Ron

Lawrie Gallardo wrote:

> Hi,
>
> I need to put together Ant 1.6 build files for a project which will 
> have an EAR module and several WAR and JAR modules. I ideally want to 
> make good use of Ant 1.6 features such as import, macrodef and subant 
> tasks to produce a common build file (which each individual module's 
> build file can then import and override), a master build file, and a 
> release build file. To avoid re-inventing the wheel, I have tried to 
> find an open source project with suitable build files to use as a 
> starting block, but I have not been able to find anything that fits 
> the bill.
>
> Does anyone know of an open source project with build files that would 
> be worth me taking a look at?
>
> Or has anybody already put together something along these lines for an 
> existing project? If so, I'd be incredibly grateful if you could mail 
> me a copy of these build files so that I could use them as a starting 
> point to adapt and amend to fit my project's requirements. I know this 
> sounds a bit cheeky, but I'd really like to avoid the unproductive 
> effort of starting completely from scratch and re-inventing the wheel...
>
> Thanks in advance,
>
> Lawrie.
> eMail: lawriegallardo at hotmail dot com
>
> _________________________________________________________________
> MSN Messenger 7.5 is now out. Download it for FREE here. 
> http://messenger.msn.co.uk
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org