0

I'm getting this error when i run my java project I tried to reinstall netBeans IDE 8.2 and also tried to download a new Maven plugins but nothing happened Plugin org.codehaus.mojo:exec-maven-plugin:1.2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:exec-maven-plugin:jar:1.2.1: Could not transfer artifact org.codehaus.mojo:exec-maven-plugin:pom:1.2.1 from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/1.2.1/exec-maven-plugin-1.2.1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. -> [Help 1] POM:

`

<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>CompactDisk</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>15</maven.compiler.source>
    <maven.compiler.target>15</maven.compiler.target>
</properties>
`
Abdull
  • 1

1 Answers1

0

Maven central switched from HTTP to HTTPs.

In order to use HTTPs, you could either update your maven installation or explicitely add the repository with HTTPs:

<repositories>
    <repository>
        <id>central</id>
        <url>https://repo.maven.apache.org/maven2</url>
    </repository>
</repositories>

If you add this to your pom.xml, it should use maven central over HTTPS as you explicitely specified the repository URL for this project.

dan1st
  • 12,568
  • 8
  • 34
  • 67