I have worked on maven projects in which the directory structure looks like:
src/
main/
java/
test/
java/
I was wondering if other directory structure conventions exists. Is this convention maven-specific or is it applicable to all of Java? I have a project that requires multiple programming languages and was curious about whether some standard exists.
It is Maven-specific convention of directory structure, however it's become quite popular even outside the Maven world, since it is good (like any other convention that makes sense) and there is no reason why not use it with Ant-managed project or just regular Java project. Even Java nature of the project is not needed. For example, there is FlexMojos project that enables Flex projects to be managed by Maven.
If you plan to use many programming languages, you have to use some additional plugins that extend Maven capabilities. For example, you can use GMaven plugin to enable Groovy language support in Maven project. Then, there is convention (in fact: default setting of plugin) to put Groovy sources into src/main/groovy
. By default, only Java is supported.
The convention is to follow the default folder layout in Maven. Furthermore other programming language follow those conventions like src/main/c++ etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With