scope="system" errors are difficult to diagnose because the error message is wrong ----------------------------------------------------------------------------------
Key: MNG-4723 URL: http://jira.codehaus.org/browse/MNG-4723 Project: Maven 2 & 3 Issue Type: Bug Components: POM Affects Versions: 2.2.1 Environment: Apache 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" Reporter: SebbASF 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. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira