Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cromulent

macrumors 604
Original poster
Oct 2, 2006
6,824
1,126
The Land of Hope and Glory
As I have been preparing over the last couple of weeks for my course which starts in January I have been playing around with Java quite a bit recently and have already discovered that Netbeans and Eclipse annoy me :).

So anyway I've been trying to find more information on Ant and Maven in regards to Java EE applications. I can write my own build scripts for normal everyday Java SE apps but I'm lost when it comes to properly packaging WAR, EJBs, JSP and all the other gumpf which comes with enterprise apps.

Does anyone have a useful resource? The official documentation is good until it gets to the enterprise stuff and then the quality drops significantly.

Edit: Opps, forgot to ask the question I was originally intending. Which of two do you prefer for manual use?
 
I generally prefer Maven over Ant. I've not used it for Java EE builds, but it definitely has support for them, probably better than what Ant provides. It has special plugins and pre-defined lifecycles for WARs, EJBs, and EARs.
 
I generally prefer Maven over Ant. I've not used it for Java EE builds, but it definitely has support for them, probably better than what Ant provides. It has special plugins and pre-defined lifecycles for WARs, EJBs, and EARs.

Thanks for the response. I've pretty much managed to work out Ant now.

I'll have a look at Maven but I'm not entirely sure if the added complexity is worth it at this stage.

XML has to be the worst data transmission / storage method ever invented though. Gah, even CSV would be better.
 
Since you're entering a course, I think you should use whatever the course material uses. It's likely, or at least possible, that any build and deployment scripts will be provided in the course, and maybe even covered as course material.

It's even possible that the course uses neither Ant nor Maven, but something else.
 
Since you're entering a course, I think you should use whatever the course material uses. It's likely, or at least possible, that any build and deployment scripts will be provided in the course, and maybe even covered as course material.

It's even possible that the course uses neither Ant nor Maven, but something else.

The course uses BlueJ. This is for my own project.

Frankly using BlueJ is not really an issue I know this probably sounds a little arrogant but I doubt I'll have many problems working out what is required build wise or IDE wise.
 
The course uses BlueJ. This is for my own project.

Use whatever works best for you right now. If you change your mind later, you'll have gained some familiarity with both. Given what you've said so far, I can't think of any scenario where that would be a bad thing.

Working in enterprise software, you should learn to be adaptable and learn how to learn on the job. If you know the general principles of either Ant or Maven, you'll be well prepared for learning the specific features and weaknesses of the other. It isn't always about the technically better solution, but about what the local processes and customs are.
 
I'm glad I can be of any help on this topic, and pay back all the comments I have had from you in my learning Objective C.

I've been making a living out of Java EE programming, especially on Linux, although have started recently on Mac. In fact, I've been developing Java EE apps for the last 8-10 yrs.

My comments:
1. I use either IBM tools (based on Eclipse) or as of lately, Eclipse itself. When you're working on a large scale JEE app, there's lot of resources that you need to keep track of, plus debugging, plus Faces encoding (if you use JSF, for example) or JSPs. More importantly, a tool like Eclipse makes testing your apps easier, since those tools tend to have test environments included (like Tomcat, for example) and frameworks to that effect (Junit and Cactus). If you're using Spring (one of the most accepted Java frameworks and widely deployed), may I suggest you take a look at SpringSource's free SpringSource Tool Suite? (http://www.springsource.com/products/eclipse-downloads) It's actually Eclipse Galileo (ver 3.5) with all the plugins already loaded to be productive with Spring, Hibernate, WebFlow and JSF. Although a resource hog, I think the features you get with Eclipse far outweigh the penalties. For example, I have EClipse running within a Fusion VM (linux) in a MacBook Pro, and the performance is good (8GB RAM, though)

2. ANT and Maven are different tools, with different objectives in mind. If you just need the Java equivalent to Make, then ANT is the way to go. Maven is that, and more. Although slightly more complex, it is a project management and automation tool, that lets you automate tasks (based on something similar to templates) that go far beyond building. If you're in a team, for example, you can have daily integration (if you're into XP, for example) and have Maven automatically deploy you EARs to your app server of choice, and then update a central repository (most likely Subversion), and even run automated testing, having the results of those sent to some member of your team.

There's a nice free Maven book here http://www.sonatype.com/books/maven-book/reference/
and if I remember correctly, that's how I got to install Maven on my Mac.

3. An IDE tool also helps with persistence frameworks, allowing some visual mapping between you relational tables and your Java objects, no matter if you're using Hibernate or iBatis, or whatever -- there's probably a plugin for Eclipse.

4. Finally, and to be completely honest with you, the more I program in Java / JEE :mad:, the more I like Python and Ruby on my Mac :p. I have to admit, though, that I'm totally new to the Mac platform, and to Ruby, but been using Unix since 17 yrs ago -- yes, I'm old :cool:

I hope my comments were useful. Have fun coding.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.