Browse Source

HADOOP-7514. Build fails with ClassCastException when running both mvn-install and mvn-deploy targets. Contributed by Joep Rottinghuis.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.22@1154636 13f79535-47bb-0310-9956-ffa450edef68
Konstantin Boudnik 13 years ago
parent
commit
c5e79a2f0b
2 changed files with 6 additions and 1 deletions
  1. 3 0
      common/CHANGES.txt
  2. 3 1
      common/build.xml

+ 3 - 0
common/CHANGES.txt

@@ -527,6 +527,9 @@ Release 0.22.0 - Unreleased
 
     HADOOP-7513. mvn-deploy target fails (Joep Rottinghuis via cos)
 
+    HADOOP-7514. Build fails with ClassCastException when running both
+    mvn-install and mvn-deploy targets (Joep Rottinghuis via cos)
+
 Release 0.21.1 - Unreleased
 
   IMPROVEMENTS

+ 3 - 1
common/build.xml

@@ -1215,11 +1215,13 @@
     <get src="${ant_task_repo_url}" dest="${ant_task.jar}" usetimestamp="true"/>
   </target>
 
-  <target name="mvn-taskdef" depends="ant-task-download">
+  <target name="mvn-taskdef" depends="ant-task-download" unless="mvn-taskdef.called">
      <path id="mvn-ant-task.classpath" path="${ant_task.jar}"/> 
      <typedef resource="org/apache/maven/artifact/ant/antlib.xml" 
          uri="urn:maven-artifact-ant"
          classpathref="mvn-ant-task.classpath"/>
+  	<!-- Record that this target is already called to avoid ClassCastException. -->
+  	<property name="mvn-taskdef.called" value="true" />
   </target>   
 
   <target name="mvn-install" depends="mvn-taskdef,jar,jar-test,set-version,-mvn-system-install"