ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Wolfgang Hujer <Christian.Hu...@itcqis.com>
Subject Suggestion: Pack-Task as subclass of MatchingTask
Date Sat, 14 Dec 2002 22:29:18 GMT
Hello dear Ant Developers,


I suggest making the Pack and Unpack Tasks a subclass of Matching Task instead 
of Task.


Reason:

Packing several files with a single task-def, like
<gzip>
	<fileset dir="dest">
		<include name="**/*.tar"/>
		<include name="**/*.html"/>
		<include name="**/*.xhtml"/>
		<include name="**/*.css"/>
		<include name="**/*.xml"/>
		<include name="**/*.svg"/>
		<include name="**/*.xml"/>
	</fileset>
</gzip>


Why do I want to compress all .html and .xhtml files?

Because my internet provider has no apache module for automatic compression 
installed, but I want the files to be transmitted to the user agent in a 
compressed form if the user agent supports decompression (Accept-Encoding: 
gzip).


Temporary Workaround:

Use a Makefile like this:

compress: $(addsuffix .gz, $(shell find dest -name "*.tar" -or -name "*.html" 
-or -name "*.xhtml"...))

%.gz: %
	gzip -c $< >$@

Or a bash shell script like this:

for i in `find dest -name "*.tar" -or -name "*.html" -or -name "*.xhtml"...`
do
	gzip -c $i >$i.gz
done

Which you both might invoke from ant using the exec task.

Quirk in workarounds: system dependent.


Bye
-- 
ITCQIS GmbH
Christian Wolfgang Hujer
Geschäftsführender Gesellschafter
Telefon: +49  (0)89  27 37 04 37
Telefax: +49  (0)89  27 37 04 39
E-Mail: Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/

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


Mime
View raw message