Details
Description
Maven silently ignores mirror configuration when there is a space in mirrorOf. This could be a major problem if the developer's mirror configuration is critical and this causes her to not notice that the mirror is disabled.
Without space inside mirrorOf, the mirror setting is respected.
<settings>
<mirrors>
<mirror>
<id>loopback</id>
<name>loopback</name>
<url>http://127.0.0.1</url>
<mirrorOf>!my-repo,*</mirrorOf>
</mirror>
</mirrors>
</settings>
[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building mirrorOf-test 1 [INFO] ------------------------------------------------------------------------ Downloading from loopback: http://127.0.0.1/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
With a space after the comma in mirrorOf, the mirror is ignored without warning.
<settings>
<mirrors>
<mirror>
<id>loopback</id>
<name>loopback</name>
<url>http://127.0.0.1</url>
<mirrorOf>!my-repo, *</mirrorOf>
</mirror>
</mirrors>
</settings>
[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building mirrorOf-test 1 [INFO] ------------------------------------------------------------------------ Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom ...
The problem is reproducible with minimal pom.xm
<project> <modelVersion>4.0.0</modelVersion> <groupId>com.example</groupId> <artifactId>mirrorOf-test</artifactId> <version>1</version> </project>
Attachments
Attachments
Issue Links
- links to