I have 3 projects - A
, B
and C
.
A
has dependencies on B
and C
, and I deploy A
to Tomcat in eclipse.
I want A
to deploy with the workspace versions of A
and B
. I don't want my workspace copy of project C
to be picked up (instead I want the installed version in ~/.m2/
to be picked up).
I can achieve this by closing project C
in Eclipse. However, I want to keep project C
open.
Is this possible?
You can execute
mvn install
on your project C with a closed version in your pom.xml file, let's say 1.0. This will leave a 1.0 version of your project C deliverable in your ~/.m2.Make sure project A pom.xml and project B pom.xml depend on version 1.0 of project C.
For example, Project A and B pom.xml:
Then you can just change the version in your project C pom.xml to, let's say 2.0, and then tell Eclipse to update all your maven projects.
Project C pom.xml:
The situation will be:
This way you can always adjust maven dependencies back in A and B in order to depend on your development version of C, or just keep them depending on your closed version of C.jar