<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    No need for the exclusions.... in most cases (99.999999%) anyway.<br>
    <br>
    If *my* project requires jdom 2.0.1 and the transitive dependency
    requires jdom 1.1.3 then maven will 'pick' only one of them, and it
    will pick the most recent, which makes it pick jdom 2.0.1. There is
    no need to exclude the 1.1.3 version in the transitive dependency.<br>
    <br>
    The exception to that is in the odd instance (which I cannot find an
    example of), where the transitive dependency forces version 1.x
    using special maven version descriptors (like
    <version>[1.1.3]</version> ) in which case maven will
    select the 1.1.3 version instead of the 2.0.1, and only then would
    you need to add an exclusion to the transitive dependency.<br>
    <br>
    Rolf<br>
    <br>
    Here is the example POM I used to test things out (note that
    net.sourceforge.htmlcleaner depends on JDOM 1.1):<br>
    <br>
    <project xmlns=<a class="moz-txt-link-rfc2396E" href="http://maven.apache.org/POM/4.0.0">"http://maven.apache.org/POM/4.0.0"</a>
    xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a><br>
      xsi:schemaLocation=<a class="moz-txt-link-rfc2396E" href="http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v4_0_0.xsd">"http://maven.apache.org/POM/4.0.0
    http://maven.apache.org/maven-v4_0_0.xsd"</a>><br>
      <modelVersion>4.0.0</modelVersion><br>
      <groupId>net.tuis.tst</groupId><br>
      <artifactId>usesjdom</artifactId><br>
      <packaging>jar</packaging><br>
      <version>1.0-SNAPSHOT</version><br>
      <name>usesjdom</name><br>
      <url><a class="moz-txt-link-freetext" href="http://maven.apache.org">http://maven.apache.org</a></url><br>
      <dependencies><br>
        <dependency><br>
          <groupId>junit</groupId><br>
          <artifactId>junit</artifactId><br>
          <version>3.8.1</version><br>
          <scope>test</scope><br>
        </dependency><br>
        <dependency><br>
          <groupId>org.jdom</groupId><br>
          <artifactId>jdom</artifactId><br>
          <version>2.0.1</version><br>
          <scope>compile</scope><br>
        </dependency><br>
        <dependency><br>
          <groupId>org.jdom</groupId><br>
          <artifactId>jdom.legacy</artifactId><br>
          <version>1.1.3</version><br>
        </dependency><br>
        <dependency><br>
          <groupId>net.sourceforge.htmlcleaner</groupId><br>
          <artifactId>htmlcleaner</artifactId><br>
          <version>2.2</version><br>
        </dependency><br>
      </dependencies><br>
    </project><br>
    <br>
    <br>
    <br>
    On 08/06/2012 2:07 AM, Mattias Jiderhamn wrote:
    <blockquote cite="mid:4FD196BA.9040406@expertsystems.se" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      Let me see if I get this (again, I haven't used Maven for too
      long):<br>
      <br>
      If you want to have a Maven project, with transitive dependencies
      on JDOM <= 1.1.3 (before the re-release), while you want to use
      JDOM 2 yourself, then (until the dependency project "updates" to
      jdom-legacy) you'd have to <br>
      - Add <exclusions> to the depency which adds the transitive
      JDOM 1 depedency<br>
      - Explicitly depend on jdom-legacy instead<br>
      - Depend on JDOM 2, for your own use<br>
      <br>
      Right?<br>
      <br>
      Could multiple depency levels cause problems here (depending on A
      which depends on B which depends on JDOM < 1.1.3), or does
      <exclusions> (for A) work in that case also?<br>
      <br>
       </Mattias><span style="font-size:8pt">
        <!-- "Exder - Makes you do business" --> </span>
      <div class="moz-signature">
        <div style="font-family: Arial, Helvetica, Verdana,
          sans-serif;font-size:10pt"> </div>
      </div>
      <br>
      ----- Original Message ----- <br>
      Subject: Re: [jdom-interest] Preparing next release <br>
      Date: Tue, 05 Jun 2012 15:03:18 -0400 <br>
      From: Rolf Lear <a moz-do-not-send="true"
        class="moz-txt-link-rfc2396E" href="mailto:jdom@tuis.net"><jdom@tuis.net></a>
      <br>
      <br>
      <br>
      hello everyone (again). <br>
      <br>
      After some 'study', and some discussion on the maven-user's
      mailing list, <br>
      I have come to the conclusion that the maven predicament is best
      solved <br>
      using a 'legacy' type approach. <br>
      <br>
      In summary, I plan to re-release jdom 1.1.3 on maven-central as
      the new <br>
      artifact 'jdom-legacy' version 1.1.3. <br>
      <br>
      The reasons are as follows: <br>
      1. For non-maven JDOM users it makes no difference (there is no
      impact for <br>
      non-maven users). <br>
      2. For most maven users there is no impact (they can just choose
      which <br>
      version of the 'jdom' artifact they want to use). <br>
      3. For those maven users needing both 1.x and 2.x they can use
      'jdom' <br>
      artifact for 2.x, and the 'jdom-legacy' artifact for 1.x <br>
      4. This 'solution' does not 'burn any (more) bridges'.... <br>
      5. It makes the maven processes independent of JDOM releases. <br>
      <br>
      <br>
      Future versions of jdom 2.x will continue to be released to the
      jdom <br>
      artifact. <br>
      <br>
      <br>
      <br>
      Rolf <br>
      <br>
      <br>
      On Wed, 30 May 2012 19:23:35 -0400, Rolf Lear <a
        moz-do-not-send="true" class="moz-txt-link-rfc2396E"
        href="mailto:jdom@tuis.net"><jdom@tuis.net></a> wrote: <br>
      > Hi again. <br>
      > <br>
      > Just to let you know that while I was originally going to
      release 2.0.2 <br>
      > before month-end, I have instead decided to release it
      probably some <br>
      > time next week. <br>
      > <br>
      > In the interim I am learning a bunch about maven, and I am
      tracking down <br>
      <br>
      > some additional input to how to resolve the maven problems.
      It seems <br>
      > that learning maven to the extent I need is not going to be a
      1-day <br>
      > exercise. <br>
      > <br>
      > So, expect 2.0.2 before the 9th of June. <br>
      > <br>
      > Rolf <br>
      > <br>
      > On 28/05/2012 7:47 AM, Rolf Lear wrote: <br>
      >> <br>
      >> Hi All. <br>
      >> <br>
      >> I am getting ready to push out version 2.0.2 of the JDOM
      2.x stream. <br>
      >> <br>
      >> Currently in this release is the fix for issue #81
      (resetting live <br>
      >> FitlerLists after a remove()). <br>
      >> <br>
      >> This is the only known bug in JDOM 2.x and a 'hotfix' has
      been <br>
      available <br>
      >> for a few weeks. It is time to push out the official
      release. <br>
      >> <br>
      >> <br>
      >> Additionally, there are issues/concerns regarding the
      maven artifiacts. <br>
      >> The core issue is that currently it is not possible to
      'require' both <br>
      >> JDOM <br>
      >> 1.x and 2.x in your maven project. There appears to be
      only one <br>
      solution <br>
      >> to <br>
      >> this issue and that is to have different 'artifacts' for
      JDOM 1 and <br>
      JDOM <br>
      >> 2. <br>
      >> Obviously (in hindsight) it should have been done this
      way originally, <br>
      >> but <br>
      >> there was simply not enough 'expert'
      feedback/input/assistance when the <br>
      >> decisions were being made, and this mistake is now
      something that just <br>
      >> has <br>
      >> to be lived with. <br>
      >> <br>
      >> As a result, it appears necessary to deploy JDOM 2.0.2 to
      the maven <br>
      >> artifact 'jdom2' (previous versions were deployed to
      'jdom'). <br>
      >> <br>
      >> While this change will make it possible to include both
      JDOM 1.x and <br>
      2.x <br>
      >> in your maven projects it will also introduce a number of
      irritating <br>
      >> side-effects: <br>
      >> <br>
      >> For 'regular' users, note: <br>
      >> 1. previous versions of JDOM 2.x were called
      jdom-2.0.0.jar and <br>
      >> jdom-2.0.1.jar. This new version will be called
      jdom2-2.0.2.jar, and <br>
      the <br>
      >> 'zip' file will be called jdom2-2.0.2.zip <br>
      >> <br>
      >> For maven users, note: <br>
      >> <br>
      >> 1. if you have already incorporated JDOM 2.x in your
      project you should <br>
      >> update your dependency to be for artifact jdom2, not jdom
      <br>
      >> 2. ensure any maven project you require that also depends
      on JDOM aware <br>
      >> of <br>
      >> this problem... because, if that required project
      'upgrades' to the <br>
      jdom <br>
      >> artifact version 2.0.1 (instead of jdom2) then you will
      get two <br>
      different <br>
      >> versions of jdom 2.x in your classpath, and there is no
      telling what <br>
      will <br>
      >> result..... <br>
      >> <br>
      >> <br>
      >> So, it is quite possible that by 'solving' the issue
      relating to <br>
      >> requiring <br>
      >> both JDOM 1.x and 2.x, that we will instead be
      introducing even worse <br>
      >> problems, but I have been assured that this is the 'only'
      way to move <br>
      >> forward from here. <br>
      >> <br>
      >> If anyone has comments, concerns, suggestions, I am all
      ears. <br>
      >> <br>
      >> Rolf <br>
      >> <br>
      >> _______________________________________________ <br>
      >> To control your jdom-interest membership: <br>
      >> <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com">http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com</a>
      <br>
      >> <br>
      _______________________________________________ <br>
      To control your jdom-interest membership: <br>
      <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com">http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com</a>
      <br>
      <br>
      <br>
      <pre class="moz-signature" cols="72">-- 

  </Mattias></pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
To control your jdom-interest membership:
<a class="moz-txt-link-freetext" href="http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com">http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com</a></pre>
    </blockquote>
    <br>
  </body>
</html>