Simple but not always true. First, the fact that EXTENDED depends on BASIC is an internal issue of the EXTENDED library. Future versions may not depend on it and top-level projects should not be aware of the dependency.
Second, the conflict may also occur between projects (libraries) without a direct dependecy. Imagine we have two optional modules, each of them may be used separately by a top-level project. But if both of them are used together, there are some limits on version numbers (such as, module A will not work with B of version smaller than 2.0). Martin On Wed, 21 Jan 2009, Jeff MAURY wrote: # If EXTENDED depends on BASIC, then your POM user should only declare # EXTENDED as a dependency and not BASIC. # # Jeff MAURY # # On Tue, Jan 20, 2009 at 9:02 PM, Martin Kacer <[email protected]> wrote: # # > 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] # > # > # # # -- # La mélancolie c'est communiste # Tout le monde y a droit de temps en temps # La mélancolie n'est pas capitaliste # C'est m?me gratuit pour les perdants # La mélancolie c'est pacifiste # On ne lui rentre jamais dedans # La mélancolie oh tu sais ça existe # Elle se prend m?me avec des gants # La mélancolie c'est pour les syndicalistes # Il faut juste sa carte de permanent # # Miossec (2006) # # http://www.jeffmaury.com # http://riadiscuss.jeffmaury.com # http://www.lastfm.fr/listen/user/jeffmaury/personal # Mes CDs ? récupérer: # http://spreadsheets.google.com/ccc?key=pNeg4Doa_oCsh7CepKPaPTA&hl=en #
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
