aboutsummaryrefslogtreecommitdiffstats
path: root/buildhelpers/src/main
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-08-18 09:27:03 +0300
committerArtur Signell <artur@vaadin.com>2016-08-18 09:27:03 +0300
commit6d54d78944f6c3278eed3bb5e7ee19687ee5714e (patch)
tree8142f622e644e98bb3f8d19a7021fd125f9fed40 /buildhelpers/src/main
parent7b899665d07be33f86015f71695868c70bc5a589 (diff)
downloadvaadin-framework-6d54d78944f6c3278eed3bb5e7ee19687ee5714e.tar.gz
vaadin-framework-6d54d78944f6c3278eed3bb5e7ee19687ee5714e.zip
Format using Eclipse Neon
Change-Id: I33f1cc33969ff74a95b1b8cc0f2add589be5aae0
Diffstat (limited to 'buildhelpers/src/main')
-rw-r--r--buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java24
-rw-r--r--buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java19
-rw-r--r--buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java24
3 files changed, 34 insertions, 33 deletions
diff --git a/buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java b/buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java
index d97025bdb6..83ce4608d9 100644
--- a/buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java
+++ b/buildhelpers/src/main/java/com/vaadin/buildhelpers/CompileTheme.java
@@ -64,11 +64,11 @@ public class CompileTheme {
// Regular theme
try {
processSassTheme(themeFolder, themeName, "styles", version);
- System.out.println("Compiling theme " + themeName
- + " styles successful");
+ System.out.println(
+ "Compiling theme " + themeName + " styles successful");
} catch (Exception e) {
- System.err.println("Compiling theme " + themeName
- + " styles failed");
+ System.err
+ .println("Compiling theme " + themeName + " styles failed");
e.printStackTrace();
}
// Legacy theme w/o .themename{} wrapping
@@ -82,8 +82,8 @@ public class CompileTheme {
+ " legacy-styles successful");
}
} catch (Exception e) {
- System.err.println("Compiling theme " + themeName
- + " legacy-styles failed");
+ System.err.println(
+ "Compiling theme " + themeName + " legacy-styles failed");
e.printStackTrace();
}
}
@@ -103,8 +103,8 @@ public class CompileTheme {
ScssStylesheet scss = ScssStylesheet.get(sassFile);
if (scss == null) {
- throw new IllegalArgumentException("SASS file: " + sassFile
- + " not found");
+ throw new IllegalArgumentException(
+ "SASS file: " + sassFile + " not found");
}
scss.compile();
String filteredScss = scss.printState().replace("@version@", version);
@@ -128,8 +128,8 @@ public class CompileTheme {
boolean ok = newCss.renameTo(oldCss);
if (!ok) {
- throw new RuntimeException("Rename " + newCss + " -> " + oldCss
- + " failed");
+ throw new RuntimeException(
+ "Rename " + newCss + " -> " + oldCss + " failed");
}
}
@@ -142,8 +142,8 @@ public class CompileTheme {
// 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.");
+ System.err.println(
+ "Could not find smartsprites. No sprites were generated. The theme should still work.");
return;
}
diff --git a/buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java b/buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java
index d4ad3f838c..9b8f1d1fb1 100644
--- a/buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java
+++ b/buildhelpers/src/main/java/com/vaadin/buildhelpers/GeneratePackageExports.java
@@ -44,11 +44,10 @@ public class GeneratePackageExports {
public static void main(String[] args) {
if (args.length < 2) {
- System.err
- .println("Invalid number of parameters\n"
- + "Usage: java -cp .. GenerateManifest <package.jar> <accepted package prefixes>\n"
- + "Use -Dvaadin.version to specify the version to be used for the packages\n"
- + "Use -DincludeNumberPackages=1 to include package names which start with a number (not 100% OSGi compatible)");
+ System.err.println("Invalid number of parameters\n"
+ + "Usage: java -cp .. GenerateManifest <package.jar> <accepted package prefixes>\n"
+ + "Use -Dvaadin.version to specify the version to be used for the packages\n"
+ + "Use -DincludeNumberPackages=1 to include package names which start with a number (not 100% OSGi compatible)");
System.exit(1);
}
@@ -178,7 +177,8 @@ public class GeneratePackageExports {
}
private static HashSet<String> getPackages(JarFile jar,
- List<String> acceptedPackagePrefixes, boolean includeNumberPackages) {
+ List<String> acceptedPackagePrefixes,
+ boolean includeNumberPackages) {
HashSet<String> packages = new HashSet<String>();
Pattern startsWithNumber = Pattern.compile("\\.\\d");
@@ -198,10 +198,11 @@ public class GeneratePackageExports {
}
int lastSlash = entry.getName().lastIndexOf('/');
- String pkg = entry.getName().substring(0, lastSlash)
- .replace('/', '.');
+ String pkg = entry.getName().substring(0, lastSlash).replace('/',
+ '.');
- if (!includeNumberPackages && startsWithNumber.matcher(pkg).find()) {
+ if (!includeNumberPackages
+ && startsWithNumber.matcher(pkg).find()) {
continue;
}
diff --git a/buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java b/buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java
index 9e9b29c4a1..90541f6231 100644
--- a/buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java
+++ b/buildhelpers/src/main/java/com/vaadin/buildhelpers/ManifestWriter.java
@@ -85,9 +85,9 @@ public class ManifestWriter {
fos.write(getBytes());
fos.close();
} catch (IOException e) {
- System.err.println("Writing to file '"
- + newMfFile.getAbsolutePath() + "' failed because: "
- + e.getMessage());
+ System.err.println(
+ "Writing to file '" + newMfFile.getAbsolutePath()
+ + "' failed because: " + e.getMessage());
status = 1;
}
}
@@ -100,9 +100,9 @@ public class ManifestWriter {
is = new FileInputStream(newMfFile);
checkMf.read(is);
} catch (IOException e) {
- System.err.println("Reading from file '"
- + newMfFile.getAbsolutePath() + "' failed because: "
- + e.getMessage());
+ System.err.println(
+ "Reading from file '" + newMfFile.getAbsolutePath()
+ + "' failed because: " + e.getMessage());
status = 1;
}
}
@@ -112,8 +112,8 @@ public class ManifestWriter {
System.out.println("Updating manifest in JAR " + jarFilename);
try {
// The "mf" order must correspond with manifest-jarfile order
- Process process = Runtime.getRuntime().exec(
- new String[] { "jar", "umf",
+ Process process = Runtime.getRuntime()
+ .exec(new String[] { "jar", "umf",
newMfFile.getAbsolutePath(), jarFilename });
int exitValue = process.waitFor();
if (exitValue != 0) {
@@ -123,14 +123,14 @@ public class ManifestWriter {
while (reader.ready()) {
System.err.println("jar: " + reader.readLine());
}
- System.err
- .println("The 'jar' command returned with exit value "
+ System.err.println(
+ "The 'jar' command returned with exit value "
+ exitValue);
status = 1;
}
} catch (IOException e) {
- System.err.println("Failed to execute 'jar' command. "
- + e.getMessage());
+ System.err.println(
+ "Failed to execute 'jar' command. " + e.getMessage());
status = 1;
} catch (InterruptedException e) {
System.err