GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [MNG-6457] Resolving repository with an environment variable substitution fails when a parent pom needs to be looked up · Issue #7398 · apache/maven

[MNG-6457] Resolving repository with an environment variable substitution fails when a parent pom needs to be looked up #7398

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
[MNG-6457] Resolving repository with an environment variable substitution fails when a parent pom needs to be looked up#7398
Copy link
Labels
bugSomething isn't workingpriority:majorMajor loss of function

Description

@jira-importer
jira-importer
opened on Aug 14, 2018
Issue body actions

Martin Knoller Stocker opened MNG-6457 and commented

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__

Affects: 3.3.3, 3.5.2

Issue Links:

  • MNG-6870 A maven project can't fetch its parent when its repository is configured with an interpolated variable
    ("is duplicated by")
  • MNG-7047 Validate that repo configuration does not contain any expression
    ("is superceded by")
  • MNG-7046 Revert MNG-5639 and make repo config static only (no ${param} interpolation)
    ("is superceded by")

Activity

  1. jira-importer commented on Aug 16, 2018

    @jira-importer
    jira-importer
    on Aug 16, 2018
    Author
    More actions

    Michael Osipov commented

    While this seems like a valid issue to me, why not store it in the settings.xml?

  2. jira-importer commented on Aug 22, 2018

    @jira-importer
    jira-importer
    on Aug 22, 2018
    Author
    More actions

    Martin Knoller Stocker commented

    Michael Osipov That is what we did in the meantime. So we got a workaround, but as you pointed out: IMHO this is a valid issue, since environment substitution otherwise works as expected.

  3. jira-importer commented on Aug 22, 2018

    @jira-importer
    jira-importer
    on Aug 22, 2018
    Author
    More actions

    Robert Scholte commented

    I'm not convinced this is a valid case. If such a pom is consumed by a project and that system doesn't have this environment variable, it cannot find that parent.
    It will also overcomplicate the resolution, see https://maven.apache.org/ref/3.5.4/maven-model-builder/ . Here you see that parent resolution is done before model interpolation. If we would allow this, we need to do early interpolation of environment variables and probably only for a few segments in the pom.

  4. jira-importer commented on Dec 8, 2020

    @jira-importer
    jira-importer
    on Dec 8, 2020
    Author
    More actions

    Michael Osipov commented

    Please see MNG-7046.

  5. jira-importer commented on Dec 24, 2020

    @jira-importer
    jira-importer
    on Dec 24, 2020
    Author
    More actions

    Michael Osipov commented

    This will be closed as soon as MNG-7047 is implemented.

  6. jira-importer commented on Dec 29, 2022

    @jira-importer
    jira-importer
    on Dec 29, 2022
    Author
    More actions

    Michael Osipov commented

    MNG-7046 has been implemented and this won't be addressed on purpose.

  7. jira-importer
    closed this as completedon Dec 29, 2022
  8. jira-importer
    added
    bugSomething isn't working
    priority:majorMajor loss of function
    on Jul 6, 2025
  9. jira-importer
    closed this as not plannedon Jul 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:majorMajor loss of function

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.