I have a multi-module maven project that can be simplified as follow:
* root
|- moduleA
- moduleB (depending on moduleA)
I want to run several commands on the structure of the project, such as mvn exec:exec
or mvn dependency:tree
. While I know that I can run this command when the project has been built at least, I would like to run this even before the first build – for CI purposes, as the build phase takes some time.
With my current configuration – a standard config referring to dependencies using their groupid:artifactid – I got errors like:
Could not resolve dependencies for project abc:moduleB:jar:0.1.0-SNAPSHOT: The following artifacts could not be resolved: abc:moduleA:jar:0.1.0-SNAPSHOT (absent)
This is fair, because they don’t exist in my local repository.
So my question is: Is there a way to teach maven that these dependencies are relative to each other, and located in the same project?
Thank you
Funny enough, the command mvn dependency:tree
does work without a build, as well as mvn versions:set
, but not mvn exec:exec
.