• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Ant, Maven, Maven2 or other

 
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for an enterprise class system. Anyone have any advice or experience with these tools?
D.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are using Ant, with great success. We evaluated Maven some time ago, but found it to be too rigid for our needs - in my opinion, it's very obvious that open source projects are the target audience.

Don't know about Maven2, but also don't feel the need to check up.
 
Saloon Keeper
Posts: 22265
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've seen some truly scarey things done with Ant lately, but one thing that Ant has (besides the ability to organize directories how you want them) that Maven doesn't have is transparency.

Maven, whether v1 or v2 is "magic". When something goes wrong, I have no clue as to how to tell why a target didn't build. I don't appreciate that.

There also doesn't seem to be a meaningful way to enumerate the targets of a given project. Maven can list goals, but they don't seem to be specific to what you want to do fo a specific project -- or if they are, they're buried in amongst all the general goals to the point that they're effectively invisible.

I've been working with some maven-based projects lately. It hasn't been fun. Even without the above, all it takes is for some joker to change one repository URL and suddenly the project won't build anymore.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I echo Tim's notion about Maven being a bit too "magic" for my taste as well. I'm a long time Ant user and still recommend Ant over anything else. I also know people who pray to the Gods of Maven and can't think of a good reason not to use it. I agree that the repository concept and automatic downloading of dependencies is an advantage but I feel that Maven's implementation of the concept kind of sucks. I'd prefer defining the dependencies in my Ant script rather than in yet-another-XML-file. Then again, that's just me.
 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ant, Maven are not too much control for sophisticated build tasks. I Use 7Bee. It's also 10%-15% faster.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by dema rogatkin:
Ant, Maven are not too much control for sophisticated build tasks. I Use 7Bee. It's also 10%-15% faster.


When I want absolute control, I'll probably go for Rake instead of an XML-based build tool like Ant, Maven, or 7Bee. 7Bee looks like it's an XML programming language, which isn't a good thing in my books. Then again, I haven't tried it for real and my perception is based on the examples on their website.
 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I vote for Maven2. We use Ant here four our project which has grown completely out of hand (not fault of Ant though). Comparing Maven to Ant would be like comparing a preassembled starship to a box of legos. (Considering the starship is made out of legos.) Maven is a build system whereas Ant is a build language. Both tools are good in their own right so it really depends on where your head is at. If you want to create your own build system then either tool will work for you but Ant is a little easier to pick customize. If you want to just build something then Maven is the better tool in many cases because it elliminates the programming of the build step. Maven2 is still rather new and many people can't get used to it. Plus it has a steeper learning curve due to less documentation and online examples. However it has many strengths such as abstracting the build steps from the build details, a central repository, native dependency management (which in itself can become a separate project with Ant), and others. Out of the box you can use it to build and deploy simple to complex projects with little or no programming. To compare with Ant you would program a moderately complex build file for a simple jar based project. Try Maven2 and really give it a chance. Most people knock it because it requires a different type of thinking to use effectively. If you get stuck remember there's a different way of accomplishing what you're having trouble with.
 
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clifton,
Welcome to JavaRanch!

I think you captured the essence of the difference between the 3 build tools. I think Maven sounds very nice, but some of us don't have the luxury of doing things the "Maven way". In which case, you have to use Ant.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Jeanne Boyarsky:
I think Maven sounds very nice, but some of us don't have the luxury of doing things the "Maven way".



And some of us actually actively choose not to do it the "Maven way"...
 
Clifton Craig
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Jeanne Boyarsky:
Clifton,
Welcome to JavaRanch!

I think you captured the essence of the difference between the 3 build tools. I think Maven sounds very nice, but some of us don't have the luxury of doing things the "Maven way". In which case, you have to use Ant.



Thanx Jeanne,

I feel welcome here! I feel that the "Maven way" is misunderstood. Everything in Maven is just as customizable as it is in Ant, it's just that when you stray from the Maven way it appears to be more work than necessary. However the amount of extra work is miniscule when compared to getting the same task done the "Ant way", where you have to implement from the ground up. I think the luxury most people lack is the luxry of being able to take the time to understand the "Maven way" which is unfortunate in many cases. It took me a while to come to this realization too. Anyhow, to each his own!
 
Jeanne Boyarsky
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clifton,
I haven't used Maven (just read about it), so I didn't realize you could customize things. Good to know.
 
Clifton Craig
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne,

Yes in Maven everything is customizable (read configurable) but Maven follows much different principles. Convention over configuration is the guide. The same principles that made Ruby/Rails so popular apply in Maven. You generally don't want to configure things unless you absolutely have to. That applies not only to Maven but to any type of programming. Spend more time adding logic to your application (where the real value is) and less time configuring mundane details. That's the point most people miss when trying Maven for the first time. They forget what a chore it is to configure everything. Configuration sux! It makes more sense when your tools can just figure things out automatically. Another thing people get confused on is the structure that feels imposed on you. It feels rigid because it doesn't allow you to do all the silly things you can do with Ant. When you really think about it these are really silly things that you shouldn't do anyway. By nature developers love to look for exceptions and reasons why they need, for example, a jar file under the src directory tree. It comes so naturally that many times a silly exception appears to make more sense than a logical rule.

Enough soapbox talk. If you want to hear more of me raving about Maven (hey that rhymes) then you can visit my blog, where I hardly get any hits aside from my mother and my paper delivery person.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been looking at Maven 2 over the weekend, and it really seems like they've got the 80% covered. Unfortunately the 20% seems so terrible to implement--at least the documentation isn't really that helpful.

For example, I'm trying to build a standard JAR file that includes the JARs for the dependent libraries (for the curious, an OSGi bundle). In Ant, I just add the JARs to the <jar> task. In Maven, I apparently need to create a plugin, write a bunch of Java code, annotate it with doclet tags, then shove a bunch of plugin XML into each of my project POMs. Check it into my repository, and two days later I can include dependent libraries in my JAR automatically. Something that seems to me just a little tweak to the process becomes a huge development effort.

If you're building standard JARs or WARs, I think Maven is pretty slick. Customizing its processes just seem too time consuming. Maybe a little better documentation would help; maven.apache.org is just all over the place.
 
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well. The group that I currently work with has some Maven projects, some Ant.

We are divided on the issue, about 50/50, and the choice depends on which person actually starts a new project.

This sounds bad, but I think it is not.

You get an exposure to complex builds from both environments, and the integration issues surrounding that.

For someone unfamiliar with both systems, I suggest a week or two working with each, on a moderately complex project. Your choice will be much better informed that way.

FWIW, I reamin (for now) on the Ant side of the house.

Guy
 
Ranch Hand
Posts: 93
Mac Objective C Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Sean Bowman:
In Maven, I apparently need to create a plugin, write a bunch of Java code, annotate it with doclet tags, then shove a bunch of plugin XML into each of my project POMs.



Um, no.

It sounds like you either misunderstood something in the docs (very likely, because they are pretty poor so far), or you are fighting the standard maven configuration.

If the latter:

Originally posted by Clifton Craig:
You generally don't want to configure things unless you absolutely have to. ~. It makes more sense when your tools can just figure things out automatically.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic