From 6c0b2c9ed89f39f2d0606c113173645476de69b6 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Wed, 21 Mar 2018 14:57:50 +0100 Subject: new helper files added, pom has changed, --- .classpath | 6 +- pdf-over-gui/.classpath | 2 +- pdf-over-gui/.settings/org.eclipse.jdt.core.prefs | 6 +- pdf-over-gui/pom.xml | 75 +++--- pdf-over-install-helper/pom.xml | 126 +++++----- .../src/main/java/at/asit/helper/Main.java | 266 ++++++++++----------- pdf-over-signator/.classpath | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 6 +- pdf-over-signer/pdf-over-sigpdfas4/pom.xml | 2 +- pom.xml | 6 +- 10 files changed, 254 insertions(+), 243 deletions(-) diff --git a/.classpath b/.classpath index 0dc7dd48..8b5c0e0c 100644 --- a/.classpath +++ b/.classpath @@ -1,10 +1,10 @@ - - + - + + diff --git a/pdf-over-gui/.classpath b/pdf-over-gui/.classpath index ffffea55..b1f1249d 100644 --- a/pdf-over-gui/.classpath +++ b/pdf-over-gui/.classpath @@ -1,6 +1,6 @@ - + diff --git a/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs b/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs index 26e5d21d..0e650d49 100644 --- a/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs +++ b/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs @@ -4,8 +4,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonN org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.autoboxing=ignore @@ -99,7 +99,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,LOW org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,NOTE diff --git a/pdf-over-gui/pom.xml b/pdf-over-gui/pom.xml index c6c33038..5493566f 100644 --- a/pdf-over-gui/pom.xml +++ b/pdf-over-gui/pom.xml @@ -1,4 +1,5 @@ - + 4.0.0 pdf-over @@ -167,6 +168,15 @@ ${staging.dir}/lib-swt swt-${target.name}-64.jar + + + + + + + + + @@ -288,7 +298,7 @@ . src/main/resources/icons/icon.ico - 1.6.0 + 1.7.0 ${version.exe} @@ -322,7 +332,7 @@ . src/main/resources/icons/icon.ico - 1.6.0 + 1.7.0 ${version.exe} @@ -418,78 +428,79 @@ 4.3.5 ${project.basedir}/.. - linux + windows ${project.build.directory}/staging/${target.name} 4.3.2 - + - linux-64 + windows-64 - linux + windows amd64 - org.eclipse.swt.gtk.linux.x86 - org.eclipse.swt.gtk.linux.x86_64 + org.eclipse.swt.win32.win32.x86 + org.eclipse.swt.win32.win32.x86_64 ${swt.artifactId.64} - linux + windows - linux + windows - linux + windows x86 - org.eclipse.swt.gtk.linux.x86 - org.eclipse.swt.gtk.linux.x86_64 + org.eclipse.swt.win32.win32.x86 + org.eclipse.swt.win32.win32.x86_64 ${swt.artifactId.32} - linux + windows + - windows + linux-64 - windows - x86 + linux + amd64 - org.eclipse.swt.win32.win32.x86 - org.eclipse.swt.win32.win32.x86_64 - ${swt.artifactId.32} - windows + org.eclipse.swt.gtk.linux.x86 + org.eclipse.swt.gtk.linux.x86_64 + ${swt.artifactId.64} + linux - windows-64 + linux - windows - amd64 + linux + x86 - org.eclipse.swt.win32.win32.x86 - org.eclipse.swt.win32.win32.x86_64 - ${swt.artifactId.64} - windows + org.eclipse.swt.gtk.linux.x86 + org.eclipse.swt.gtk.linux.x86_64 + ${swt.artifactId.32} + linux + + mac diff --git a/pdf-over-install-helper/pom.xml b/pdf-over-install-helper/pom.xml index 17314706..9ca9eedb 100644 --- a/pdf-over-install-helper/pom.xml +++ b/pdf-over-install-helper/pom.xml @@ -1,64 +1,64 @@ - - 4.0.0 - - at.a-sit - pdf-over - 4.1.17-SNAPSHOT - - - pdf-over-install-helper - 1.0.0 - - - - commons-io - commons-io - - - - - - - - maven-compiler-plugin - org.apache.maven.plugins - 3.7.0 - - 1.8 - 1.8 - true - true - true - UTF-8 - true - lines,vars,source - - - - - - - - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - at.asit.helper.Main - - false - - - - - - + + 4.0.0 + + at.a-sit + pdf-over + 4.1.17-SNAPSHOT + + + pdf-over-install-helper + 1.0.0 + + + + commons-io + commons-io + + + + + + + + maven-compiler-plugin + org.apache.maven.plugins + 3.7.0 + + 1.8 + 1.8 + true + true + true + UTF-8 + true + lines,vars,source + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + at.asit.helper.Main + + false + + + + + + \ No newline at end of file diff --git a/pdf-over-install-helper/src/main/java/at/asit/helper/Main.java b/pdf-over-install-helper/src/main/java/at/asit/helper/Main.java index 6fd5bdbb..9f39db2c 100644 --- a/pdf-over-install-helper/src/main/java/at/asit/helper/Main.java +++ b/pdf-over-install-helper/src/main/java/at/asit/helper/Main.java @@ -1,133 +1,133 @@ -package at.asit.helper; - -import java.io.File; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; - -import org.apache.commons.io.FileUtils; - - - - -/*** - * - * @author aabraham - * - * @version 1.0.0 - * - * The created jar is used as helper library when installing pdf-over. - * Basically, the helper determines the java version used including architecture and - * appends afterwards the right swt library since this swt is platform dependend. - * - */ -public class Main { - - public static void main(String[] args) { - - System.out.println("start post install task"); - - copyLib(); - - } - - - public static int getArchBits() { - String arch = System.getProperty("os.arch"); - return arch.contains("64") ? 64 : 32; - } - - public static String getSwtJarName() throws SWTLoadFailedException { - String os = System.getProperty("os.name").toLowerCase(); - if (os.contains("win")) - os = "windows"; - else if (os.contains("mac")) - os = "mac"; - else if (os.contains("linux") || os.contains("nix")) - os = "linux"; - else { - throw new SWTLoadFailedException("Unknown OS: " + os); - } - return "swt-" + os + "-" + getArchBits() + ".jar"; - } - - public static String getSwtJarPath() { - String path = ""; - try { - path = URLDecoder.decode(Main.class.getProtectionDomain().getCodeSource().getLocation().getPath(), "UTF-8"); - int idx = path.lastIndexOf('/'); - idx = path.lastIndexOf('/', idx - 1); - path = path.substring(0, idx + 1); - } catch (UnsupportedEncodingException e) { - // Ignore - System.err.println("Unsuported Encoding Exception " + e.getMessage()); - } - return path + "lib-swt/"; - } - - private static class SWTLoadFailedException extends Exception { - private static final long serialVersionUID = 1L; - - SWTLoadFailedException(String msg) { - super(msg); - } - } - - - private static String getSwtTargetLibName() throws SWTLoadFailedException { - - String os = System.getProperty("os.name").toLowerCase(); - System.out.println("OS " + os + " detected!"); - String swtTargetLibName; - - if (os.contains("win")) { - swtTargetLibName = "org.eclipse.swt.win32.win32.x86-4.3.2.jar"; - } - else if (os.contains("mac")) { - swtTargetLibName = "org.eclipse.swt.cocoa.macosx-4.3.2.jar"; - } - else if (os.contains("linux") || os.contains("nix")) { - swtTargetLibName = "org.eclipse.swt.gtk.linux.x86-4.3.2.jar"; - } - else { - throw new SWTLoadFailedException("Unknown OS: " + os); - } - return swtTargetLibName; - - - } - - - private static void copyLib() { - try { - String swtLibPath = Main.getSwtJarPath() + Main.getSwtJarName(); - File swtLib = new File(swtLibPath); - if (!swtLib.isFile()) { - - System.err.println("not found "); - throw new SWTLoadFailedException("Library " + swtLibPath + " not found"); - } - - String newPath = swtLibPath.replace("lib-swt", "lib"); - newPath = newPath.replace(Main.getSwtJarName(), getSwtTargetLibName()); - File newFile = new File(newPath); - System.out.println("Source Lib " + swtLibPath.toString()); - System.out.println("Target Lib " + newFile.toString()); - FileUtils.copyFile(swtLib, newFile); - - if (!newFile.isFile()) { - System.err.println("not found "); - throw new SWTLoadFailedException("Library " + swtLibPath + " not found"); - } - - System.out.println("success "); - return; - - - } catch(Exception e){ - e.printStackTrace(); - } - - } - - -} +package at.asit.helper; + +import java.io.File; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; + +import org.apache.commons.io.FileUtils; + + + + +/*** + * + * @author aabraham + * + * @version 1.0.0 + * + * The created jar is used as helper library when installing pdf-over. + * Basically, the helper determines the java version used including architecture and + * appends afterwards the right swt library since this swt is platform dependend. + * + */ +public class Main { + + public static void main(String[] args) { + + System.out.println("start post install task"); + + copyLib(); + + } + + + public static int getArchBits() { + String arch = System.getProperty("os.arch"); + return arch.contains("64") ? 64 : 32; + } + + public static String getSwtJarName() throws SWTLoadFailedException { + String os = System.getProperty("os.name").toLowerCase(); + if (os.contains("win")) + os = "windows"; + else if (os.contains("mac")) + os = "mac"; + else if (os.contains("linux") || os.contains("nix")) + os = "linux"; + else { + throw new SWTLoadFailedException("Unknown OS: " + os); + } + return "swt-" + os + "-" + getArchBits() + ".jar"; + } + + public static String getSwtJarPath() { + String path = ""; + try { + path = URLDecoder.decode(Main.class.getProtectionDomain().getCodeSource().getLocation().getPath(), "UTF-8"); + int idx = path.lastIndexOf('/'); + idx = path.lastIndexOf('/', idx - 1); + path = path.substring(0, idx + 1); + } catch (UnsupportedEncodingException e) { + // Ignore + System.err.println("Unsuported Encoding Exception " + e.getMessage()); + } + return path + "lib-swt/"; + } + + private static class SWTLoadFailedException extends Exception { + private static final long serialVersionUID = 1L; + + SWTLoadFailedException(String msg) { + super(msg); + } + } + + + private static String getSwtTargetLibName() throws SWTLoadFailedException { + + String os = System.getProperty("os.name").toLowerCase(); + System.out.println("OS " + os + " detected!"); + String swtTargetLibName; + + if (os.contains("win")) { + swtTargetLibName = "org.eclipse.swt.win32.win32.x86-4.3.2.jar"; + } + else if (os.contains("mac")) { + swtTargetLibName = "org.eclipse.swt.cocoa.macosx-4.3.2.jar"; + } + else if (os.contains("linux") || os.contains("nix")) { + swtTargetLibName = "org.eclipse.swt.gtk.linux.x86-4.3.2.jar"; + } + else { + throw new SWTLoadFailedException("Unknown OS: " + os); + } + return swtTargetLibName; + + + } + + + private static void copyLib() { + try { + String swtLibPath = Main.getSwtJarPath() + Main.getSwtJarName(); + File swtLib = new File(swtLibPath); + if (!swtLib.isFile()) { + + System.err.println("not found "); + throw new SWTLoadFailedException("Library " + swtLibPath + " not found"); + } + + String newPath = swtLibPath.replace("lib-swt", "lib"); + newPath = newPath.replace(Main.getSwtJarName(), getSwtTargetLibName()); + File newFile = new File(newPath); + System.out.println("Source Lib " + swtLibPath.toString()); + System.out.println("Target Lib " + newFile.toString()); + FileUtils.copyFile(swtLib, newFile); + + if (!newFile.isFile()) { + System.err.println("not found "); + throw new SWTLoadFailedException("Library " + swtLibPath + " not found"); + } + + System.out.println("success "); + return; + + + } catch(Exception e){ + e.printStackTrace(); + } + + } + + +} diff --git a/pdf-over-signator/.classpath b/pdf-over-signator/.classpath index 1cf5d813..77af1552 100644 --- a/pdf-over-signator/.classpath +++ b/pdf-over-signator/.classpath @@ -17,7 +17,7 @@ - + diff --git a/pdf-over-signator/.settings/org.eclipse.jdt.core.prefs b/pdf-over-signator/.settings/org.eclipse.jdt.core.prefs index d598cb6b..cc750108 100644 --- a/pdf-over-signator/.settings/org.eclipse.jdt.core.prefs +++ b/pdf-over-signator/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,8 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -91,7 +91,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,LOW org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,NOTE diff --git a/pdf-over-signer/pdf-over-sigpdfas4/pom.xml b/pdf-over-signer/pdf-over-sigpdfas4/pom.xml index 470e5cf5..0bc43c76 100644 --- a/pdf-over-signer/pdf-over-sigpdfas4/pom.xml +++ b/pdf-over-signer/pdf-over-sigpdfas4/pom.xml @@ -58,7 +58,7 @@ pdf-as-4 PDF-AS 4 Repository - https://joinup.ec.europa.eu/site/pdf-as/maven/ + https://apps.egiz.gv.at/maven/ diff --git a/pom.xml b/pom.xml index 14d915e8..b37bd62d 100644 --- a/pom.xml +++ b/pom.xml @@ -130,10 +130,10 @@ maven-compiler-plugin org.apache.maven.plugins - 2.5.1 + 3.7.0 - 1.6 - 1.7 + 1.8 + 1.8 true true true -- cgit v1.2.3