You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Z W <mp...@gmail.com> on 2007/12/13 00:25:30 UTC
Calling task in another xml file from main build file
Hi
I have multiple tasks and I like to move a few tasks into another xml file.
What's the syntax to call another task in another xml file from the original
buildfile ?
Eg:
<ant antfile="task_file.xml">
<!-- how do I make a task call ? -->
</ant>
task_file.xml
<project>
<target name="test_hi">
<echo message="hi" />
</target>
</project>
Any example similar to this is appreciated also.
Thanks
Re: Calling task in another xml file from main build file
Posted by Francisco Tolmasky <to...@gmail.com>.
<ant file = "whatever.xml" target = "the_target" />
http://ant.apache.org/manual/CoreTasks/ant.html
Francisco
On Dec 12, 2007, at 3:25 PM, Z W wrote:
> Hi
>
> I have multiple tasks and I like to move a few tasks into another
> xml file.
> What's the syntax to call another task in another xml file from the
> original
> buildfile ?
> Eg:
>
>
> <ant antfile="task_file.xml">
>
> <!-- how do I make a task call ? -->
>
> </ant>
>
>
>
> task_file.xml
>
> <project>
>
> <target name="test_hi">
>
> <echo message="hi" />
>
> </target>
>
> </project>
>
>
>
> Any example similar to this is appreciated also.
>
> Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: AW: Calling task in another xml file from main build file
Posted by Sunils_82 <su...@yahoo.com>.
Hi,
I have used the following code to access build.xml file present in sample_1
folder from sample_2 folder.
<target name="Another.Build.File">
<ant antfile="../sample_1/build.xml" target="myBuild" inheritall="false" />
</target>
Call to another build.xml file is made successfully, but the task in that
build file fails with error stating
myBuild:
[mxmlc] Loading configuration file C:\Program Files\Adobe\Flex Builder
3\sdks\3.0.0\frameworks\flex-config.xml
[mxmlc] Error: unable to open 'src/DiscoveredObjects.mxml'
[mxmlc]
[mxmlc] Use 'mxmlc -help' for information about using the command line.
[ant] Exiting C:\myProject\sample\build.xml.
Regards,
Sunils
--
View this message in context: http://www.nabble.com/Calling-task-in-another-xml-file-from-main-build-file-tp14306496p21704208.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: AW: Calling task in another xml file from main build file
Posted by Sunils_82 <su...@yahoo.com>.
Hi,
I have used the following code to access build.xml file present in sample_1
folder from sample_2 folder.
<target name="Another.Build.File">
<ant antfile="../sample_1/build.xml" target="myBuild" inheritall="false" />
</target>
Call to another build.xml file is made successfully, but the task in that
build file fails with error stating
myBuild:
[mxmlc] Loading configuration file C:\Program Files\Adobe\Flex Builder
3\sdks\3.0.0\frameworks\flex-config.xml
[mxmlc] Error: unable to open 'src/DiscoveredObjects.mxml'
[mxmlc]
[mxmlc] Use 'mxmlc -help' for information about using the command line.
[ant] Exiting C:\myProject\sample_1\build.xml.
Regards,
Sunils
--
View this message in context: http://www.nabble.com/Calling-task-in-another-xml-file-from-main-build-file-tp14306496p21705170.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org