Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.0
-
Fix Version/s: None
-
Labels:None
-
Environment:Windows + Ubuntu Linux
Java 1.5.0_22 (Starting Maven 2.2.1), using Java 1.4.2_19 configured in toolchain
-
Number of attachments :
Description
We need a system dependency ($
{java.home}/lib/tools.jar) with scope system.<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.4</version>
<scope>system</scope>
<systemPath>${java.home}
/lib/tools.jar</systemPath>
</dependency>
D:\sandbox\QUERTOOLS-HEAD\apps\jdi-profiling>mvn clean package -Penv.km [INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building jdi-profiling
[INFO] task-segment: [clean, package]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean
] [INFO] [toolchains:toolchain
{execution: set_java-version_to_use}] [INFO] Type:jdk [INFO] Toolchain (jdk) matched:JDK[C:\Programme\Java\j2sdk1.4.2_19]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) com.sun:tools:jar:1.4
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.sun -DartifactId=tools -Dversion=1.4 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.sun -DartifactId=tools -Dversion=1.4 -Dpackaging=jar -Dfile=/path/to/file -Du rl=[url] -DrepositoryId=[id]
Path to dependency:
1) de.ipcc.quer.tools:jdi-profiling:jar:1.0-SNAPSHOT
2) com.sun:tools:jar:1.4
----------
1 required artifact is missing.
for artifact:
de.ipcc.quer.tools:jdi-profiling:jar:1.0-SNAPSHOT
An solution can be that toolchain supply an property with the jdkhome directory (e.g. toolchain.jdkhome), so that we can use this for definition of tools.jar like:
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.4</version>
<scope>system</scope>
<systemPath>$
/lib/tools.jar</systemPath>
</dependency>