Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builds using spring-cloud-starter-parent fail due to missing dependencies. #44

Closed
colin-icontrol opened this issue Mar 4, 2016 · 13 comments

Comments

@colin-icontrol
Copy link

It would appear the recent spate of Spring releases has broken Brixton.BUILD-SNAPSHOT.

In a maven project with the following:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-parent</artifactId>
            <version>Brixton.BUILD-SNAPSHOT</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

(I'm also pointing at the repo.spring.io libs-{snapshot,milestone,release}-local repositories)

I get the following resolution error for spring-cloud-dependencies-parent:

[INFO] Scanning for projects...
Downloading: http://repo.spring.io/libs-snapshot-local/org/springframework/cloud/spring-cloud-starter-parent/Brixton.BUILD-SNAPSHOT/maven-metadata.xml
Downloaded: http://repo.spring.io/libs-snapshot-local/org/springframework/cloud/spring-cloud-starter-parent/Brixton.BUILD-SNAPSHOT/maven-metadata.xml (812 B at 1.1 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-dependencies-parent/1.1.0.RC1/spring-cloud-dependencies-parent-1.1.0.RC1.pom
Downloading: http://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-build/1.1.0.RC1/spring-cloud-build-1.1.0.RC1.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.mycompany:myproject:1.0.0.0-SNAPSHOT (/Users/me/src/mycompany/master/myproject/pom.xml) has 10 errors
[ERROR]     Non-resolvable parent POM: Could not find artifact org.springframework.cloud:spring-cloud-dependencies-parent:pom:1.1.0.RC1 in central (http://repo.maven.apache.org/maven2) @ org.springframework.cloud:spring-cloud-stream-dependencies:1.0.0.BUILD-SNAPSHOT, /Users/me/.m2/repository/org/springframework/cloud/spring-cloud-stream-dependencies/1.0.0.BUILD-SNAPSHOT/spring-cloud-stream-dependencies-1.0.0.BUILD-SNAPSHOT.pom, line 4, column 10 -> [Help 2]
@spencergibb
Copy link
Member

It doesn't look like you're pointing to libs-milestone-local. Your log didn't try to download the artifact from that repository.

The actual build is broken because of this issue: https://travis-ci.org/spring-cloud/spring-cloud-starters/builds/113183780

@colin-icontrol
Copy link
Author

My repositories are defined thusly:

<repositories>
    <repository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>http://repo.spring.io/libs-snapshot-local</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>http://repo.spring.io/libs-milestone-local</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>spring-releases</id>
        <name>Spring Releases</name>
        <url>http://repo.spring.io/libs-release-local</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

@spencergibb
Copy link
Member

Why doesn't you log attempt to download from libs-milestone-local?

@colin-icontrol
Copy link
Author

I'm not sure why that doesn't show up.

Could it be a maven transitive dependency thing? From the downloads, it resolves spring-cloud-starter-parent from repo.spring.io/libs-snapshot-local, however it appears there is a reference in that artifact to spring-cloud-dependencies-parent that goes right to repo.maven.apache.org instead of resolving through the spring repositories.

Off the top of my head, does spring-cloud-starter-parent need to have the repositories element pointing to the spring repositories?

FWIW, I'm using maven 3.2.2.

@spencergibb
Copy link
Member

What is the your pom's parent?

@colin-icontrol
Copy link
Author

I get this error using a pom with no parent. If I set the parent to the following, I get the same download problem and more maven errors.

<parent>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-parent</artifactId>
    <version>Brixton.BUILD-SNAPSHOT</version>
    <relativePath/>
    <!-- lookup parent from repository -->
</parent>

@colin-icontrol
Copy link
Author

For what it's worth, the project: https://github.com/spring-cloud-samples/customers-stores seems to have the same problem, except it's looking for the 1.1.0.BUILD-SNAPSHOT release of spring-cloud-dependencies-parent.

@spencergibb
Copy link
Member

I think 70beb5e may have fixed things.

@spencergibb
Copy link
Member

hmm, never mind.

@spencergibb
Copy link
Member

Ok, b632d9d really fixed things.

@colin-icontrol
Copy link
Author

When can I expect the changes to be published to the repos?

And thanks for the quick responses!

@spencergibb
Copy link
Member

Snapshots are published immediately. You may need to force an update with mvn -U.

@colin-icontrol
Copy link
Author

The problem still exists. I removed spring-cloud-starter-parent and spring-cloud-starter-dependencies from my local repository, and rebuilt, and I get the same error.

Downloading: http://repo.spring.io/libs-snapshot-local/org/springframework/cloud/spring-cloud-starter-parent/Brixton.BUILD-SNAPSHOT/maven-metadata.xml
Downloaded: http://repo.spring.io/libs-snapshot-local/org/springframework/cloud/spring-cloud-starter-parent/Brixton.BUILD-SNAPSHOT/maven-metadata.xml (812 B at 1.9 KB/sec)
Downloading: http://repo.spring.io/libs-snapshot-local/org/springframework/cloud/spring-cloud-starter-parent/Brixton.BUILD-SNAPSHOT/spring-cloud-starter-parent-Brixton.BUILD-20160304.195227-40.pom
Downloaded: http://repo.spring.io/libs-snapshot-local/org/springframework/cloud/spring-cloud-starter-parent/Brixton.BUILD-SNAPSHOT/spring-cloud-starter-parent-Brixton.BUILD-20160304.195227-40.pom (5 KB at 29.9 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-dependencies-parent/1.1.0.RC1/spring-cloud-dependencies-parent-1.1.0.RC1.pom
Downloading: http://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-build/1.1.0.RC1/spring-cloud-build-1.1.0.RC1.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] Non-resolvable parent POM: Could not find artifact org.springframework.cloud:spring-cloud-dependencies-parent:pom:1.1.0.RC1 in central (http://repo.maven.apache.org/maven2) @ org.springframework.cloud:spring-cloud-stream-dependencies:1.0.0.BUILD-SNAPSHOT, /Users/me/.m2/repository/org/springframework/cloud/spring-cloud-stream-dependencies/1.0.0.BUILD-SNAPSHOT/spring-cloud-stream-dependencies-1.0.0.BUILD-SNAPSHOT.pom, line 4, column 10 -> [Help 2]

It seems like it's still skipping the milestones repository, even with the following dependencyManagement and repositories configuration:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-parent</artifactId>
            <version>Brixton.BUILD-SNAPSHOT</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<repositories>
    <repository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>http://repo.spring.io/libs-snapshot-local</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>http://repo.spring.io/libs-milestone-local</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>spring-releases</id>
        <name>Spring Releases</name>
        <url>http://repo.spring.io/libs-release-local</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>http://repo.spring.io/libs-snapshot-local</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </pluginRepository>
    <pluginRepository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>http://repo.spring.io/libs-milestone-local</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants