I'm creating a multi-module project that builds many other, related projects. Some of these projects are multi-module projects as well, and in some cases they build the same sub-project. Maven yells at me, but this is intentional and I'd like it to build anyway.
Has anyone worked around this? Thanks.
-
Have you tried one of these command-line options?
-fae,--fail-at-end Only fail the build afterwards; allow all non-impacted builds to continue -fn,--fail-never NEVER fail the build, regardless of project result
-
I don't think you should do that. (You could try defining a profile - let say a complete-build profile, where you make sure that every module is compiled just once, an another profile that adds the additional modules when you do a sub-build.)
But you better go the maven way - every project should include as modules only directories from its own directory, e.g. only direct children.
Maven has some non-written implicit assumptions like - always inherit submodules, from the pom in the parent directory, e.g. the inheritance tree must match your directory tree, otherwise some plugins won't work, e.g. release plugin, or some report plugins.
The short answer is - in maven you cannot have a module twice in your project hierarchy/tree.
There are a lot of wrong ways in maven, therefore one must stick to something that is known to work - like pom hierarchy == directory structure.
0 comments:
Post a Comment