summaryrefslogtreecommitdiffstats
path: root/theme-compiler/src
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-09-11 15:24:04 +0300
committerArtur Signell <artur@vaadin.com>2012-09-11 15:24:04 +0300
commit919b56eaf88dbc3905d8ff176945b00b0d59b529 (patch)
tree0208e9a2a31a381b9153dd322aaf9b9e5883dc39 /theme-compiler/src
parent72c95f45e4133ade6f94e7ea2327c7c006744c6e (diff)
downloadvaadin-framework-919b56eaf88dbc3905d8ff176945b00b0d59b529.tar.gz
vaadin-framework-919b56eaf88dbc3905d8ff176945b00b0d59b529.zip
Compile themes without sprites if SmartSprites is not found
Diffstat (limited to 'theme-compiler/src')
-rw-r--r--theme-compiler/src/com/vaadin/buildhelpers/CompileTheme.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/theme-compiler/src/com/vaadin/buildhelpers/CompileTheme.java b/theme-compiler/src/com/vaadin/buildhelpers/CompileTheme.java
index 669e311f82..90e3faf10e 100644
--- a/theme-compiler/src/com/vaadin/buildhelpers/CompileTheme.java
+++ b/theme-compiler/src/com/vaadin/buildhelpers/CompileTheme.java
@@ -86,7 +86,6 @@ public class CompileTheme {
+ scss.toString().length() + " bytes)");
createSprites(themeFolder, themeName);
- System.out.println("Used SmartSprites to create sprites");
File oldCss = new File(stylesCssName);
File newCss = new File(stylesCssDir + "styles-sprite.css");
@@ -105,12 +104,20 @@ public class CompileTheme {
private static void createSprites(String themeFolder, String themeName)
throws FileNotFoundException, IOException {
- String[] parameters = new String[] { "--sprite-png-depth", "AUTO",
- "--css-file-suffix", "-sprite", "--css-file-encoding", "UTF-8",
- "--root-dir-path", themeFolder + File.separator + themeName,
- "--log-level", "WARN" };
-
- org.carrot2.labs.smartsprites.SmartSprites.main(parameters);
+ try {
+ String[] parameters = new String[] { "--sprite-png-depth", "AUTO",
+ "--css-file-suffix", "-sprite", "--css-file-encoding",
+ "UTF-8", "--root-dir-path",
+ themeFolder + File.separator + themeName, "--log-level",
+ "WARN" };
+
+ org.carrot2.labs.smartsprites.SmartSprites.main(parameters);
+ System.out.println("Generated sprites");
+
+ } catch (NoClassDefFoundError e) {
+ System.err
+ .println("Could not find smartsprites. No sprites were generated. The theme should still work.");
+ }
}
}