0
votes

I've tried to run my maven based spring proyect locally with no pom modifications but it doesn't work, I got the following error (replace ${IP} with http://172.24.14.196:8888 because of my rank can't post more than 2 links):

[INFO] Scanning for projects... Downloading: ${IP}/archiva/repository/internal/org/springframework/boot/spring-boot-starter-parent/2.0.0.BUILD-SNAPSHOT/maven-metadata.xml [WARNING] Could not transfer metadata org.springframework.boot:spring-boot-starter-parent:2.0.0.BUILD-SNAPSHOT/maven-metadata.xml from/to archiva.central (${IP}172.24.14.196:8888/archiva/repository/internal/): Connect to 172.24.14.196:8888 [/172.24.14.196] failed: Connection timed out: connect Downloading: ${IP}/archiva/repository/internal/org/springframework/boot/spring-boot-starter-parent/2.0.0.BUILD-SNAPSHOT/spring-boot-starter-parent-2.0.0.BUILD-SNAPSHOT.pom [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project co.com.spicy:Shapers:0.0.1-SNAPSHOT (E:\shapers\pom.xml) has 1 error [ERROR] Non-resolvable parent POM: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.BUILD-SNAPSHOT from/to archiva.central (${IP}/archiva/repository/internal/): Connect to 172.24.14.196:8888 [/172.24.14.196] failed: Connection timed out: connect and 'parent.relativePath' points at no local POM @ line 14, column 13 -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

It looks like the spring-boot-starter its is getting no connection from the archiva central and cannot load resources, how can I manually load this resources or what is my problem?

I'm using the same configuration given here:

https://projects.spring.io/spring-boot/

1
share your settings.xml please. Answer lies inside it ;)Pratik Ambani

1 Answers

0
votes

If spring-boot dependencies are missing in archiva you can download them from spring repositories.

Add this to pom.xml

<repositories>

    <repository>
        <id>spring-repo</id>
        <name>Spring Repository</name>
        <url>https://repo.spring.io/release</url>
    </repository>

    <repository>
        <id>spring-milestone</id>
        <name>Spring Milestones</name>
        <url>http://repo.spring.io/libs-milestone</url>
    </repository>

    <repository>
        <id>spring-snapshot</id>
        <name>Spring Snapshot Repository</name>
        <url>https://repo.spring.io/snapshot</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
   </repository>

</repositories>