[
https://issues.apache.org/jira/browse/MTOOLCHAINS-2?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov closed MTOOLCHAINS-2.
------------------------------------
Resolution: Auto Closed
This issue has been auto closed because it has been inactive for a long period
of time. If you think this issue still applies, retest your problem with the
most recent version of Maven and the affected component, reopen and post your
results.
> Dependencies with scope "system" (${java.home}/lib/tools.jar) doesn't use
> environment from toolchain
> ----------------------------------------------------------------------------------------------------
>
> Key: MTOOLCHAINS-2
> URL: https://issues.apache.org/jira/browse/MTOOLCHAINS-2
> Project: Maven Toolchains Plugin
> Issue Type: Bug
> Affects Versions: 1.0
> Environment: Windows + Ubuntu Linux
> Java 1.5.0_22 (Starting Maven 2.2.1), using Java 1.4.2_19 configured in
> toolchain
> Reporter: Denis Schettl
> Priority: Major
>
> We need a system dependency ({{$\{java.home}/lib/tools.jar}}) with scope
> system.
> {code:xml}<dependency>
> <groupId>com.sun</groupId>
> <artifactId>tools</artifactId>
> <version>1.4</version>
> <scope>system</scope>
> <systemPath>${java.home}/lib/tools.jar</systemPath>
> </dependency>{code}
> {noformat}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 {execution: default-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{noformat}
> 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:
> {code:xml}<dependency>
> <groupId>com.sun</groupId>
> <artifactId>tools</artifactId>
> <version>1.4</version>
> <scope>system</scope>
> <systemPath>${toolchain.jdkhome}/lib/tools.jar</systemPath>
> </dependency>{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)