Hadoop Common
  1. Hadoop Common
  2. HADOOP-7248

Have a way to automatically update Eclipse .classpath file when new libs are added to the classpath through Ivy for 0.20-* based sources

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.20.3
    • Fix Version/s: 0.20.204.0
    • Component/s: build
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Backport HADOOP-6407 into 0.20 based source trees

      1. C7248-1.patch
        15 kB
        Chris Douglas
      2. HADOOP-7248-branch-20-security.patch
        15 kB
        Thomas Graves

        Issue Links

          Activity

          Hide
          Thomas Graves added a comment -

          I've backported this change to the branch-0.20-security. I'm facing an issue in running the unit tests in eclipse where it can't find the webapps directory now. I see there was a jira https://issues.apache.org/jira/browse/HADOOP-6461 that went into 22 that worked around the issue. I'm looking for feedback if people think that is the proper thing to do or if I should have the build.xml copy it into the eclipse classpath or something else? I'm new to hadoop so am not familiar with all the use cases and processes yet.

          Also does anyone know if all the tests in the 20 branch were running via eclipse?

          Show
          Thomas Graves added a comment - I've backported this change to the branch-0.20-security. I'm facing an issue in running the unit tests in eclipse where it can't find the webapps directory now. I see there was a jira https://issues.apache.org/jira/browse/HADOOP-6461 that went into 22 that worked around the issue. I'm looking for feedback if people think that is the proper thing to do or if I should have the build.xml copy it into the eclipse classpath or something else? I'm new to hadoop so am not familiar with all the use cases and processes yet. Also does anyone know if all the tests in the 20 branch were running via eclipse?
          Hide
          Thomas Graves added a comment -

          patch for branch-0.20-security

          Show
          Thomas Graves added a comment - patch for branch-0.20-security
          Hide
          Thomas Graves added a comment -

          [exec] -1 overall.
          [exec] [exec] +1 @author. The patch does not contain any @author tags.
          [exec] [exec] +1 tests included. The patch appears to include 19 new or modified tests.
          [exec] [exec] -1 javadoc. The javadoc tool appears to have generated 1 warning messages.
          [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
          [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
          [exec] [exec] -1 Eclipse classpath. The patch causes the Eclipse classpath to differ from the contents of the lib directories.

          [exec]

          The javadoc and eclipse classpath were failing before this patch. Once this is commited the eclipse classpath check should start showing +1 again.

          I manually tested this:

          • check out svn tree
          • apply patch
          • svn rm the empty files
          • build eclipse target either from within eclipse or with ant eclipse
          • refresh eclipse
          • build eclipse project
          • everything resolves and you can run unit tests
          Show
          Thomas Graves added a comment - [exec] -1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 19 new or modified tests. [exec] [exec] -1 javadoc. The javadoc tool appears to have generated 1 warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] -1 Eclipse classpath. The patch causes the Eclipse classpath to differ from the contents of the lib directories. [exec] The javadoc and eclipse classpath were failing before this patch. Once this is commited the eclipse classpath check should start showing +1 again. I manually tested this: check out svn tree apply patch svn rm the empty files build eclipse target either from within eclipse or with ant eclipse refresh eclipse build eclipse project everything resolves and you can run unit tests
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12478446/HADOOP-7248-branch-20-security.patch
          against trunk revision 1100113.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 19 new or modified tests.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/415//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12478446/HADOOP-7248-branch-20-security.patch against trunk revision 1100113. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 19 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/415//console This message is automatically generated.
          Hide
          Thomas Graves added a comment -

          build failed because patch is for branch-0.20-security not trunk.

          Show
          Thomas Graves added a comment - build failed because patch is for branch-0.20-security not trunk.
          Hide
          Chris Douglas added a comment -

          This section:

          +        <source path="${test.src.dir}/mapred"
          +                output="${build.dir.eclipse-test-classes}" />
          

          Didn't work on git, because the src/test/mapred dirs are empty in subversion. I deleted this tree from SVN and updated the patch.

          +1 Otherwise. Applied this to a fresh checkout, ran the new target, and all was good.

          Show
          Chris Douglas added a comment - This section: + <source path="${test.src.dir}/mapred" + output="${build.dir.eclipse-test-classes}" /> Didn't work on git, because the src/test/mapred dirs are empty in subversion. I deleted this tree from SVN and updated the patch. +1 Otherwise. Applied this to a fresh checkout, ran the new target, and all was good.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12478740/C7248-1.patch
          against trunk revision 1101653.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 19 new or modified tests.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/424//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12478740/C7248-1.patch against trunk revision 1101653. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 19 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/424//console This message is automatically generated.
          Hide
          Chris Douglas added a comment -

          I took a closer look at the patch, and came across this section:

          +  <condition property="ant-eclipse.jar.exists">
          +    <available file="${build.dir}/lib/ant-eclipse-1.0-jvm1.2.jar"/>
          +  </condition>
          +
          +  <target name="ant-eclipse-download" unless="ant-eclipse.jar.exists"
          +          description="Downloads the ant-eclipse binary.">
          +    <get src="http://downloads.sourceforge.net/project/ant-eclipse/ant-eclipse/1.0/ant-eclipse-1.0.bin.tar.bz2"
          +         dest="${build.dir}/ant-eclipse-1.0.bin.tar.bz2" usetimestamp="false" />
          +
          +    <untar src="${build.dir}/ant-eclipse-1.0.bin.tar.bz2"
          +           dest="${build.dir}" compression="bzip2">
          +      <patternset>
          +        <include name="lib/ant-eclipse-1.0-jvm1.2.jar"/>
          +      </patternset>
          +    </untar>
          +    <delete file="${build.dir}/ant-eclipse-1.0.bin.tar.bz2" />
          +  </target>
          

          Installing this jar into the maven cache would not only avoid downloading it so often, but it would also make the eclipse target valid when building offline. However, it looks like HADOOP-6407 (and related issues) made the same choice, so this can be a separate issue.

          I committed this to the 20-security branch.

          Show
          Chris Douglas added a comment - I took a closer look at the patch, and came across this section: + <condition property="ant-eclipse.jar.exists"> + <available file="${build.dir}/lib/ant-eclipse-1.0-jvm1.2.jar"/> + </condition> + + <target name="ant-eclipse-download" unless="ant-eclipse.jar.exists" + description="Downloads the ant-eclipse binary."> + <get src="http://downloads.sourceforge.net/project/ant-eclipse/ant-eclipse/1.0/ant-eclipse-1.0.bin.tar.bz2" + dest="${build.dir}/ant-eclipse-1.0.bin.tar.bz2" usetimestamp="false" /> + + <untar src="${build.dir}/ant-eclipse-1.0.bin.tar.bz2" + dest="${build.dir}" compression="bzip2"> + <patternset> + <include name="lib/ant-eclipse-1.0-jvm1.2.jar"/> + </patternset> + </untar> + <delete file="${build.dir}/ant-eclipse-1.0.bin.tar.bz2" /> + </target> Installing this jar into the maven cache would not only avoid downloading it so often, but it would also make the eclipse target valid when building offline. However, it looks like HADOOP-6407 (and related issues) made the same choice, so this can be a separate issue. I committed this to the 20-security branch.
          Hide
          Owen O'Malley added a comment -

          Hadoop 0.20.204.0 was released today.

          Show
          Owen O'Malley added a comment - Hadoop 0.20.204.0 was released today.

            People

            • Assignee:
              Thomas Graves
              Reporter:
              Konstantin Boudnik
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development