diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-10-11 18:17:41 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-10-11 18:17:41 +0300 |
commit | 2b0d4893c803c38159462cb4f815dcf33feed1d0 (patch) | |
tree | 009fb3fd3d1c65e8246c5754187e0c06fd564e9d /theme-compiler/src/com | |
parent | 081d5dc14015838be5b358632474997a8b8855ba (diff) | |
download | vaadin-framework-2b0d4893c803c38159462cb4f815dcf33feed1d0.tar.gz vaadin-framework-2b0d4893c803c38159462cb4f815dcf33feed1d0.zip |
Only ignore NoClassDefFoundError if SmartSprites is missing (#9943)
Change-Id: I50f33a3bbd648555bc59b8591bc84f8723a4eff4
Diffstat (limited to 'theme-compiler/src/com')
-rw-r--r-- | theme-compiler/src/com/vaadin/buildhelpers/CompileTheme.java | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/theme-compiler/src/com/vaadin/buildhelpers/CompileTheme.java b/theme-compiler/src/com/vaadin/buildhelpers/CompileTheme.java index 90e3faf10e..47c519d09e 100644 --- a/theme-compiler/src/com/vaadin/buildhelpers/CompileTheme.java +++ b/theme-compiler/src/com/vaadin/buildhelpers/CompileTheme.java @@ -105,19 +105,22 @@ public class CompileTheme { private static void createSprites(String themeFolder, String themeName) throws FileNotFoundException, IOException { 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"); - + // Try loading the class separately from using it to avoid + // hiding other classpath issues + Class<?> smartSpritesClass = org.carrot2.labs.smartsprites.SmartSprites.class; } catch (NoClassDefFoundError e) { System.err .println("Could not find smartsprites. No sprites were generated. The theme should still work."); + return; } + 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"); + } } |