ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Holmqvist, IT, Posten" <christian.holmqv...@posten.se>
Subject Overload?!
Date Tue, 17 Sep 2002 09:52:50 GMT
Hi

My situation is that I have made a include.xml file with a number of targets
that is correct for 95% of our projects. The problem is the last 5%.

So my question is: Is there any way to overload a target with Ant?

This is how I would like it to work:

---- include.xml --------

<target name="compile">
	<echo message="foo"/>
</target>

---- build.xml ----

<!DOCTYPE project [
    <!ENTITY include SYSTEM "file:./include.xml">
]>

<project name="test" default="compile" basedir=".">
	&include;
</project>
<!-- in this file the compile in include.xml will be executed -->

----- build1.xml -----

<!DOCTYPE project [
    <!ENTITY include SYSTEM "file:./include.xml">
]>

<project name="test" default="compile" basedir=".">
	&include;

	<target name="compile">
		<echo message="bar"/>
	</target>
</project>
<!-- in this file the compile in include.xml will be executed -->

------- build2.xml --------------
<!DOCTYPE project [
    <!ENTITY include SYSTEM "file:./include.xml">
]>

<project name="test" default="compile" basedir=".">
	<target name="compile"
		<echo message="bar"/>
	</target>

	&include;
</project>
<!-- in this file the compile in build2.xml will be executed -->
--------------------------------------

When this is done today ant tells med that compile is duplicated (or
something like that).

Is there a way around this??

Thanks for your time!

Cheers Christian


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


Mime
View raw message