Reputation: 907
I'm new to ANT Scripting. I need the ANT Script to achieve the below functionality.
C:\dojo-release-1.4.2-shrinksafe>java -jar shrinksafe.jar C:\Build\JS\*.js > testMin.js
Above command merges all JS files in that folder to a single one.
<java jar="shrinksafe.jar" fork="true" output="testMin.js">
<arg value="*C:\Build\JS\*.js"/>
<classpath>
<pathelement location="js.jar"/>
</classpath>
</java>
I'm not sure if this is the correct implementation of this. I'm getting the error
js: Couldn't open file "C:\Build\JS\*.js"
Can someone please help me to fix this?
Upvotes: 1
Views: 328
Reputation: 945
The asterisk in "*.js" is sent literally to the Java class and not expanded as it might have been when entered on the command line.
I suggest you join the files first using the concat task and then run shrinksafe on the resulting file.
Upvotes: 1