New machine and eclipse installation, Maven and all java project

Asked

Viewed 63 times

-3

I installed the eclipse. Java Maven

I downloaded the project

when I go on the option Maven clean, gives the error:

[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.7.RELEASE/spring-boot-starter-parent-2.1.7.RELEASE.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project br.com.ghsistemas.principal:principal:0.0.1-SNAPSHOT (C:\Docker\workspace\principal\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.7.RELEASE from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.7.RELEASE/spring-boot-starter-parent-2.1.7.RELEASE.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. and 'parent.relativePath' points at no local POM @ line 19, column 10 -> [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

My file Settings.xml, is normal

What can it be ?

The network has no proxy.

1 answer

1

Your settings.xml is pointing to http repositories, this protocol is no longer accepted by the central Maven, only https for security reasons, probably was only working before because you had already downloaded. Change this line here:

          <repositories>
                <repository>
                    <id>central</id>
                    <url>http://repo.maven.apache.org/maven2</url>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                </repository>
            </repositories>

for

               <repositories>
                    <repository>
                        <id>central</id>
                        <url>https://repo.maven.apache.org/maven2</url>
                        <releases>
                            <enabled>false</enabled>
                        </releases>
                    </repository>
                </repositories>
  • Yes it has been adjusted, but for example, I have jar of the project itself and it tries to search from the address https://repo.maven.apache.org/maven2. https://repo.maven.apache.org/maven2/br/com/ghsistemas/utilitario. This project is not at this address and only local. So I understand it is wrong. We are creating a Jenkins repository.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.