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/02/22 16:33:00 UTC

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

    [ https://issues.apache.org/jira/browse/MNG-6567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16775346#comment-16775346 ] 

Fred Bricon commented on MNG-6567:
----------------------------------

The guava version (<guava-version>[14.0,22.0)</guava-version>) is defined in the [xtext-dev-bom pom|https://search.maven.org/artifact/org.eclipse.xtext/xtext-dev-bom/2.17.0.M1/pom], which [org.eclipse.xtext.xbase.lib|https://search.maven.org/artifact/org.eclipse.xtext/org.eclipse.xtext.xbase.lib/2.17.0.M1/jar] imports.

> 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
>             Fix For: waiting-for-feedback
>
>         Attachments: build.txt
>
>
> 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)