Fingers crossed, you can help me!
I use SmartSprites to combine the PNGs on my landing page into one so that it loads faster.
SmartSprite will check your CSS files, generate a Sprite CSS image, and create a new CSS file that will use this sprite image instead of the originals. What I want to do is replace the SmartSprite CSS source file automatically during build of my maven WAR.
So here is what I would like to do:
- SmartSprite scans my CSS file: mystyle.css
- SmartSprite creates a sprite image and creates a new mystyle-sprite.css file that references the new sprite image.
- I want to copy mystyle-sprite.css on top of mystyle.css before creating a WAR, so I don’t need to change any of my links in JSP files.
Both files are in the output directory (target / myproj / css). There is no flag in SmartSprite to override the original file, so I assume that it should have been done after processing.
The following is the maven plugin configuration that I use for SmartSprite.
<plugin>
<groupId>org.carrot2.labs</groupId>
<artifactId>smartsprites-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>spritify</goal>
</goals>
</execution>
</executions>
</plugin>
source
share