ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Khushwinder <chahalkhushwin...@gmail.com>
Subject Replace target's problem
Date Fri, 21 Aug 2009 07:12:45 GMT

Hello All,

For improving speed of my website i am using the following
 
http://developer.yahoo.com/performance/rules.html#expires 

For implementing this solution i need to do the two things using ant:

1) Renaming all the static contents(css,js,img) files each time i make a
build.
2)Replacing these new names in my jsp pages.

I have completed the first task successfully but getting problem in second
task. 

My ant task for js files replacement is given below:

<target name="rewrite-jsps">
       
        <replace dir="${build.web.dir}" value="${buildNo}.js"
casesensitive="true">
            <include name="**/*.jsp"/>
            <!-- string to replace -->
            <replacetoken>.js</replacetoken>
        </replace>

</target>

But it is also replacing the jsp file with build number because the
replacetoken value is like .js. 
I want that it should only replace .js files not the .jsp.
Can anyone help me in this case.

Thanks and rgds



-- 
View this message in context: http://www.nabble.com/Replace-target%27s-problem-tp25075218p25075218.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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


Mime
View raw message