Meaningless Drivel is fun!
The moose likes Ant, Maven and Other Build Tools and the fly likes own folder structure using maven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "own folder structure using maven " Watch "own folder structure using maven " New topic

own folder structure using maven

Se Sha

Joined: May 17, 2012
Posts: 1

My project structure is different from maven default. Can you guyz please help me to Build my project.

I have a folder structure like:

rootfolder -->

1.All java compiled class files present inside com-->abc-->qa-->xyz and com-->abc-->qa-->xyz-->utils folders

2.All dependent libraries exist inside "lib" folder

3.All testcases class files exist in "testcases" folder

4."" file exist in root folder,which has configuration details of testcases

Please provide me solution ASAP.

Thanks in Advance.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17423

Welcome to the JavaRanch, Se Sha!

The JavaRanch is a place to come to for answers when you want to talk with knowledgeable people who won't "flame" you if you say something "wrong". But it's not a good place to come for ASAP answers. We don't get paid, so we only come online when it's convenient for us.

Periodically people ask the same question you asked. We always answer "Don't do that!". While a lot of us are not entirely pleased with how Maven likes to arrange things, if you don't use Maven's standard project layout, you are discarding one of the primary advantages of Maven, which is that projects have a standard layout.

Also, and even more importantly, it takes a lot of work to force Maven to look in alternative places for the files it needs. That makes the POM structure bigger, more complex, and harder to understand and maintain. Adding complications is especially bad if you're a Maven beginner. It would be like trying to code Java based on how you were used to coding assembly language. You'll constantly run into problems and won't know why or how to fix them.

An IDE is no substitute for an Intelligent Developer.
Peter Johnson

Joined: May 14, 2008
Posts: 5852

Why do you want to do item #2? That goes against Maven's automatic dependency handling, which is probably the primary reason for using Maven. I no longer have to gather JAR files into a lib directory to do anything. And even nicer - I no longer need to put them into source control. Instead, I tell Maven what I need (the IDEs have built-in search facilities to help you locate the JARs, or you can use search at Maven Central) and it does the rest.

JBoss In Action
I agree. Here's the link:
subject: own folder structure using maven
It's not a secret anymore!