1

Below is my error when I execute maven build

[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1.975 s
    [INFO] Finished at: 2017-04-19T15:45:25+05:30
    [INFO] Final Memory: 8M/155M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4: Could not transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:2.4 from/to central (https://repo.maven.apache.org/maven2): Unexpected response code for CONNECT: 405 -> [Help 1]
    Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:2.4 from/to central (https://repo.maven.apache.org/maven2): Failed to transfer fil
    : https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom. Return code is: 405 , ReasonPhrase:Method Not Allowed.
Ray
  • 3,864
  • 7
  • 24
  • 36
nanda kumar
  • 31
  • 1
  • 3

2 Answers2

1

Similar questions have already been asked. It's a proxy/network issue.

Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved

Maven: Failed to retrieve plugin descriptor error

Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved

Please try Googling first, or making your question more specific, like mentioning what all steps you took already to solve the problem.

Community
  • 1
  • 1
Ray
  • 3,864
  • 7
  • 24
  • 36
  • I tried adding up the proxies in settings.xml file, but still the error is thrown as I don't have a LAN proxy settings. Can you suggest me further steps to resolve this. – nanda kumar Apr 19 '17 at 10:35
  • 1
    You will need to find the proxy details and enter them correctly in settings.xml. There isn't any alternative, as far as I'm aware. – Ray Apr 19 '17 at 10:37
1

Please add correct proxy information.

<proxies>
  <proxy>
    <id>proxy</id>
    <active>true</active>
    <protocol>http</protocol>
    <host>proxy.example.com</host>
    <port>8080</port>
  </proxy>
</proxies>

or apply it to your LAN settings. Whatever your requirment. It is Proxy issue.