Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-798

Exclude second Ant JAR from classpath in hdfs builds

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 0.22.0
    • Fix Version/s: None
    • Component/s: build
    • Labels:
      None

      Description

      I've no evidence that this is a problem, but I have known it to be in different projects:

          [junit] WARNING: multiple versions of ant detected in path for junit 
          [junit]          jar:file:/Users/slo/Java/Apache/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
          [junit]      and jar:file:/Users/slo/.ivy2/cache/ant/ant/jars/ant-1.6.5.jar!/org/apache/tools/ant/Project.class
      

      Somehow Ivy needs to be set up to skip pulling in an old version of Ant in the build -both paranamer-ant and jsp-2.1 declare a dependency on it. If both tools are only ever run under Ant, the ivy.xml file could exclude it, the build file just has to make sure that Ant's own classpath gets passed down.

      1. HDFS-798.patch
        0.3 kB
        Konstantin Boudnik

        Issue Links

          Activity

          Hide
          Konstantin Boudnik added a comment -

          This ant comes as a dependency of jasper-compier 5.5.23 Unless we update jasper compiler we are likely to face this again and again.

          Show
          Konstantin Boudnik added a comment - This ant comes as a dependency of jasper-compier 5.5.23 Unless we update jasper compiler we are likely to face this again and again.
          Hide
          Konstantin Boudnik added a comment -

          This fixes the issue

          Show
          Konstantin Boudnik added a comment - This fixes the issue
          Hide
          Konstantin Boudnik added a comment -

          a similar fix is needed for MR, apparently (will open a separate issue for that)

          Show
          Konstantin Boudnik added a comment - a similar fix is needed for MR, apparently (will open a separate issue for that)
          Hide
          Steve Loughran added a comment -

          That will eliminate the complaint, but I now worry that ant core is needed for the eclipse javac compiler that jsp2.1 uses. It may be safest to ignore the complaint to ensure that the runtimes are set up right, and ensure that the version of ant that is added is the same version that the project is built with.

          FWIW, my ivy dependencies for jsp do pull in a version of ant, so that it gets passed down the chain, with a separate JSP config that includes everything that JSP pages need:

           
              <dependency org="org.mortbay.jetty"
                  name="jetty"
                  rev="${jetty.version}"
                  conf="compile->master;redist->master"/>
              <dependency org="org.mortbay.jetty"
                  name="jetty-util"
                  rev="${jetty.version}"
                  conf="compile->master;redist->master"/>
          
              <!-- logging-->
              <dependency org="org.smartfrog"
                  name="sf-loggingservices"
                  changing="true"
                  rev="latest.integration"
                  conf="compile,runtime,jsp->default;redist->redist"/>    
              
              <!--JSP support -->
              <dependency org="org.mortbay.jetty"
                  name="jsp-2.1"
                  rev="${jetty.jsp.version}"
                  conf="jsp->master"/>
              <dependency org="org.mortbay.jetty"
                  name="jsp-api-2.1"
                  rev="${jetty.jsp.version}"
                  conf="jsp->master"/>
              <dependency org="commons-el"
                  name="commons-el"
                  rev="${commons-el.version}"
                  conf="jsp->master"/>
              <!--this is the compiler stage-->
              <dependency org="org.smartfrog"
                  name="sf-ant"
                  rev="latest.integration"
                  conf="jsp->default"/>
              <dependency org="org.eclipse.jdt"
                  name="core"
                  rev="${org.eclipse.jdt.core.version}"
                  conf="jsp->master"/>
          
          Show
          Steve Loughran added a comment - That will eliminate the complaint, but I now worry that ant core is needed for the eclipse javac compiler that jsp2.1 uses. It may be safest to ignore the complaint to ensure that the runtimes are set up right, and ensure that the version of ant that is added is the same version that the project is built with. FWIW, my ivy dependencies for jsp do pull in a version of ant, so that it gets passed down the chain, with a separate JSP config that includes everything that JSP pages need: <dependency org="org.mortbay.jetty" name="jetty" rev="${jetty.version}" conf="compile->master;redist->master"/> <dependency org="org.mortbay.jetty" name="jetty-util" rev="${jetty.version}" conf="compile->master;redist->master"/> <!-- logging--> <dependency org="org.smartfrog" name="sf-loggingservices" changing="true" rev="latest.integration" conf="compile,runtime,jsp->default;redist->redist"/> <!--JSP support --> <dependency org="org.mortbay.jetty" name="jsp-2.1" rev="${jetty.jsp.version}" conf="jsp->master"/> <dependency org="org.mortbay.jetty" name="jsp-api-2.1" rev="${jetty.jsp.version}" conf="jsp->master"/> <dependency org="commons-el" name="commons-el" rev="${commons-el.version}" conf="jsp->master"/> <!--this is the compiler stage--> <dependency org="org.smartfrog" name="sf-ant" rev="latest.integration" conf="jsp->default"/> <dependency org="org.eclipse.jdt" name="core" rev="${org.eclipse.jdt.core.version}" conf="jsp->master"/>
          Hide
          Konstantin Boudnik added a comment -

          I now worry that ant core is needed for the eclipse javac compiler that jsp2.1 uses

          Steve, I won't be able to tell if you if this patch is breaking anything in Eclipse or not - I am not using Eclipse for anything. So, if you use it - please verify if the patch works for you?

          ensure that the version of ant that is added is the same version that the project is built with.

          I am not sure if Ivy allows to override version of a transitive dependency. Maven sure does.

          Show
          Konstantin Boudnik added a comment - I now worry that ant core is needed for the eclipse javac compiler that jsp2.1 uses Steve, I won't be able to tell if you if this patch is breaking anything in Eclipse or not - I am not using Eclipse for anything. So, if you use it - please verify if the patch works for you? ensure that the version of ant that is added is the same version that the project is built with. I am not sure if Ivy allows to override version of a transitive dependency. Maven sure does.
          Hide
          Konstantin Shvachko added a comment -

          I agree with Steve, building in eclipse works strange for me. Compile is fine, but if I try run-commit-test it never runs tests, while without the patch it does.

          Show
          Konstantin Shvachko added a comment - I agree with Steve, building in eclipse works strange for me. Compile is fine, but if I try run-commit-test it never runs tests, while without the patch it does.
          Hide
          Konstantin Boudnik added a comment -

          So, shall I close it won't fix then?

          Show
          Konstantin Boudnik added a comment - So, shall I close it won't fix then?
          Hide
          Konstantin Boudnik added a comment -

          Fat fingers...
          shall I close it as won't fix then?

          Show
          Konstantin Boudnik added a comment - Fat fingers... shall I close it as won't fix then?
          Hide
          Konstantin Shvachko added a comment -

          I think so, yes.

          Show
          Konstantin Shvachko added a comment - I think so, yes.
          Hide
          Konstantin Boudnik added a comment -

          People are concerned about some weird side-effects that this fix has in Eclipse environment.

          Show
          Konstantin Boudnik added a comment - People are concerned about some weird side-effects that this fix has in Eclipse environment.

            People

            • Assignee:
              Konstantin Boudnik
              Reporter:
              Steve Loughran
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development