Thursday, May 21, 2020

Dev Tips#38 Java Maven project in Netbeans : or one of its dependencies ...

If you are getting this type of error message while creating a maven project in Netbeans follow my video tutorial and add the mirror show below in your netbeans settings.xml.


Error message: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom. Return code is: 501, ReasonPhrase: HTTPS Required. -> [Help 1]


Solution:


Here are the dependencies to be added in the settings.xml



   
<mirror>
      <id>mirror1</id>
      <mirrorOf>central</mirrorOf>
      <name>mirror1</name>
      <url>https://repo.maven.apache.org/maven2/</url>
</mirror>

 OR

<mirror>
   <id>google-maven-central</id>
   <name>Google Maven Central</name>
   <url>https://maven-central.storage.googleapis.com/maven2/</url>
   <mirrorOf>central</mirrorOf>
</mirror> 
   
  




2 comments: