MassBank / MassBank2NIST

A converter between MassBank and NIST (and Bruker .library) formats and back
2 stars 2 forks source link

Error when compiling with Maven #30

Open moebaid opened 3 years ago

moebaid commented 3 years ago

When I try to compile the package following the instructions in the README: mvn clean package

I get a DependencyResolutionException:

[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------< MassBank2NIST:MassBank2NIST >---------------------
[INFO] Building MassBank2NIST 0.0.2-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.450 s
[INFO] Finished at: 2021-04-07T01:08:28-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project MassBank2NIST: Could not resolve dependencies for project MassBank2NIST:MassBank2NIST:jar:0.0.2-SNAPSHOT: Failed to collect dependencies at edu.ucdavis.fiehnlab.splash:core:jar:1.8: Failed to read artifact descriptor for edu.ucdavis.fiehnlab.splash:core:jar:1.8: Could not transfer artifact edu.ucdavis.fiehnlab.splash:core:pom:1.8 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [EBI (http://www.ebi.ac.uk/intact/maven/nexus/content/repositories/ebi-repo/, default, releases+snapshots), releases (http://gose.fiehnlab.ucdavis.edu:55000/content/groups/public, default, releases+snapshots)] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

I haven't made any edits to the package, and it seems it can't collect the dependencies correctly.

sneumann commented 3 years ago

Hi, thanks for reporting. The most likely cause is that this quite old code does not build on current Java JDK. A short-term fix would be to modify the pom.xml to fall back to Java X, where X=8 or X=11. Yours, Steffen

sneumann commented 3 years ago

Hi, your issue prompted me to enable build testing at https://github.com/MassBank/MassBank2NIST/actions and as you see after a few broken builds (which had the same error as you showed above) things work again. You will need The Java 8 JDK for building since JDK 11 has another issue. Running java -jar target/MassBank2NIST-0.0.2-SNAPSHOT.jar works with JRE 11 just fine. I don't yet know how the GitHub maven repository works to publish that Jar file. Yours, Steffen

sneumann commented 3 years ago

If you go to https://github.com/MassBank/MassBank2NIST/packages/716384 at the right you can download the ready-built massbank2nist-0.0.4.jar. Yours, Steffen

moebaid commented 3 years ago

Thanks for responding! So ideally I should have JDK 8 and JRE 11 installed?

sneumann commented 3 years ago

If you take the above prebuilt massbank2nist-0.0.4.jar JRE11 (or maybe even later ?) should work. If you want to build yourself, JDK 8 is mandatory. Yours, Steffen