title: AWS CodeBuild fails by Maven relativPath points to wrong Repo for Spring Parent
body: <p>Hi I have obviously an Maven setup problem and not enough information for a solution.</p>
  
  <p>I run an AWS CodeBuild which build my Springboot app and it worked for some month.</p>
  
  <p>No one week later with an deployment I got this error and confused about it.</p>
  
  <pre><code>Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.5.9.RELEASE/spring-boot-starter-parent-1.5.9.RELEASE.pom
  [ERROR] [ERROR] Some problems were encountered while processing the POMs:
  [FATAL] Non-resolvable parent POM for de.project:communication:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to project-mvn-repo (s3://project-mvn-repo/release): Cannot access s3://project-mvn-repo/release with type default using the available connector factories: BasicRepositoryConnectorFactory and 'parent.relativePath' points at no local POM @ line 18, column 10
  @ 
  [ERROR] The build could not read 1 project -&gt; [Help 1]
  [ERROR] 
  [ERROR] The project de.project:communication:0.0.1-SNAPSHOT (/codebuild/output/src807440776/src/pom.xml) has 1 error
  [ERROR] Non-resolvable parent POM for de.project:communication:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to project-mvn-repo (s3://project-mvn-repo/release): Cannot access s3://project-mvn-repo/release with type default using the available connector factories: BasicRepositoryConnectorFactory and 'parent.relativePath' points at no local POM @ line 18, column 10: Cannot access s3://project-mvn-repo/release using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
  [ERROR] role: org.apache.maven.wagon.Wagon
  [ERROR] roleHint: s3
  [ERROR] -&gt; [Help 2]
  [ERROR] 
  </code></pre>
  
  <p>I dont know what happend meanwhile. All what changed from my side was a Text in the project.</p>
  
  <p>The Build Server have Inet access and can curl the Maven-Nexus. All rights, S3, CodeBuild and server settings stay unchanged.</p>
  
  <p>Have anyone an idea how to approach the issue? Since the error message isn´t very obvious for me?</p>
  
  <p>Maybe an certain POM setting whats needed?
  Any hint is appreciate!</p>
  
  <p>Thanks in advance!
  Gregor</p>
  
  <p>ADDITION:</p>
  
  <p>the use buildspec.yaml:</p>
  
  <p>The error happens on:
  - mvn -s m2/settings.xml clean install</p>
  
  <pre><code>...
  phases:
    install:
      commands:
        - echo install phase for ${project}-${image} at `date`
        - apt-get update -y
        - apt-get install -y software-properties-common
        - add-apt-repository ppa:openjdk-r/ppa
        - apt-get update -y
        - apt-get install -y openjdk-8-jdk
        - wget http://www-eu.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz
        - tar xzvf apache-maven-3.5.2-bin.tar.gz -C /opt/
        - export PATH=/opt/apache-maven-3.5.2/bin:$PATH
    pre_build:
      commands:
        - echo pre-build phase for ${project}-${image} at `date`
        - echo Maven version 
        - mvn -version
    build:
      commands:
        - echo build phase for ${project}-${image} at `date`
        - curl https://repo.maven.apache.org
        - mvn -s m2/settings.xml clean install
    post_build:
      commands:
      ...
  </code></pre>
  
  <p>POM.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;de.project&lt;/groupId&gt;
      &lt;artifactId&gt;communication&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;communication&lt;/name&gt;
      &lt;description&gt;Communication Utils for projecth&lt;/description&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.5.9.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;spring-cloud.version&gt;Edgware.RELEASE&lt;/spring-cloud.version&gt;
      &lt;/properties&gt;
  
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;project-mvn-repo&lt;/id&gt;
              &lt;name&gt;S3 MVN project Release Repository&lt;/name&gt;
              &lt;url&gt;s3://project-mvn-repo/release&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt; 
  
      &lt;dependencies&gt;
      ...
      &lt;/dependencies&gt;
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-cloud-dependencies&lt;/artifactId&gt;
                  &lt;version&gt;${spring-cloud.version}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&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;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-release-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.5.3&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
  
          &lt;!-- For pushing &amp; getting mvn repo from S3 --&gt;
          &lt;extensions&gt;
              &lt;extension&gt;
                  &lt;groupId&gt;org.zalando.org.springframework.build&lt;/groupId&gt;
                  &lt;artifactId&gt;aws-maven&lt;/artifactId&gt;
                  &lt;version&gt;5.0.0.RELEASE-zal-2&lt;/version&gt;
              &lt;/extension&gt;
          &lt;/extensions&gt;
      &lt;/build&gt;  
  &lt;/project&gt;
  </code></pre>
  
  <p>Then there is still a "settings.xml" with the S3 credentials.</p>
  
  <p>UPDATE:</p>
  
  <p>After switching to public repo access via https I have a similar issue. So its not directly S3 related.</p>
  
  <p>error:</p>
  
  <pre><code>[INFO] Scanning for projects...
  Downloading from project-mvn-repo: https://s3.eu-central-1.amazonaws.com/project-mvn-repo/release/org/springframework/boot/spring-boot-starter-parent/1.5.9.RELEASE/spring-boot-starter-parent-1.5.9.RELEASE.pom
  Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.5.9.RELEASE/spring-boot-starter-parent-1.5.9.RELEASE.pom
  [ERROR] [ERROR] Some problems were encountered while processing the POMs:
  [FATAL] Non-resolvable parent POM for de.project:communication:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to project-mvn-repo (https://s3.eu-central-1.amazonaws.com/project-mvn-repo/release): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty and 'parent.relativePath' points at no local POM @ line 18, column 10
  </code></pre>