I'm currently building an application and I have a maven project structured like so:
|-> root
|
|-------> ui
| |---> pom.xml
|
|-------> core
| |---> pom.xml
|
|
|-------> pom.xml
- ui depends on core
- core has no internal dependencies
root/pom.xmlis an aggregator which specifies as it's modulesuiandcore
Now I'm planning to mvn release this piece of software and I only want to expose a central artifact say myapp which should be a jar containing all the code from ui and core (ie. I don't want ui, core, and the aggregator to all be released separately) so that anyone who adds myapp as a dependency can access both com.somepackage.ui as well as com.somepackage.core.
Questions:
- How do I handle the
ui -> coredependency? Can I make it point to a relative pom../core/pom.xml? - How do I bundle the generated sources from
uiandcoreinto a${rootartifactname}.jar - Running
mvn deployonrootdeploys all three poms to the repository, so right now anyone can reference myuiartifact and I don't want that, how do I expose only the root pom artifact