1

I have a virtual machine and I'm using spring tool suite and JDK7.

I have downloaded my project from git but I'm getting error in pom.xml:

Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: 
Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: 
Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (http://repo.maven.apache.org/maven2): 
Failed to transfer http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom. Error code 501, HTTPS Required 

Mi pom.xml

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>${java.version}</source>
                <target>${java.version}</target>
                <compilerArgument>-Xlint:all</compilerArgument>
                <showWarnings>true</showWarnings>
                <showDeprecation>true</showDeprecation>
            </configuration>
        </plugin>

Itested. delete .m2, maven clean, ...

What need I change?

sirdaiz
  • 250
  • 3
  • 16

1 Answers1

2

I believe the error is as it says: it does not support unencrypted requests. So we should change your URL to HTTPS.

https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom

and if you cannot use HTTPS for some reason, then use:

http://insecure.repo1.maven.org/maven2/

for Maven repos.

Just did a quick search, and found some references if you would like more information:

Maven dependencies are failing with a 501 error

Since you are having a bit of a problem reading through that, you need to update your pom.xml file I believe and update your maven URL. It should look something like this, or use similar logic for updating with the specific URL above (hard to post an example of that without your POM file portion of it).

<repositories>
  <repository>
    <id>central</id>
    <name>Central Repository</name>
    <url>https://repo.maven.apache.org/maven2</url>
    <layout>default</layout>
    <snapshots>
      <enabled>false</enabled>
    </snapshots>
  </repository>
</repositories>
omoshiroiii
  • 643
  • 5
  • 11