views:

338

answers:

1

Maven 2 uses a standard directory layout for projects, documented here:

http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

What I'm wondering is: are there recommended conventions for other projects besides the plain-vanilla Java library, JEE and WebApp projects? Specifically, where to place ant files, start scripts, configuration files, sample applications, etc.

In addition, what is the convention for placing files outside of the src/ directory tree? For example, is it common to place documentation under doc/ (as sibling of src)?

Is there a page where these conventions are compiled? If not, can other readers provide examples from their own projects?

+1  A: 

The main folder I place extra config files in is under src/main/java/resources. Usually I created sub directories under there. The tests can have their own config files src/test/resources.

You can use directives in the build section of the pom.xml to specify additional resources directories and where to copy files to specific places in the target directory. Usually a convention arises for the language or framework you are trying to use. In which case the mess can be hidden in a parent pom.xml

See http://maven.apache.org/pom.html#Resources

mxc
Keep in mind that those resource directories usually get jarred up by maven. This may not be the desired behavior for user configurable property files or start scripts.
Kevin