maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <j...@codehaus.org>
Subject [jira] (MNG-4723) scope="system" errors are difficult to diagnose because the error message is wrong
Date Sun, 02 Jun 2013 14:39:03 GMT

     [ https://jira.codehaus.org/browse/MNG-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Robert Scholte updated MNG-4723:
--------------------------------

    Description: 
The following pom contents:
{code:xml}
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>system</scope>
      <systemPath>c:/x/y/x</systemPath>
    </dependency>
  </dependencies>
{code}
generates the output:

{noformat}
[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)
{noformat}


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.


  was:
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.


    
> scope="system" errors are difficult to diagnose because the error message is wrong
> ----------------------------------------------------------------------------------
>
>                 Key: MNG-4723
>                 URL: https://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
>             Fix For: Issues to be reviewed for 3.x
>
>
> The following pom contents:
> {code:xml}
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>system</scope>
>       <systemPath>c:/x/y/x</systemPath>
>     </dependency>
>   </dependencies>
> {code}
> generates the output:
> {noformat}
> [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)
> {noformat}
> 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, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message