Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-9249

hadoop-maven-plugins version-info goal causes build failure when running with Clover

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 3.0.0-alpha1
    • Component/s: build
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      Running Maven with the -Pclover option for code coverage causes the build to fail because of not finding a Clover class while running hadoop-maven-plugins version-info.

      1. HADOOP-9249.1.patch
        0.7 kB
        Chris Nauroth

        Issue Links

          Activity

          Hide
          cnauroth Chris Nauroth added a comment -

          See error below. We'll need to change hadoop-maven-plugins/pom.xml to put Clover on the classpath.

          [INFO] --- hadoop-maven-plugins:3.0.0-SNAPSHOT:version-info (version-info) @ hadoop-common ---
          [CLOVER] FATAL ERROR: Clover could not be initialised. Are you sure you have Clover in the runtime classpath? (class java.lang.NoClassDefFoundError:com_cenqua_clover/CloverVersionInfo)
          
          ...
          
          [ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:version-info (version-info) on project hadoop-common: Execution version-info of goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:version-info failed: A required class was missing while executing org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:version-info: com_cenqua_clover/CoverageRecorder
          
          Show
          cnauroth Chris Nauroth added a comment - See error below. We'll need to change hadoop-maven-plugins/pom.xml to put Clover on the classpath. [INFO] --- hadoop-maven-plugins:3.0.0-SNAPSHOT:version-info (version-info) @ hadoop-common --- [CLOVER] FATAL ERROR: Clover could not be initialised. Are you sure you have Clover in the runtime classpath? (class java.lang.NoClassDefFoundError:com_cenqua_clover/CloverVersionInfo) ... [ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:version-info (version-info) on project hadoop-common: Execution version-info of goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:version-info failed: A required class was missing while executing org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:version-info: com_cenqua_clover/CoverageRecorder
          Hide
          cnauroth Chris Nauroth added a comment -

          It turns out that there is a configuration option that a sub-module can set to skip Clover instrumentation. I'm uploading a patch that does that. With this in place, the plugin won't get instrumented, and we won't have a situation of an instrumented class having a dependency on a Clover class during plugin execution.

          I've tested this patch by running Maven with the -Pclover option.

          Show
          cnauroth Chris Nauroth added a comment - It turns out that there is a configuration option that a sub-module can set to skip Clover instrumentation. I'm uploading a patch that does that. With this in place, the plugin won't get instrumented, and we won't have a situation of an instrumented class having a dependency on a Clover class during plugin execution. I've tested this patch by running Maven with the -Pclover option.
          Hide
          hadoopqa Hadoop QA added a comment -

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

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

          -1 tests included. The patch doesn't appear to include any new or modified tests.
          Please justify why no new tests are needed for this patch.
          Also please list what manual steps were performed to verify this patch.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed unit tests in hadoop-maven-plugins.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/2095//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/2095//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12566554/HADOOP-9249.1.patch against trunk revision . +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-maven-plugins. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/2095//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/2095//console This message is automatically generated.
          Hide
          cnauroth Chris Nauroth added a comment -

          The patch only changes a pom.xml, so there are no tests.

          Show
          cnauroth Chris Nauroth added a comment - The patch only changes a pom.xml, so there are no tests.
          Hide
          kkambatl Karthik Kambatla (Inactive) added a comment -

          +1

          Show
          kkambatl Karthik Kambatla (Inactive) added a comment - +1
          Hide
          iveselovsky Ivan A. Veselovsky added a comment -

          This seems to be a duplicate of HADOOP-9235.

          Show
          iveselovsky Ivan A. Veselovsky added a comment - This seems to be a duplicate of HADOOP-9235 .
          Hide
          cnauroth Chris Nauroth added a comment -

          Sorry, I had missed HADOOP-9235. Thank you for pointing it out.

          I think the patch shown here on HADOOP-9249 is preferable, because the <skip> declaration skips all Clover processing for the sub-module. If we ever change the internal code structure of hadoop-maven-plugins (i.e. add code outside of org/apache/hadoop/maven/plugin), then we won't need to remember to update the <exclude> filter in the top-level pom.xml. Also, if we ever decide we'd rather deploy hadoop-maven-plugins as a separate project instead of a sub-module of hadoop-common, then we won't need to remember to clean up the top-level pom.xml.

          Ivan, what do you think?

          Show
          cnauroth Chris Nauroth added a comment - Sorry, I had missed HADOOP-9235 . Thank you for pointing it out. I think the patch shown here on HADOOP-9249 is preferable, because the <skip> declaration skips all Clover processing for the sub-module. If we ever change the internal code structure of hadoop-maven-plugins (i.e. add code outside of org/apache/hadoop/maven/plugin), then we won't need to remember to update the <exclude> filter in the top-level pom.xml. Also, if we ever decide we'd rather deploy hadoop-maven-plugins as a separate project instead of a sub-module of hadoop-common, then we won't need to remember to clean up the top-level pom.xml. Ivan, what do you think?
          Hide
          iveselovsky Ivan A. Veselovsky added a comment -

          Chris, yes, I absolutely agree with you. This fix is much better.

          Show
          iveselovsky Ivan A. Veselovsky added a comment - Chris, yes, I absolutely agree with you. This fix is much better.
          Hide
          sureshms Suresh Srinivas added a comment -

          +! for the patch. I verified that this patch indeed fixes the problem.

          Show
          sureshms Suresh Srinivas added a comment - +! for the patch. I verified that this patch indeed fixes the problem.
          Hide
          sureshms Suresh Srinivas added a comment -

          Committed to trunk.

          Thank you Chris!

          Show
          sureshms Suresh Srinivas added a comment - Committed to trunk. Thank you Chris!
          Hide
          hudson Hudson added a comment -

          Integrated in Hadoop-trunk-Commit #3296 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3296/)
          HADOOP-9249. hadoop-maven-plugins version-info goal causes build failure when running with Clover. Contributed by Chris Nauroth. (Revision 1440200)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1440200
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-maven-plugins/pom.xml
          Show
          hudson Hudson added a comment - Integrated in Hadoop-trunk-Commit #3296 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3296/ ) HADOOP-9249 . hadoop-maven-plugins version-info goal causes build failure when running with Clover. Contributed by Chris Nauroth. (Revision 1440200) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1440200 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-maven-plugins/pom.xml
          Hide
          hudson Hudson added a comment -

          Integrated in Hadoop-Yarn-trunk #112 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/112/)
          HADOOP-9249. hadoop-maven-plugins version-info goal causes build failure when running with Clover. Contributed by Chris Nauroth. (Revision 1440200)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1440200
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-maven-plugins/pom.xml
          Show
          hudson Hudson added a comment - Integrated in Hadoop-Yarn-trunk #112 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/112/ ) HADOOP-9249 . hadoop-maven-plugins version-info goal causes build failure when running with Clover. Contributed by Chris Nauroth. (Revision 1440200) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1440200 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-maven-plugins/pom.xml
          Hide
          hudson Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #1301 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1301/)
          HADOOP-9249. hadoop-maven-plugins version-info goal causes build failure when running with Clover. Contributed by Chris Nauroth. (Revision 1440200)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1440200
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-maven-plugins/pom.xml
          Show
          hudson Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1301 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1301/ ) HADOOP-9249 . hadoop-maven-plugins version-info goal causes build failure when running with Clover. Contributed by Chris Nauroth. (Revision 1440200) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1440200 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-maven-plugins/pom.xml
          Hide
          hudson Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #1329 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1329/)
          HADOOP-9249. hadoop-maven-plugins version-info goal causes build failure when running with Clover. Contributed by Chris Nauroth. (Revision 1440200)

          Result = SUCCESS
          suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1440200
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-maven-plugins/pom.xml
          Show
          hudson Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1329 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1329/ ) HADOOP-9249 . hadoop-maven-plugins version-info goal causes build failure when running with Clover. Contributed by Chris Nauroth. (Revision 1440200) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1440200 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-maven-plugins/pom.xml

            People

            • Assignee:
              cnauroth Chris Nauroth
              Reporter:
              cnauroth Chris Nauroth
            • Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development