You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Fred Bricon (JIRA)" <ji...@apache.org> on 2019/01/18 22:15:00 UTC

[jira] [Updated] (MNG-6567) Dependency resolution when repository defined

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

Fred Bricon updated MNG-6567:
-----------------------------
    Description: 
With the following pom.xml, the Maven build fails with _Could not resolve dependencies for project foo.bar:test:jar:0.0.1-SNAPSHOT: Could not find artifact org.eclipse.xtend:org.eclipse.xtend.lib:jar:2.17.0.M1_:
{noformat}
<project xmlns="http://maven.apache.org/POM/4.0.0" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>foo.bar</groupId>
  <artifactId>test</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <dependencies>
    <dependency>
      <groupId>org.eclipse.lsp4j</groupId>
      <artifactId>org.eclipse.lsp4j</artifactId>
      <version>0.6.0</version>
    </dependency>
  </dependencies>
  <repositories>
    <repository>
      <id>oss-jfrog-snapshots</id>
      <url>https://oss.jfrog.org/artifactory/libs-snapshot</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
</project>
{noformat}

If you remove the repository, the build works. That repo is configured to only fetch snapshots, so it makes no sense.

The funny thing is if you add 

{noformat}
<dependency>
  <groupId>org.eclipse.xtend</groupId>
  <artifactId>org.eclipse.xtend.lib</artifactId>
  <version>2.17.0.M1</version>
</dependency>
{noformat}

then Maven succeeds in resolving the transitive dependency.


  was:
With the following pom.xml, the Maven build fails with _Could not resolve dependencies for project foo.bar:test:jar:0.0.1-SNAPSHOT: Could not find artifact org.eclipse.xtend:org.eclipse.xtend.lib:jar:2.17.0.M1_:
{noformat}
<project xmlns="http://maven.apache.org/POM/4.0.0" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>foo.bar</groupId>
  <artifactId>test</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <dependencies>
    <dependency>
      <groupId>org.eclipse.lsp4j</groupId>
      <artifactId>org.eclipse.lsp4j</artifactId>
      <version>0.6.0</version>
    </dependency>
  </dependencies>
  <repositories>
    <repository>
      <id>oss-jfrog-snapshots</id>
      <url>https://oss.jfrog.org/artifactory/libs-snapshot</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
</project>
{noformat}

If you remove the repository, the build works. That repo is configured to only fetch snapshots, so it makes no sense.

The funny thing is if you add 

{noformat}
<dependency>
  <groupId>org.eclipse.xtend</groupId>
  <artifactId>org.eclipse.xtend.lib</artifactId>
  <version>2.17.0.M1</version>
</dependency>
{noformat}

then Maven succeeds in resolving the transitive dependency.

If you remove the snapshot repository, the build succeeds.


> Dependency resolution when repository defined
> ---------------------------------------------
>
>                 Key: MNG-6567
>                 URL: https://issues.apache.org/jira/browse/MNG-6567
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.5.3, 3.6.0
>            Reporter: Fred Bricon
>            Priority: Major
>
> With the following pom.xml, the Maven build fails with _Could not resolve dependencies for project foo.bar:test:jar:0.0.1-SNAPSHOT: Could not find artifact org.eclipse.xtend:org.eclipse.xtend.lib:jar:2.17.0.M1_:
> {noformat}
> <project xmlns="http://maven.apache.org/POM/4.0.0" 
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>foo.bar</groupId>
>   <artifactId>test</artifactId>
>   <version>0.0.1-SNAPSHOT</version>
>   <dependencies>
>     <dependency>
>       <groupId>org.eclipse.lsp4j</groupId>
>       <artifactId>org.eclipse.lsp4j</artifactId>
>       <version>0.6.0</version>
>     </dependency>
>   </dependencies>
>   <repositories>
>     <repository>
>       <id>oss-jfrog-snapshots</id>
>       <url>https://oss.jfrog.org/artifactory/libs-snapshot</url>
>       <releases>
>         <enabled>false</enabled>
>       </releases>
>       <snapshots>
>         <enabled>true</enabled>
>       </snapshots>
>     </repository>
>   </repositories>
> </project>
> {noformat}
> If you remove the repository, the build works. That repo is configured to only fetch snapshots, so it makes no sense.
> The funny thing is if you add 
> {noformat}
> <dependency>
>   <groupId>org.eclipse.xtend</groupId>
>   <artifactId>org.eclipse.xtend.lib</artifactId>
>   <version>2.17.0.M1</version>
> </dependency>
> {noformat}
> then Maven succeeds in resolving the transitive dependency.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)