Where to locate my UML diagram files in my Maven p

2019-07-25 18:05发布

问题:

For my Java project, I am using ObjectAid eclipse plugin as the UML visualization tool for my domain classes. Each class diagram is a .ucls resource file.

According to Maven principles, where do I need to locate my *.ucls files inside the project structure ?

回答1:

There is no common maven convention as to where to store documentation. As long as it does not interfere with the build process, you are free to place it anywhere you like.

We are storing docs inside /src/main/doc, but this is just a team-wide consensus, so feel free to choose your own.



回答2:

Anywhere you want, unless they're generated automatically.

If they're generated during the build, they belong somewhere in target.

If they're not, it somewhat depends on what you'll actually be doing with them. I kind of question the idea of keeping them within the project, but I'm sympathetic to wanting them as part of the project–I'm just not convinced they don't belong somewhere else entirely, like on a project wiki/CMS/etc.

I keep written documentation at the top level, in docs, because it's not source: IMO source is "stuff which is used during the build", which documentation isn't (unless it is, for example, if it needs transforming from one format to another).