07 October 2009

The ultimate project structure

Well I don't think there is an ultimate project structure. But I think the default project structure that is used in Maven is very good. The basic for a java project looks like this:

A common objection of this is why so many levels? Why src/main/java when src is enough? I will try to break it down:

Why main/test?
You probably have both main code and test code. A separation of those is not bad. You will perhaps have documentation. Then you could create a src/doc directory.

Why src/xxxx/java?
You can probably have other languages. Or perhaps things that are not languages for example "resources".

No comments:

Post a Comment