Creating Addon: Could not find artifact com.sunđź› jar:1.8.0

I’ve just setup Eclipse on Windows and trying to “mvn clean install” the homematic binding.

It fails with this error:

[INFO]
[INFO] --- tycho-p2-plugin:1.0.0:p2-metadata-default (default-p2-metadata-default) @ org.openhab.binding.homematic ---
[INFO]
[INFO] --- sat-plugin:0.5.0:checkstyle (default) @ org.openhab.binding.homematic ---
[INFO] Adding dependency to checkstyle:0.5.0
[INFO] Adding dependency to checkstyle:8.1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.238 s
[INFO] Finished at: 2018-05-04T17:02:45+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openhab.tools.sat:sat-plugin:0.5.0:checkstyle (default) on project org.openhab.binding.homematic: Unable to execute mojo: Execution null of goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:checkstyle failed: Plugin org.apache.maven.plugins:maven-checkstyle-plugin:2.17 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.8.0 at specified path C:\Program Files\Java\jre1.8.0_171/../lib/tools.jar -> [Help 1]

I’m using JDK 8 so I’ve actually no clue why it tries to find it in the JRE in this case (I’m a Java/Eclipse beginner tho).

Having the same problem. I’m running Debian 9 and installed both java and maven through apt. In the first post Crazy tries to build the homematic binding and maven gives error about that same binding. My warning comes from airquality binding but I’m trying to build a whole different binding. Got any ideas?

root@z800:/# mvn -version

Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: fi_FI, platform encoding: UTF-8
OS name: "linux", version: "4.9.0-7-amd64", arch: "amd64", family: "unix"
root@z800:/# java -version

openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-1~deb9u1-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)
#mvn clean install

[ERROR] Failed to execute goal org.openhab.tools.sat:sat-plugin:0.5.0:checkstyle (default) on project org.openhab.binding.airquality: Unable to execute mojo: Execution null of goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:checkstyle failed: Plugin org.apache.maven.plugins:maven-checkstyle-plugin:2.17 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.8.0 at specified path /usr/lib/jvm/java-8-openjdk-amd64/jre/../lib/tools.jar

Please read the prerequisits, openjdk is not recommended java version. Please install Oracle JDK.

1 Like

I have read about prerequisites and my oh server is running zulu java 8. But just haven’t thought that also maven and eclipse doesn’t work well with openJDK. I’ll do the switch to zulu or oracle soon. Thanks!

Problem solved when I switched to Oracle JDK. Thanks @hmerk for pointing me to right direction. Maven works now like a charm. Hope I could mark this whole post as solved.

FTR here’s a good tutorial (which i used) to get Oracle Java 8 running on your Debian system: Tecadmin.net. Install Java 8 on debian. Just rememeber to set up defaults and environment variables.