Introduction
This article is also exactly has the same problem occur with the previous one. The problem exist upon the execution for compiling and building a Java-based application in a NetBeans IDE. The following is the execution where there are several lines of output appear in the output tab of the NetBeans IDE :
Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.3.0:copy (default) on project app: Execution default of goal org.apache.maven.plugins:maven-dependency-plugin:3.3.0:copy failed: Plugin org.apache.maven.plugins:maven-dependency-plugin:3.3.0 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven.reporting:maven-reporting-api:jar:3.1.0, org.apache.maven:maven-core:jar:3.1.0, org.apache.maven:maven-settings:jar:3.1.0, org.apache.maven:maven-settings-builder:jar:3.1.0, org.apache.maven.shared:maven-common-artifact-filters:jar:3.2.0: Could not transfer artifact org.apache.maven.reporting:maven-reporting-api:jar:3.1.0 from/to central-secure (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-api/3.1.0/maven-reporting-api-3.1.0.jar: Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.24.215] failed: Connection timed out: connect -> [Help 1]
It is exactly as in the article exist in this link. The article has the title of ‘How to Solve Error Message failed: Connection timed out: connect when building Java Program using maven in NetBeans’. Another article which has similar problem exist in an article in this link. That article has the title of ‘How to Solve Error Message Return code is: 501 , ReasonPhrase:HTTPS Required when building Java Program using maven in NetBeans’.
Solution
Apparently, it has an error message appear that the NetBeans IDE cannot connect to maven repository. There is actually two reasons for it. The following are those reasons :
-
First of all, the first reason is because it cannot connect to maven repository at all. Just check the connection to the maven repository where normally it will be reachable throughout the internet connection.
- The second one is the HTTPS connection’s configuration of the maven tool is not exist. Althought the internet connection is available, normally by the default installation of the maven tool, it cannot connect using HTTPS connection. The reason is because the maven configuration settings do not have the HTTPS connection configuration. In order to solve it, just add the HTTPS connection configuration in the maven tool. Read the article in this link in order to do it. It is an article with the title of ‘http://www.dark-hamster.com/software/how-to-solve-error-message-return-code-is-501-reasonphrasehttps-required-when-building-java-program-using-maven-in-netbeans/’.