Konubinix' opinionated web of thoughts

How to Correctly Structure a Maven Project

Fleeting

how to correctly structure a maven project

After having read thoroughly the documentation of maven and having asked a few people considered as java/Maven expert in my company, here is what I understood.

I was suggested to follow the practices used in big projects like

https://github.com/wildfly/wildfly.

  • use the hierarchical directory structure to structure your artifacts
  • but you don’t need to call the artifact with the name of the source directory
  • you should make clear the purpose of the artifact in its name
    • name it *-parent if it is intended to be inherited from
    • name it *-bom if its sole purpose is to centralize dependencies information
    • don’t add a suffix if it is only an aggregator