Fingers crossed you can help me!
I am using SmartSprites to combine the PNGs on my landing page into one, so that it will load quicker.
SmartSprite will exam
You can use the Maven WAR plugin:
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory><!-- Your output directory --></directory>
<targetPath><!-- The target location of the files below --></targetPath>
<includes>
<include><!-- file pattern --></include>
<include><!-- file pattern --></include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
You should also configure SmartSprites to use a different output directory to preserve the original CSS filename. Try the output-dir-path
option with an empty css-file-suffix
value.
I'm afraid you won't find anything simpler or more elegant than Maven AntRun Plugin with something like this:
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>prepare-package</phase>
<configuration>
<target>
<copy file="${project.build.directory}/mystyle-sprite.css"
tofile="${project.build.directory}/mystyle.css" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>