My maven project structure is as below
Project A
pom.xml
- ProjectB
pom.xml
- ProjectC
pom.xml
- ProjectD
pom.xml
- ProjectY
p
This is an answer from a similar question that is also relevant here.
By using artifactIds you don't have to know the structure of your project.
If you only use the artifactIds of the given project you have to define that correctly on command line:
help output of Maven (mvn --help
)
Comma-delimited list of specified reactor projects to build of all projects. A project can be specified by [groupId]:artifactId or by its relative path
This means in your case you have to define:
mvn clean install --projects :projectC,:ProjectY
Notice the :
that is prepended to the artifactIds to indicate you omit the groupId