How to process CSS files with different ending via SmartSprites Maven Plugin?

35 views
Skip to first unread message

Aaron Molinsky

unread,
Aug 12, 2014, 7:10:14 AM8/12/14
to jangaro...@googlegroups.com
Hi there,
I tried the Maven Plugin for SmartSprites that's provided here: http://blog.jangaroo.net/2012/07/managing-sprites-with-smartsprites-and.html

In a first test it runs really well but I now ran into the issue that I also needed to process CSS files that do not end with *.css, in fact they have the ending *.isml. The content is CSS though.

Is there a way to configure the Maven Plugin so that it also processes isml files?`

Thanks in advance,
Timo

Frank

unread,
Aug 12, 2014, 8:35:47 AM8/12/14
to jangaro...@googlegroups.com
Hi Timo,

have you tried using the configuration option cssFiles? To make it work, you also have to set the correct workingMode!
See https://github.com/CoreMedia/smartsprites-maven-plugin/blob/71fda40abd9d95d111893fc4960a179f9b3ca1da/src/main/java/net/jangaroo/smartsprites/maven/SmartSpritesMojo.java#L187

      <plugin>
        <groupId>net.jangaroo</groupId>
        <artifactId>smartsprites-maven-plugin</artifactId>
        <version>1.8</version>
        <configuration>
          <rootDirPath>src/main/sprites</rootDirPath>
          <logLevel>INFO</logLevel>
          <outputDirPath>target/generated-resources/META-INF/resources/coremedia-ext-theme/css/cm-sprites</outputDirPath>
        </configuration>
        <executions>
          <execution>
            <id>createSprites</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>createSprites</goal>
            </goals>
            <configuration>
              <workingMode>cssFilesWithOutputDirMode</workingMode>
              <cssFiles>
                <file>src/main/sprites/actions-toolbar-icons-24px.css</file>
              </cssFiles>
            </configuration>
          </execution>
        </executions>
      </plugin>

As you can see, this configuration can be local for an "execution", so you could specify two executions (with distinct IDs), on to process all *.css files and one to process all given additional files.
Unfortunately it is currently not possible to use wildcard expressions for cssFiles. SmartSprites itself does not support it, and our Maven would have to be adapted slightly to resolve wildcards before handing the file list to SmartSprites.

Greetings
-Frank-
Message has been deleted

Aaron Molinsky

unread,
Sep 2, 2014, 7:21:02 AM9/2/14
to jangaro...@googlegroups.com
Hi Frank, sorry for my late reply and thanks a lot for your answer which sets some light into my problem.
However, if the Maven plugin doesn't resolve wildcards this won't work for me in my project.

You said that a "slight adoption" would be necessary. Any chance for this feature in the near future?

Cheers,
Timo
Reply all
Reply to author
Forward
0 new messages