apache / felix-atomos

Apache Felix Atomos
https://felix.apache.org/
Apache License 2.0
38 stars 19 forks source link

Build error due to missing signature:java111 #56

Closed wolfgangimig closed 2 years ago

wolfgangimig commented 2 years ago

Build commands fail in my env.

Message: [ERROR] Failed to execute goal org.codehaus.mojo:animal-sniffer-maven-plugin:1.18:check (default) on project atomos-parent: Failed to obtain signature: org.codehaus.mojo.signature:java111:1.0: Failure to find org.codehaus.mojo.signature:java111:signature:1.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will...

...:~/git/felix-atomos$ java -version
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1)
OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1, mixed mode, sharing)
...:~/git/felix-atomos$ mvn -version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 1.8.0_312, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.13.0-40-generic", arch: "amd64", family: "unix"

Thanks in advance for suggestions.

rotty3000 commented 2 years ago

You may have java version 11 but clearly mvn used java 8 which is the issue.

Mvn will prefer to use java found from $JAVA_HOME. that's probably your issue. Make sure it also points to java 11.

On Fri., May 13, 2022, 5:30 a.m. Wolfgang Imig, @.***> wrote:

Build commands https://github.com/apache/felix-atomos#build fail in my env.

Message: [ERROR] Failed to execute goal org.codehaus.mojo:animal-sniffer-maven-plugin:1.18:check (default) on project atomos-parent: Failed to obtain signature: org.codehaus.mojo.signature:java111:1.0: Failure to find org.codehaus.mojo.signature:java111:signature:1.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will...

...:~/git/felix-atomos$ java -version openjdk version "11.0.15" 2022-04-19 OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1) OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1, mixed mode, sharing)

...:~/git/felix-atomos$ mvn -version Apache Maven 3.6.3 Maven home: /usr/share/maven Java version: 1.8.0_312, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.13.0-40-generic", arch: "amd64", family: "unix"

Thanks in advance for suggestions.

— Reply to this email directly, view it on GitHub https://github.com/apache/felix-atomos/issues/56, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABD2TGSOLTG67IIZFZOHRTVJYOKXANCNFSM5V2ZT7HQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

wolfgangimig commented 2 years ago

Maven takes the Java JAVA_HOME variable from ~/.mavenrc and ignores the environment variable. After entering export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64 in this config file the project compiles successfully. Thanks rotty3000