You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "James Nord (Jira)" <ji...@apache.org> on 2023/03/10 15:39:00 UTC

[jira] [Created] (MNG-7733) maven4 user settings mirrorOf-external:* does not override global settings external:http:*

James Nord created MNG-7733:
-------------------------------

             Summary: maven4 user settings mirrorOf-external:* does not override global settings external:http:* 
                 Key: MNG-7733
                 URL: https://issues.apache.org/jira/browse/MNG-7733
             Project: Maven
          Issue Type: Bug
          Components: Core
    Affects Versions: 4.0.0-alpha-4
            Reporter: James Nord


I have a settings file in my home directory (~/.m2/settings.xml) that works fine with maven 3.x

containing

{code}
  <mirrors>
    <mirror>
      <id>cloudbees-internal</id>
      <mirrorOf>external:*</mirrorOf>
      <url>https://nexus-cache.mycorp.com/content/groups/staged</url>
    </mirror>
  </mirrors>
{code}

with maven 4.0.0-alpha4 when building a project it will fail in dependency resolution due to the `maven-default-http-blocker` mirror.


{noformat}
unable to create flattened dependencies: caught exception when flattening dependencies: Failed to read artifact descriptor for javax.servlet:javax.servlet-api::3.1.0: Could not transfer artifact net.java:jvnet-parent:pom:3 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [glassfish-repository (http://download.java.net/maven/glassfish, default, releases+snapshots)] -
{noformat}


However I expect that my user settings should override global settings.

as `external:*` used in my local settings should also match anything that is matched by `external:http:*` in the global settings I would not expect that the global settings mirror would be used.

However this is infact the case.

if I use --global-settings to specify my local settings file then the builds work



--
This message was sent by Atlassian Jira
(v8.20.10#820010)