ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "North Alex" <Alex.No...@tapiola.fi>
Subject RE: How to make generic rules
Date Mon, 04 Aug 2003 05:15:08 GMT
>I'm an old makefile user. Now i'm an ant user.
>But i haven't yet found a way to replace a powerfull 
>functionality of make: implicit rules and import of rule from 
>a makefile in another makefile (include). In fact i need to 
>overide some task in order to define implicit properties.
>
>For example i want to set the compress attribute of jar task 
>to false one time for the full build file and not to set it 
>for each jar task.
>
>How can i do this?

One way could be to set a property and use "unless" for a target that
sets the properties you want.

You can also call <ant> and set properties for that ant call ... or use
<antcall> :

	<antcall target="update.changehistory">
		<param name="history.version"
value="${component.version}"/>
	</antcall>

	<antcall target="update.changehistory">
		<param name="history.version"
value="${baseline.version}"/>
	</antcall>

So, update.changehistory can be called from different places with
different values for the history.version

Hope that is useful.

<= Alex =>

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


Mime
View raw message