ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Nested import task problem / anttask problem
Date Tue, 23 Feb 2010 12:53:40 GMT
Not sure about the <project default=""> in b.xml ...


Jan 

>-----Urspr√ľngliche Nachricht-----
>Von: Gopala Krishna [mailto:gopalakrishna.taninki@applabs.com] 
>Gesendet: Dienstag, 23. Februar 2010 13:18
>An: user@ant.apache.org
>Betreff: Nested import task problem / anttask problem
>
>Hi,
>
> 
>
>I am trying to execute an ant target through program. I have 
>used import task and those are nested in each build file. This 
>is working fine when executed via command line and throwing 
>error when I execute target-a using ProjectHelper.
>
> 
>
>The below are my ant build files. Has anyone tried these kind 
>of import tasks. Please let me know where exactly I am going 
>wrong with this.
>
> 
>
>a.xml:
>
>======
>
><project name="project-a" basedir="." Default="target-b">
>
> <import file="b.xml"/>
>
>  <target name="target-a">
>
>    <echo file="/tmp/project-a.txt">This is target a</echo>
>
>  </target>
>
></project>
>
> 
>
>b.xml:
>
>======
>
><project name="project-b" basedir="." default="">
>
>  <import file="c.xml"/>
>
>    <target name="target-b">
>
>            <echo file="/tmp/project-b.txt">This is target b</echo>
>
>            <antcall target="_warnExists"/>
>
>  </target>
>
>  <target name="target-b1">
>
>                        <antcall target="_warnExists"/>
>
>  </target>
>
>            <target name="_warnExists">
>
>                        <echo>Appears to already exist</echo>
>
>            </target>
>
></project>
>
> 
>
>c.xml:
>
>======
>
><project name="project-c" basedir="." default="">
>
>  <target name="target-c" depends=" target-b,target-a">
>
>    <echo file="/tmp/project-c.txt">This is target c</echo>
>
>  </target>
>
></project>
>
> 
>
>I am getting the error  ""C:\build\test\test\b.xml:5: The 
>following error occurred while executing this line:
>
>Target "target-a" does not exist in the project "project-b". 
>It is used from target "target-c".""
>
> 
>
>Your help is more appreciate.
>
> 
>
>Thanks
>
>Gopal
>
> 
>
> 
>
> 
>
>

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


Mime
View raw message