DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Securing Your Software Supply Chain with JFrog and Azure
Register Today

Trending

  • Knowing and Valuing Apache Kafka’s ISR (In-Sync Replicas)
  • RAML vs. OAS: Which Is the Best API Specification for Your Project?
  • Five Java Books Beginners and Professionals Should Read
  • A Complete Guide to AWS File Handling and How It Is Revolutionizing Cloud Storage

Trending

  • Knowing and Valuing Apache Kafka’s ISR (In-Sync Replicas)
  • RAML vs. OAS: Which Is the Best API Specification for Your Project?
  • Five Java Books Beginners and Professionals Should Read
  • A Complete Guide to AWS File Handling and How It Is Revolutionizing Cloud Storage
  1. DZone
  2. Coding
  3. Java
  4. Maven and Ant Guys: You'll Never Agree. On Anything. Period. Deal With It!

Maven and Ant Guys: You'll Never Agree. On Anything. Period. Deal With It!

Lieven Doclo user avatar by
Lieven Doclo
·
Jul. 28, 13 · Interview
Like (0)
Save
Tweet
Share
6.43K Views

Join the DZone community and get the full member experience.

Join For Free

Every 3 months or so, you’ll see a new article pop up somewhere written by an Ant (mostly, sometimes Gradle or Rake) lover discussing the horrible nature of Maven and how it works.

People, please! How old are you guys? I’ve used both and I like Maven more. Is that a reason for me to post another rant on Ant? Seriously, most rants are one-way. It’s easy to break down a tool based on some criteria, but how about proposing some solutions to problems some Maven users face that you can easily solve in [your favorite buid tool]? Whoops. Negative criticism is easy, isn’t it?

Recently, I read this article. It doesn’t take a genius to discover that this blogger is a Maven hater. Or to put it more bluntly: it doesn’t support the way HE wants to build software. Here’s an idea: try and take every feature you hate in Maven and give a Rake or Ant alternative way. Every single one. I’m waiting for the excuses you’ll throw at me.

Let’s see. According to this blogger, it’s really hard to build a war. Last time I built a WAR with Maven, I just needed to change the packaging to WAR. Okay, you do need to know that the WEB-INF folder goes into src/main/webapp. Is that really that hard? The other rant was about the WAR size. Here he actually has a (albeit minor) point. Maven projects (especially frameworks) really need to learn the value of optional dependencies. But then again, I’d like to see Ant projects solve this issue too without their usual solution: provide a README stating which jars should be included when you want to use certain functionalities.

I’ve heard the statement “Why use an entire toolbox (Maven) when you only need a hammer (Ant)”. Okay, you CAN put a screw in a wall with a hammer. The result ain’t pretty, but it works. Does that mean a hammer is the only tool to use. No. Know when to use a tool. Any tool for that matter. Would you throw the screwdriver out of your toolbox because it can’t handle a nail?

Any of the rants can be translated into either incorrect use of Maven or just plain stupidity (or even lazyness): I can point out a lot of Ant, Gradle or Rake misuse that is equally painful. Dependency resolving takes to much time? Use Artifactory or Nexus internally (it’ll even solve some other problems concerning snapshots). Got problems with plugins? Stop omitting the version number in your POM’s (or use a company-wide POM). Too many unused transitive dependencies that should be optional? Contact the author. Got a problem with XML POM’s? Maven 3 has polyglot functionality. All I’m saying is: stop ranting. Either come up with non-abstract solutions, or shut up. Ranting is easy. Coming up with solutions using your own solutions is less so.

Apache Maven IT

Published at DZone with permission of Lieven Doclo, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • Knowing and Valuing Apache Kafka’s ISR (In-Sync Replicas)
  • RAML vs. OAS: Which Is the Best API Specification for Your Project?
  • Five Java Books Beginners and Professionals Should Read
  • A Complete Guide to AWS File Handling and How It Is Revolutionizing Cloud Storage

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: