0

I need to build this https://repo1.maven.org/maven2/org/glassfish/ha/ha-api/3.1.12/ from sources in JDK 11 environment (Maven 3.8.1) here is pom.xml https://repo1.maven.org/maven2/org/glassfish/ha/ha-api/3.1.12/ha-api-3.1.12.pom now I got the following error:

mvn install      
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.glassfish.hk2:hk2-maven-plugin:2.0.5
        or one of its dependencies could not be resolved:
        Could not find artifact com.sun:tools:jar:2.0.5 at specified path /home/katya/java/../lib/tools.jar @ 
[ERROR] Unknown packaging: hk2-jar @ line 32, column 16
[WARNING] 'build.plugins.plugin[org.glassfish.hk2:hk2-maven-plugin].dependencies.dependency.systemPath'
          for com.sun:tools:jar refers to a non-existing file /home/katya/java/../lib/tools.jar.
          Please verify that you run Maven using a JDK and not just a JRE. @ line 161, column 37

Please tell me how to modify pom.xml to build in my environment? Thank you!

Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
  • 1
    Have you tried https://github.com/eclipse-ee4j/glassfish#building ? – SiKing Jul 14 '21 at 18:54
  • 1
    Why do you want to build it from sources instead of taking it from MavenCentral? – J Fabian Meier Jul 14 '21 at 19:39
  • Does this answer your question? [Could not find artifact com.sun:tools:jar:0](https://stackoverflow.com/questions/55207885/could-not-find-artifact-com-suntoolsjar0) – Joe Jul 25 '21 at 12:41

1 Answers1

3
Could not find artifact com.sun:tools:jar:2.0.5 at specified path /home/katya/java/../lib/tools.jar`

and

com.sun:tools:jar refers to a non-existing file /home/katya/java/../lib/tools.jar.
Please verify that you run Maven using a JDK and not just a JRE.

give valuable hints.

There is no .../lib/tools.jar in a JRE and there's also no .../lib/tools.jar in JDK 9 onwards.

Gerold Broser
  • 14,080
  • 5
  • 48
  • 107