I have 2 different modules called A and B. I have also another module called C.
A uses C version 1.0
B uses C version 2.0
The problem is since C 2.0 is not backward-compatible even though the groupId and artifactId values are same for C 1.0 and C 2.0 I can't exclude one of them in my pom.xml and use the other one for A and B. Therefore exclusions tag doesn't work in this case. I need to inject a dependency to a specific module.
I found out I can use OSGI for this purpose but I couldn't make it work. If you have any OSGI tutorial or another solution it would be great.