Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.2.1
-
Fix Version/s: Issues to be reviewed for 3.x
-
Component/s: POM
-
Labels:None
-
Environment:HideApache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100)
Java version: 1.6.0_20
Java home: C:\jdk1.6.0_20\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"ShowApache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100) Java version: 1.6.0_20 Java home: C:\jdk1.6.0_20\jre Default locale: en_GB, platform encoding: Cp1252 OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
-
Complexity:Intermediate
-
Number of attachments :
Description
The following pom contents:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>system</scope>
<systemPath>c:/x/y/x</systemPath>
</dependency>
</dependencies>
generates the output:
=================================================
[INFO] Failed to resolve artifact.
Missing:
----------
1) junit:junit:jar:3.8.1
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=junit -DartifactId=junit -Dversion=3.8.1 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=junit -DartifactId=junit -Dversion=3.8.1 -Dpackaging=jar -Dfile=/path/to/file -Du
rl=[url] -DrepositoryId=[id]
Path to dependency:
1) org.home.mvnsample:mvnsample:jar:1.0-ALPHA2
2) junit:junit:jar:3.8.1
----------
1 required artifact is missing.
for artifact:
org.home.mvnsample:mvnsample:jar:1.0-ALPHA2
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
=================================================
This implies that the junit.jar is being sought in Maven Central, whereas in fact it is supposed to be in a local directory.
It would be a lot easier to debug errors in the systemPath if the error message showed where Maven was actually looking for it.