You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by ps...@apache.org on 2011/09/22 21:03:29 UTC
svn commit: r1174320 - /incubator/wookie/trunk/ant/ivy-java-common.xml
Author: psharples
Date: Thu Sep 22 19:03:29 2011
New Revision: 1174320
URL: http://svn.apache.org/viewvc?rev=1174320&view=rev
Log:
added a condition to test which ${ant.project.name} is trying to run publish-local and jar tasks. If its the root 'wookie' then dont run the target.
Modified:
incubator/wookie/trunk/ant/ivy-java-common.xml
Modified: incubator/wookie/trunk/ant/ivy-java-common.xml
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/ant/ivy-java-common.xml?rev=1174320&r1=1174319&r2=1174320&view=diff
==============================================================================
--- incubator/wookie/trunk/ant/ivy-java-common.xml (original)
+++ incubator/wookie/trunk/ant/ivy-java-common.xml Thu Sep 22 19:03:29 2011
@@ -143,7 +143,7 @@
</java>
</target>
- <target name="jar" depends="clean-dist, compile-core" description="--> make a jar file for this project">
+ <target name="jar" depends="test-calling-project, clean-dist, compile-core" unless="not-subproject" description="--> make a jar file for this project">
<mkdir dir="${dist.dir}"/>
<!-- Create compiled jar -->
<jar destfile="${dist.dir}/${ant.project.name}.jar">
@@ -248,9 +248,15 @@
<artifacts pattern="${dist.dir}/[artifact](-[classifier]).[ext]"/>
</ivy:publish>
<echo message="project ${ant.project.name} published to nexus snapshot repo with version ${version}" />
- </target>
+ </target>
+
+ <target name="test-calling-project">
+ <condition property="not-subproject">
+ <equals arg1="${ant.project.name}" arg2="wookie"/>
+ </condition>
+ </target>
- <target name="publish-local" depends="clean-dist, jar" description="--> publish this project in the local ivy repository">
+ <target name="publish-local" depends="test-calling-project, clean-dist, jar" unless="not-subproject" description="--> publish this project in the local ivy repository">
<echo>Locally publishing ${ant.project.name}-${version}</echo>
<delete file="${dist.dir}/ivy.xml"/> <!-- delete last produced ivy file to be sure a new one will be generated -->
<tstamp>