On Apr 12, 2004, at 10:24 PM, Chad Woolley wrote:
Since Warner might do a mini-presentation on Maven, I thought I'd post this article I found:
http://www.theserverside.com/articles/article.tss?l=MavenMagic
This is the best tutorial how to set up maven for a J2EE project that I've seen. It really shows how maven can simplify the task of bringing all the complex parts of a J2EE build together.
Maven is sort of on the right path in theory - but it still doesn't sit well with me. With Ant 1.6's new features including <import>, Antlib, and <subant>, the object-oriented nature of Java builds is much more obvious and realizable than with Maven - all IMHO of course.
Erik (if your listening)
... always am ...
- In browsing through "Java Development with Ant", I don't see any listing that brings it all together like this article.
Well, Chapter 8 is titled "Putting it all together" :)
I find scripts for building WARs, and EARs, but no unified script that addresses all the artifact-generation issues.
The source code to JDwA is available at Manning's site. Rather than grab that, though, the code at http://www.ehatchersolutions.com/JavaDevWithAnt has been more polished. It is due for a 1.6 overhaul, not to mention replacing Struts with Tapestry. JavaDevWithAnt pulls it all together by building an EAR (or just a WAR - it plays either with or without a stateless session bean in the picture, take your pic - see the docs for details).
For example, the EJB Jar -> WAR -> EAR dependencies, which can be circular and confusing if you're not careful.
I'm not sure how it could be confused and circular. Certainly knowing J2EE is a prerequisite for building a J2EE distributable, and as I say in Chapter 8 "begin with the end in mind". You know you need an EAR (<target name="ear">), which has a WAR in it (depends="war"), which requires an EJB JAR (<target name="war" depends="ejbjar">). Decompose each of those steps until you get back to compilation. Now with <import>, you could have a sophisticated build system that looks like this:
<project name="analyzers" default="default">
<description>
Additional Analyzers
</description><import file="../common.xml"/> </project>
(from jakarta-lucene-sandbox/contributions/analyzers - look there for my latest Ant 1.6 refactorings).
Do you know of any articles or resources which provide a similar comprehensive overview for pure Ant?
I'm overdue for a JDwA revision, no question. If cloning technology were just a little bit further along...
With Ant, I feel in control. Maven tries to control me. Its an interesting debate, though. Maven has quite a following.
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
