I was using the plugin and though is pretty cool it slows down loading of pages in development mode considerably. Icing on the cake was the bug in 1.2.6k causing the cache to be cleared.
Check the html source code, if you don't see the reference to js/css files is the same issue!
I am now using a custom script ant that unzip the war file, removes all the stuff that should not be there ( everything gets included in the current play war command ) and compresses the javascript files with names not ending in min.js
This way when I code I can still see the javascript but is compressed in production.
I am using less for the css but for that I manually run the lessc compiler. It does not change so much after all so I'm not too bothered with that.
This is what the script targets look like
<target name="minimize-war" depends="" description="removes not needed stuff from war file">
<delete dir="${buildDir}/tmp"/>
<unzip src="${buildDir}/myappname-war.war" dest="${buildDir}/tmp"/>
<foreach target="minimize" param="filename">
<fileset dir="${buildDir}/tmp/WEB-INF/application/public/javascripts" >
<include name="**/*.js"/>
<exclude name="**/*.min.js"/>
</fileset>
<param name="type" value="js"/>
</foreach>
<foreach target="minimize" param="filename">
<fileset dir="${buildDir}/tmp/WEB-INF/application/public/stylesheets" >
<include name="**/*.css"/>
</fileset>
<param name="type" value="css"/>
</foreach>
<delete dir="${buildDir}/tmp/WEB-INF/application/ant-lib"/>
<delete dir="${buildDir}/tmp/WEB-INF/application/docs"/>
<delete dir="${buildDir}/tmp/WEB-INF/application/eclipse"/>
<delete dir="${buildDir}/tmp/WEB-INF/application/liquibase"/>
<delete dir="${buildDir}/tmp/WEB-INF/application/icon-lib"/>
<delete dir="${buildDir}/tmp/WEB-INF/application/test"/>
<delete dir="${buildDir}/tmp/WEB-INF/application/test-result"/>
<delete><fileset dir="${buildDir}/tmp/WEB-INF/application" includes="*.*"></fileset></delete>
<delete file="${buildDir}/myappname-war.war"/>
<zip destfile="${buildDir}/myappname-war.war" basedir="${buildDir}/tmp"/>
</target>
<target name="minimize">
<echo>Running compress for type ${type} on file ${filename} </echo>
<java dir="${buildDir}/tmp/WEB-INF/application/public/javascripts" jar="${basedir}/ant-lib/yuicompressor-2.4.6.jar" fork="true">
<arg value="--charset" />
<arg value="UTF-8" />
<arg line="--type ${type} -o ${filename} ${filename}" />
</java>
</target>