maybeec / oomph-task-unzip

Oomph Task for unzipping archives
Eclipse Public License 1.0
1 stars 3 forks source link

task-unzip submodule: Maven goal fails #18

Closed duracotton closed 3 years ago

duracotton commented 3 years ago

A mvn clean install (or package) of the "task-unzip" submodule fails with the following error on several machines/setups:

[INFO] --- tycho-compiler-plugin:0.22.0:compile (default-compile) @ com.github.maybeec.oomph.task.unzip --- [INFO] Compiling 13 source files to C:\FOLDER\repositories\oomph-task-unzip\task-unzip\target\classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 26.983 s [INFO] Finished at: 2020-10-28T18:35:49+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.22.0:compile (default-compile) on project com.github.maybeec.oomph.task.unzip: Compilation failure: Compilation failure: [ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[7] [ERROR] import org.apache.commons.compress.archivers.ArchiveEntry; [ERROR] ^^^^^^^^^^^^^^^^^^ [ERROR] The import org.apache.commons cannot be resolved [ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[8] [ERROR] import org.apache.commons.compress.archivers.ArchiveInputStream; [ERROR] ^^^^^^^^^^^^^^^^^^ [ERROR] The import org.apache.commons cannot be resolved [ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[9] [ERROR] import org.apache.commons.compress.archivers.ArchiveStreamFactory; [ERROR] ^^^^^^^^^^^^^^^^^^ [ERROR] The import org.apache.commons cannot be resolved [ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[10] [ERROR] import org.apache.commons.compress.compressors.CompressorInputStream; [ERROR] ^^^^^^^^^^^^^^^^^^ [ERROR] The import org.apache.commons cannot be resolved [ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[11] [ERROR] import org.apache.commons.compress.compressors.CompressorStreamFactory; [ERROR] ^^^^^^^^^^^^^^^^^^ [ERROR] The import org.apache.commons cannot be resolved [ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[12] [ERROR] import org.apache.commons.compress.utils.IOUtils; [ERROR] ^^^^^^^^^^^^^^^^^^ [ERROR] The import org.apache.commons cannot be resolved [ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[47] [ERROR] CompressorInputStream cIS = new CompressorStreamFactory().createCompressorInputStream(in); [ERROR] ^^^^^^^^^^^^^^^^^^^^^ [ERROR] CompressorInputStream cannot be resolved to a type [ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[47] [ERROR] CompressorInputStream cIS = new CompressorStreamFactory().createCompressorInputStream(in); [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^ [ERROR] CompressorStreamFactory cannot be resolved to a type [ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[64] [ERROR] ArchiveInputStream archiveIS = new ArchiveStreamFactory().createArchiveInputStream(fileIS); [ERROR] ^^^^^^^^^^^^^^^^^^ [ERROR] ArchiveInputStream cannot be resolved to a type [ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[64] [ERROR] ArchiveInputStream archiveIS = new ArchiveStreamFactory().createArchiveInputStream(fileIS); [ERROR] ^^^^^^^^^^^^^^^^^^^^ [ERROR] ArchiveStreamFactory cannot be resolved to a type [ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[65] [ERROR] ArchiveEntry entry; [ERROR] ^^^^^^^^^^^^ [ERROR] ArchiveEntry cannot be resolved to a type [ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[77] [ERROR] IOUtils.copy(archiveIS, out); [ERROR] ^^^^^^^ [ERROR] IOUtils cannot be resolved [ERROR] 12 problems (12 errors) [ERROR] -> [Help 1]

Maven is actually downloading the Apache commons-compress-1.19.jar to the local Maven repository and it is also being copied to the project's lib folder. So that is working and the dependency is actually present on the filesystem. However, Maven can not find this dependency.

Importing the submodule in Eclipse shows the same. Eclipse isn't able to auto-complete an "import" statement to "org.apache.commons.*": image

The Properties > Build path of that submodule doesn't show any Maven dependencies (actually the "Maven Dependencies" list wasn't even there! I had to edit the .classpath file for that): image

I did not come up with any solution so far - do you have any ideas?

Thank you

duracotton commented 3 years ago

Found the issues:

15 increases the Apache commons-compress library to 1.19, but this change has not been adapted to the build.properties and MANIFEST.MF

2020-11-20 15_12_44-_Notepad+

2020-11-20 15_13_10-Notep

maybeec commented 3 years ago

Fixed. You need to once run mvn package on the console