I have a maven project and I'm using this --projects
command from the root of the project to run several pom files.
mvn clean install --projects proj1, then-proj2
The proj1
and then proj2
are the artifact ids of the projects I want to run. That is, I go to the pom.xml
for each project and use the "artifact id" there.
Both proj1 & then-proj2 are themeslves sub modules of projects in the main pom file.
Say proj1
is in A, and then-proj2
is in B, and both A & B are in the main pom file.
When I run this, maven tells me: "could not find the selected project in the reactor: proj1".
This is really frustrating - why not tell me what all the projects in the reactor are? Anyway, what am I doing wrong?
If you only use the artifactId's 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 :proj1,:then-proj2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With