Hi there,

I am wondering whether it is possible to specify that some existing JAR version will NOT work with my artifact (library), though it is not my
own dependency.

Let me illustrate the problem by a very simplified example:
We have two libraries, both managed by Maven: Library 1 is called BASIC and provides some common utilities used in many other projects.
Library 2 is called EXTENDED and it depends on BASIC because it uses
those utilities.

Both libraries exist in many versions: 1.0, 1.1, etc. In a repository,
we have various jar artifacts (such as BASIC-1.4.jar, EXTENDED-1.2.jar etc.) and also POM files specifying dependencies between them. For example, EXTENDED-1.2.pom defines a dependency on artifactId="BASIC", version="[1.0,)".

After some time, I decide to release a new version of BASIC, numbered 2.0. Unfortunately, there is an incompatible change in the library API that will cause the EXTENDED library version 1.x to stop working. Therefore,
I also have to release a new version of EXTENDED: EXTENDED-2.0.jar.

Is there some way to specify that BASIC-2.0 will _not_ work with EXTENDED version < 2.0? In other words, I want to prevent top projects from declaring something like:

<dependency><artifactId>BASIC</artifactId><version>2.0</version></dependency>
<dependency><artifactId>EXTENDED</artifactId><version>1.2</version></dependency>

Of course, the conflict could be specified in the POM of EXTENDED 1.2.
But it was not known in the time of 1.2 release yet.


Sorry if I overlooked something, but I was not able to find this in the Maven documentation and it is a crucial feature for me.

Thanks for any help...
Martin Kacer

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to