i have 3 maven project (starto.commons,starto.hibernate,starto.server) that use some same dependencies and two of then use the thread project(commons).
i try to unit the 3 project to one big maven project (lets call him starto.bigMavenProject for the example)
i mean that:
1) every project stay project on its own bat use the starto.bigMavenProject pom for dependencies
2)when i build (run mvn insatll) starto.bigMavenProject it’s build the all three project (starto.commons,starto.hibernate,starto.server).
thanks in advance.
It sounds like you want a Maven parent project for your three projects. I’d suggest taking a look at the POM documentation on inheritance as well as Sonatype’s simple example.
Basically, you want a POM for
start.bigMavenProjectsomething like this:Though you may need to do some additional tweaking to, e.g., your directory structure, etc.
The key thing is your parent POM should have
<packaging>pom</packaging>and define each sub-project as a module.