ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Corey Jewett ...@syntheticplayground.com>
Subject Re: Problem with import and overriding targets
Date Sat, 15 Nov 2003 00:13:07 GMT
The problem was actually that I forgot to save common-tasks.xml.

Thanks for your help,
Corey

On Friday, November 14, 2003, at 11:59 AM, W. Sean Hennessy wrote:

> 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
>


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


Mime
View raw message