From def98fc9a024c2cf95603eef2b915aade8e0f2a3 Mon Sep 17 00:00:00 2001 From: carlosuc3m <100329787@alumnos.uc3m.es> Date: Mon, 16 Jan 2023 17:59:35 +0100 Subject: [PATCH] update pom and remove unnecessary dependency --- pom.xml | 5 ---- .../icy/jep/install/JepInstaller.java | 26 +++++++++---------- .../icy/jep/utils/PythonUtils.java | 2 +- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 5281644..efd99b5 100644 --- a/pom.xml +++ b/pom.xml @@ -87,11 +87,6 @@ <artifactId>jep</artifactId> <version>4.1.0</version> </dependency> - <dependency> - <groupId>org.rauschig</groupId> - <artifactId>jarchivelib</artifactId> - <version>0.5.0</version> - </dependency> </dependencies> <!-- Icy Maven repository (to find parent POM) --> diff --git a/src/main/java/org/bioimageanalysis/icy/jep/install/JepInstaller.java b/src/main/java/org/bioimageanalysis/icy/jep/install/JepInstaller.java index 619762a..0670eac 100644 --- a/src/main/java/org/bioimageanalysis/icy/jep/install/JepInstaller.java +++ b/src/main/java/org/bioimageanalysis/icy/jep/install/JepInstaller.java @@ -17,8 +17,6 @@ import java.util.function.Consumer; import org.bioimageanalysis.icy.jep.install.system.Log; import org.bioimageanalysis.icy.jep.install.system.PlatformDetection; import org.bioimageanalysis.icy.jep.utils.CommonUtils; -import org.rauschig.jarchivelib.Archiver; -import org.rauschig.jarchivelib.ArchiverFactory; import icy.preferences.PluginsPreferences; import icy.preferences.XMLPreferences; @@ -476,6 +474,8 @@ private static String VS_OLDER_DOWNLOADS = "https://visualstudio.microsoft.com/v displayMsg("JEP successfully installed!!"); } + /** + * TODO remove private void downloadAndUnzipJepSource() throws IOException { String jepUrl = CommonUtils.getJepSourceUrl(jepVersion); checkJepVersionExist(jepUrl); @@ -495,17 +495,17 @@ private static String VS_OLDER_DOWNLOADS = "https://visualstudio.microsoft.com/v displayMsg("Unzipping JEP source into: " + tmpJepSourceFolder.getAbsolutePath()); Archiver archiver = ArchiverFactory.createArchiver("tar", "gz"); archiver.extract(tmpJepSourceZip, tmpJepSourceFolder); - /* TODO - * TODO - * TODO - * if (!ZipUtil.extract(tmpJepSourceZip.getAbsolutePath(), - tmpJepSourceFolder.getAbsolutePath()) ) { - scheduleDeletionOfJepSource(); - deleteTmpFile(tmpJepSourceFolder); - throw new IOException("Could not unzip JEP source zip file: " + tmpJepSourceZip.getAbsolutePath()); - }*/ - scheduleDeletionOfJepSource(); - } + //TODO + //TODO + //TODO + //if (!ZipUtil.extract(tmpJepSourceZip.getAbsolutePath(), + // tmpJepSourceFolder.getAbsolutePath()) ) { + // scheduleDeletionOfJepSource(); + // deleteTmpFile(tmpJepSourceFolder); + // throw new IOException("Could not unzip JEP source zip file: " + tmpJepSourceZip.getAbsolutePath()); + //scheduleDeletionOfJepSource(); + } + */ private void checkJepVersionExist(String jepUrl) throws IOException { checkInternetConnection(); diff --git a/src/main/java/org/bioimageanalysis/icy/jep/utils/PythonUtils.java b/src/main/java/org/bioimageanalysis/icy/jep/utils/PythonUtils.java index f376105..75ab8fc 100644 --- a/src/main/java/org/bioimageanalysis/icy/jep/utils/PythonUtils.java +++ b/src/main/java/org/bioimageanalysis/icy/jep/utils/PythonUtils.java @@ -127,7 +127,7 @@ public class PythonUtils { if (!arePythonAndJVMArchitecuresCompatible()) throw new IllegalArgumentException("The architecure of the installed Python needs to be the same" + " as the one for the JVM specified at environmnet variable 'JAVA_HOME'." + System.lineSeparator() - + "This might be tricky for Apple M1 and posterior that use arm64 chips." + System.lineSeparator() + + "This might be tricky for Apple M1 and later that use arm64 chips." + System.lineSeparator() + "For more info visit the Wiki: " + CommonUtils.ARCH_HOME_WIKI); } -- GitLab