This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes [Maven] Customize Project Structure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "[Maven] Customize Project Structure" Watch "[Maven] Customize Project Structure" New topic

[Maven] Customize Project Structure

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

I'll admit right off the bat that I haven't thoroughly browsed the Maven documentation so if the answer to my question is there, just link me to it and I'll be happy. When I start a new project I spend quite a bit of time going out and making sure I have the latest of all the libraries I need. It is my understanding that if I used Maven it pretty much does this for me if I add the dependencies to my pom.xml.

However, I really don't like the project structure that Maven creates. Can this be customized and if so how much?


GenRocket - Experts at Building Test Data
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17149

I really don't like the Maven project structure. However there are 2 reasons - 3 reasons - for using Maven:

1. You want the automated library management
2. You want a diverse team to be able to hit the ground running, so you want a standardized project structure.
3. You want to have a really ugly project structure.

Yes, you can re-arrange the project structure, but they've made it fairly difficult. I just surrender to the inevitable. Maven's hard enough to debug as it is.

Of course, there's one thing uglier than the structure of a Maven project. The structure of a Maven project under Subversion.

An IDE is no substitute for an Intelligent Developer.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Ok, so anyway to get #1 without Maven? Any other tools out there (not appfuse)?
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

I think appfuse is really just some custom Maven archetypes...

One non-Maven dependency management project I've heard of (though not used) is Ivy.

You can also use AntLib for Maven - use Maven through Ant to manage dependencies, but build through Ant rather than Maven. Since you're not doing the build through Maven, it doesn't matter what your directory structure is like. (I'm doing this currently - if you run into problems/want further information... just ask.)
[ May 29, 2007: Message edited by: Nathan Pruett ]

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Thanks Nathan. I'll peek into AntLib.
I agree. Here's the link:
subject: [Maven] Customize Project Structure
It's not a secret anymore!