Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6567

Dependency resolution when repository defined

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.5.3, 3.6.0
    • Fix Version/s: waiting-for-feedback
    • Component/s: None
    • Labels:
      None

      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:

      <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>
      

      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

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

      then Maven succeeds in resolving the transitive dependency.

        Attachments

        1. build.txt
          48 kB
          Fred Bricon

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fbricon Fred Bricon
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: