ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Kuhnash <jkuhn...@cisco.com>
Subject Mapping files into a JAR, seemingly impossible.
Date Mon, 29 Jul 2002 15:41:23 GMT
Hello,

	I have a task that I need to do that I can't quite nail down. I am 
beginning to wonder if there is an easy way to do it in Ant at all, outside 
of exec'ing some 5 line perl script....
	
	I want to essentially write something like this:

<jar update="${update_val}"
         destfile="${jproject.build.dir}/resources.${environment}.jar" >
	<mapper type="glob"  from="*.${environment}" to="*"/>
</jar>
	
	Of course, the jar task doesn't support mappers as a nested parameter so ....

	The logic behind what I want to do is pretty simple: create a jar that 
contains files that are stripped of their ${environment} trailing ...

	An example: Say I have a directory 
ROOT/WEB-INF/conf/Resources.properties.dev.  I want to create a JAR that 
has _only_ this file, renamed as 
ROOT/WEB-INF/conf/Resources.properties    - that's it!


Thanks for any input. The only other route I considered going was copying 
files with the mapper, then adding those to the JAR but I don't see a way 
to create a FileSet for the JAR out of the mapping set.

I don't know .. am I missing something here?

Thanks in Advance,
Jeremy Kuhnash


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