With maven is it possible to have a top-level project who\'s packaging type is \"war\" which will build itself and all of its dependent modules (packaged as jar) and have the bu
super_aardvark suggested correct way but,
For requirement I would suggest following structure It is suitable and good structure also :
Consedering ProjectA
as project-webapp
, ProjectB
as project-core
You can have following structure :
Your Grand Project :
4.0.0
com.mycompany.project
project
2.0-SNAPSHOT
pom
Project Repository System
Project Repository System R2
project-core
project-webapp
Your WebApp Project:
com.mycompany.project
project
2.0-SNAPSHOT
4.0.0
project-webapp
2.0-SNAPSHOT
war
Project Web Application
Project Repository
com.mycompany.project
project-core
2.0-SNAPSHOT
Your Core Project:
com.mycompany.project
project
2.0-SNAPSHOT
4.0.0
project-core
2.0-SNAPSHOT
jar
Project Core
ProjectCore
Your Directory structure should look like:
-------Grand Parent.pom
|
|--------project-webapp
| |
| project-webapp.pom
|
| -------project-core.pom
|
project-core.pom
From parent pom execute mvn clean install
it will build both the web-app and core project