JVM version error with maven
- Dominant language
- Java
- Stars
- 786
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I am trying to install from source on Linux Mint. I previously was using ImageJ 1.53o which I downloaded for Linux from https://imagej.net/software/fiji/downloads. Recently I started getting errors from Fiji about my java version being too old / security risk, so I decided to update. It is strange because "About ImageJ" reports version 1.53o and Java 17.0.5, is that really too old?
Regardless I decided to install from source to get the most up to date version. So I did the following:
sudo apt install maven # to get maven from my package manager
git clone https://github.com/imagej/ImageJ
cd ImageJ
mvn
Maven works for a while and then fails with the following error:
```
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Source option 6 is no longer supported. Use 7 or later.
[ERROR] Target option 6 is no longer supported. Use 7 or later.
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.410 s
[INFO] Finished at: 2023-02-04T12:04:29-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (complete-recompile) on project ij: Compilation failure: Compilation failure:
[ERROR] Source option 6 is no longer supported. Use 7 or later.
[ERROR] Target option 6 is no longer supported. Use 7 or later.
[ERROR] -> [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/MojoFailureException
```
This stackoverflow was helpful: https://stackoverflow.com/questions/61860989/another-maven-source-option-6-is-no-longer-supported-use-7-or-later
I changed this line in `pom.xml`:
`6`
to this:
`8`
Now maven successfully completes, and I can start FIJI as follows: java -jar target/ij-1.x-SNAPSHOT.jar. It reports version 1.54c7, Java 17.0.5. But now when I ask it to update, I am confronted with the choice to upgrade to v1.54b, daily build, previous, etc. All I really want to do is update my extensions. I am not sure if I am doing any of this right.
My questions:
* What is the recommended way to install an up-to-date version of FIJI that will not have security risks and can also update its extensions?
* Is it appropriate to make the Maven change from jvm v6 to v8 in pom.xml? I am not familiar with maven.
* What version of jvm is required / recommended?
Thanks!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with pom.xml and the Maven command shown in the report, then trace the scijava.jvm.version setting behind the maven-compiler-plugin error. Compare the reported Java 17.0.5 environment with the repository's documented build and update path. Done means the supported JVM version, recommended Fiji installation method, and whether changing the POM is appropriate are clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100