You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jason van Zyl (JIRA)" <ji...@codehaus.org> on 2014/05/28 14:02:10 UTC
[jira] (MNG-5638) Whitespaces matter in configuration
can cause the incorrect repo to be selected
[ https://jira.codehaus.org/browse/MNG-5638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason van Zyl updated MNG-5638:
-------------------------------
Summary: Whitespaces matter in <mirrorOf> configuration can cause the incorrect repo to be selected (was: Whitespaces matter in <mirrorOf> configuration)
> Whitespaces matter in <mirrorOf> configuration can cause the incorrect repo to be selected
> ------------------------------------------------------------------------------------------
>
> Key: MNG-5638
> URL: https://jira.codehaus.org/browse/MNG-5638
> Project: Maven 2 & 3
> Issue Type: Bug
> Affects Versions: 3.2.1
> Reporter: Tobias Oberlies
>
> Steps to reproduce the problem:
> # Use the following settings.xml (replacing the URLs with valid URLs in your environment):
> {noformat}
> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
> <mirrors>
> <mirror>
> <id>mirror1</id>
> <url>http://nexus:8081/nexus/content/repositories/releases/</url>
> <mirrorOf>
> external:*, !snapshots.repo
> </mirrorOf>
> </mirror>
> </mirrors>
> <profiles>
> <profile>
> <id>use-snapshots-repo</id>
> <pluginRepositories>
> <pluginRepository>
> <id>snapshots.repo</id>
> <url>http://nexus:8081/nexus/content/repositories/snapshots/</url>
> </pluginRepository>
> </pluginRepositories>
> <repositories>
> <repository>
> <id>snapshots.repo</id>
> <url>http://nexus:8081/nexus/content/repositories/snapshots/</url>
> </repository>
> </repositories>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>use-snapshots-repo</activeProfile>
> </activeProfiles>
> </settings>
> {noformat}
> # Set up a project which uses an artifact from {{snapshots.repo}} which is not available in the local Maven repository
> # Build the project: The build fails because Maven only tries to download from the releases repository.
> Expected behaviour: Maven should have used the snapshots repo.
> The root cause of the problem is that whitespaces around the separators in the {{mirrorOf}} configuration are not trimmed. When changing the configuration to
> {noformat}
> <mirrorOf>
> external:*,!snapshots.repo
> </mirrorOf>
> {noformat}
> the snapshots repository is used and the build passes.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)