title: maven-surefire-plugin:2.18.1:test failed
body: <p>I'm studying &quot;Cloud-Native Applications in Java&quot; and I'm doing the exercise in this book. This is my pom.xml:</p>
  <pre><code>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;1.4.3.RELEASE&lt;/version&gt;
    &lt;/parent&gt;
    &lt;groupId&gt;com.mycompany.petstore&lt;/groupId&gt;
    &lt;artifactId&gt;product&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    
    &lt;dependencies&gt;                    
      &lt;dependency&gt;                                    
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;                                 
       &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;           
          &lt;/dependency&gt;
    &lt;/dependencies&gt;   
    &lt;build&gt;
  
      &lt;plugins&gt;
  
          &lt;plugin&gt;                                                    
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;                                                 
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;   
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  <p>I set up the settings of Maven on a specific path: C:\Users\Sam.m2\settings.xml</p>
  <p>The only information that I set up on my settings.xml is the following:</p>
  <pre><code>...
    &lt;proxies&gt;             
      &lt;proxy&gt;                     
          &lt;id&gt;myproxy&lt;/id&gt;                        
          &lt;active&gt;true&lt;/active&gt;                           
          &lt;protocol&gt;http&lt;/protocol&gt;                           
          &lt;host&gt;localhost:8080&lt;/host&gt; 
          &lt;nonProxyHosts&gt;localhost,127.0.0.1&lt;/nonProxyHosts&gt;      
          &lt;port&gt;8080&lt;/port&gt;                                                                           
      &lt;/proxy&gt;    
    &lt;/proxies&gt;
  </code></pre>
  <p>When I try to run this program (a simple program with three java classes), in my console there is:</p>
  <pre><code> --- maven-surefire-plugin:2.18.1:test (default-test) @ product ---
  [INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.18.1/maven-surefire-common-2.18.1.pom
  [INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-api/2.18.1/surefire-api-2.18.1.pom
  [INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-toolchain/2.2.1/maven-toolchain-2.2.1.pom
  [INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/maven-plugin-annotations/3.3/maven-plugin-annotations-3.3.pom
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 1.873 s
  [INFO] Finished at: 2019-07-21T15:32:13+02:00
  [INFO] Final Memory: 18M/224M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project product: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.18.1 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:2.18.1 -&gt; org.apache.maven.surefire:maven-surefire-common:jar:2.18.1: Failed to read artifact descriptor for org.apache.maven.surefire:maven-surefire-common:jar:2.18.1: Could not transfer artifact org.apache.maven.surefire:maven-surefire-common:pom:2.18.1 from/to central (https://repo.maven.apache.org/maven2): localhost:8080 -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
  </code></pre>
  <p>How can I solve the problem?</p>