Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6457

Resolving repository with an environment variable substitution fails when a parent pom needs to be looked up

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.3.3, 3.5.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      ubuntu 18.04, also with windows 10

      Description

      Having a repository entry with a environment variable substitution like
       

      <repositories>
      <repository>
      <id>company-java-libs</id>
      <url>https://packagecloud.io/priv/${env.PACKAGECLOUD_JAVA_LIBS_READ_TOKEN}/company/java-libs/maven2</url>
      <releases>
      <enabled>true</enabled>
      </releases>
      <snapshots>
      <enabled>true</enabled>
      </snapshots>
      </repository>
      </repositories>
      

      and a parent entry that is not present in your local repository

        <parent>
          <groupId>company</groupId>
          <artifactId>a-parent-module</artifactId>
          <version>1.0.0</version>
          <relativePath/> <!-- lookup parent from repository -->
        </parent>
      

      produces a parsing error when running maven commands:

      [ERROR] [ERROR] Some problems were encountered while processing the POMs:
      [ERROR]     Non-resolvable parent POM for __current_project_version__: Could not transfer artifact company:a-parent-module:pom:1.0.0 in company-java-libs  from/to company-java-libs (https://packagecloud.io/priv/${env.PACKAGECLOUD_JAVA_LIBS_READ_TOKEN}/company/java-libs/maven2): Illegal character in path at index 30: https://packagecloud.io/priv/${env.PACKAGECLOUD_JAVA_LIBS_READ_TOKEN}/company/java-libs/maven2/__path__
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              martin.knoller Martin Knoller Stocker
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: