103 104 private static void init(String name, String ext) { 105 TEST_NAME = name; 106 DEP_NAME = name + "Dep"; 107 EXT = ext; 108 if (EXT.equals("rpm")) { 109 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0-1.x86_64." + EXT; 110 OUTPUT_DEP = "output" + File.separator + DEP_NAME + "-1.0-1.x86_64." + EXT; 111 } else { 112 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT; 113 OUTPUT_DEP = "output" + File.separator + DEP_NAME + "-1.0." + EXT; 114 } 115 CMD = new String[]{ 116 "create-installer", 117 "--installer-type", EXT, 118 "--input", "input", 119 "--output", "output", 120 "--name", TEST_NAME, 121 "--main-jar", "hello.jar", 122 "--main-class", "Hello", 123 "--overwrite", 124 "--files", "hello.jar", 125 "--linux-package-deps", DEP_NAME.toLowerCase()}; 126 CMD_DEP = new String[]{ 127 "create-installer", 128 "--installer-type", EXT, 129 "--input", "input", 130 "--output", "output", 131 "--name", DEP_NAME, 132 "--main-jar", "hello.jar", 133 "--main-class", "Hello", 134 "--overwrite", 135 "--files", "hello.jar"}; 136 } 137 138 public static void run(String name, String ext) throws Exception { 139 init(name, ext); 140 141 if (JPackageInstallerHelper.isVerifyInstall()) { 142 verifyInstall(); 143 } else if (JPackageInstallerHelper.isVerifyUnInstall()) { 144 verifyUnInstall(); 145 } else { 146 JPackageHelper.createHelloInstallerJar(); 147 testCreateInstaller(); 148 } 149 } 150 } | 103 104 private static void init(String name, String ext) { 105 TEST_NAME = name; 106 DEP_NAME = name + "Dep"; 107 EXT = ext; 108 if (EXT.equals("rpm")) { 109 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0-1.x86_64." + EXT; 110 OUTPUT_DEP = "output" + File.separator + DEP_NAME + "-1.0-1.x86_64." + EXT; 111 } else { 112 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT; 113 OUTPUT_DEP = "output" + File.separator + DEP_NAME + "-1.0." + EXT; 114 } 115 CMD = new String[]{ 116 "create-installer", 117 "--installer-type", EXT, 118 "--input", "input", 119 "--output", "output", 120 "--name", TEST_NAME, 121 "--main-jar", "hello.jar", 122 "--main-class", "Hello", 123 "--files", "hello.jar", 124 "--linux-package-deps", DEP_NAME.toLowerCase()}; 125 CMD_DEP = new String[]{ 126 "create-installer", 127 "--installer-type", EXT, 128 "--input", "input", 129 "--output", "output", 130 "--name", DEP_NAME, 131 "--main-jar", "hello.jar", 132 "--main-class", "Hello", 133 "--files", "hello.jar"}; 134 } 135 136 public static void run(String name, String ext) throws Exception { 137 init(name, ext); 138 139 if (JPackageInstallerHelper.isVerifyInstall()) { 140 verifyInstall(); 141 } else if (JPackageInstallerHelper.isVerifyUnInstall()) { 142 verifyUnInstall(); 143 } else { 144 JPackageHelper.createHelloInstallerJar(); 145 testCreateInstaller(); 146 } 147 } 148 } |