I have a project A that depends on a project I that contains interfaces implemented by a third project, B.
I want project B to be dinamically plugged in project A's pom.xml at compile time, without changing A's pom.xml and providing properties to Maven by the command line (example
mvn package -Dmodule.artifactId=[B_ARTIFACTID] -Dmodule.version=[B_VERSION]
) where B_ARTIFACTID
and B_VERSION
refers to project B.
The aim is to tag a version of project A and, throught the interfaces contained in I, use the implementation contained in a fourth project C that implement I with the same version of project A, just changing the command line that builds it.
I know this is possible using profile properties, but at the time project A will be tagged it will not resolve dependency, how to fix this without using a default dependency?
B and C depends on a project identified by:
<groupId>project</groupId>
<artifactId>I</artifactId>
<version>0.1.0.0</version>
Project A
<dependencies>
<dependency>
<groupId>project</groupId>
<artifactId>I</artifactId>
<version>0.1.0.0</version>
<dependency>
<dependency>
<groupId>project</groupId>
<artifactId>???</artifactId>
<version>???</version>
<scope>runtime</scope>
<dependency>
EDIT: i said that i don't want to do it with properties, because it will not resolve dependency at the time i tag project A.