ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "W. Sean Hennessy" <shenne...@goldenhourdata.com>
Subject RE: Problem with import and overriding targets
Date Fri, 14 Nov 2003 19:59:42 GMT
perhaps rename the <target name="prep" in common-tasks.xml
to <target name="common.prep"..  as you have two targets named prep
one in common-tasks.xml and the other in build-tasks.xml


-----Original Message-----
From: Corey Jewett [mailto:cj@syntheticplayground.com] 
Sent: Friday, November 14, 2003 11:00 AM
To: user@ant.apache.org
Subject: Problem with import and overriding targets


According to:
   http://ant.apache.org/manual-1.6beta/CoreTasks/import.html
    
http://nagoya.apache.org/wiki/apachewiki.cgi?NewAntFeaturesInDetail/ 
Import

I believe I should be able to do the following:

common-tasks.xml snippet:
<project default="help" name="common">
   <property file="default.properties"/>

   <target name="prep">
...
   </target>
</project>


build-tasks.xml snippet:
<project default="help" name="build">
   <import file="common-tasks.xml"/>

   <target name="prep" depends="common.prep">
...
   </target>
</project>


build.xml snippet:
<project basedir="." default="prep" name="subscriber">
   <import file="../sys-build/build-tasks.xml"/>

   <target name="subscriber" depends="prep" description="Create jar"> ...
   </target>
</project>


When I run build.xml::subscriber I get:

BUILD FAILED
Target `common.prep' does not exist in this project. It is used from  
target `prep'.

Am I missing something? Can imports be nested in this manner?

Thanks,
Corey


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message