sanger-pathogens / Artemis

Artemis is a free genome viewer and annotation tool that allows visualization of sequence features and the results of analyses within the context of the sequence, and its six-frame translation
http://sanger-pathogens.github.io/Artemis
Other
236 stars 76 forks source link

Failure in build: The following artifacts could not be resolved: com.ibatis:ibatis:jar:2.3.4.726 ... #302

Closed yurivict closed 4 years ago

yurivict commented 4 years ago

I am trying to build the version 18.1.0 on FreeBSD using maven-3.6.3. The build fails:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  14.474 s
[INFO] Finished at: 2020-01-19T12:21:34-08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project artemis: Could not resolve dependencies for project uk.ac.sanger:artemis:jar:18.1.0: The following artifacts could not be resolved: com.ibatis:ibatis:jar:2.3.4.726, com.sshtools:j2ssh-core:jar:0.2.9, org.emboss:jemboss:jar:1.0, org.biojava:biojava:jar:1.6: Could not find artifact com.ibatis:ibatis:jar:2.3.4.726 in central (https://repo.maven.apache.org/maven2) -> [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
*** Error code 1
kpepper commented 4 years ago

Hi @yurivict. Those libs are available in the lib folder. Did you run 'mvn validate' first before running the build - that should install the lib jars into the local repo. See the README.

yurivict commented 4 years ago

Now it breaks in a different way:

[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ artemis ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 585 source files to /usr/ports/biology/artemis/work/artemis-18.1.0/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.070 s
[INFO] Finished at: 2020-01-20T01:58:11-08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project artemis: Fatal error compiling: invalid flag: --release -> [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/MojoExecutionException
*** Error code 1
kpepper commented 4 years ago

What commands did you execute?

yurivict commented 4 years ago
mvn -Duser.home=/tmp validate &&
mvn -Duser.home=/tmp -fae install -Dmaven.test.skip=true package
kpepper commented 4 years ago

What Java version are you using to build?

yurivict commented 4 years ago

openjdk8-8.232.09.1_1

kpepper commented 4 years ago

You need to use openjdk11 for Artemis v18.1.0.

kpepper commented 4 years ago

Did the JDK switch fix the error?

yurivict commented 4 years ago

I think maven just uses java that it was built with. Need to switch maven to another jdk, not sure if (1) this is easy, and (b) other packages built with maven would be affected.

kpepper commented 4 years ago

If I use Java 8 for the build I get the same error. If I then switch to Java 11 it's fine. Change the JAVA_HOME and PATH environment variables to pick up the JDK 11 install - 'mvn --version' should show you which Java version Maven is picking up from the environment. I currently use Maven 3.5.4.

yurivict commented 4 years ago

The path was set wrong, and the right Java executable wasn't picked up.

Thank you!