Today i got the question if it was possible to configure a repository directly in the pom file without specifying the repository in our internal nexus server. This is possible as described in the Maven mirror quide.
configuration
We configured a nexus server to control the used dependencies and ensure that all developers are using the correct versions. Therefore we configured the following in our settings.xml
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://nexus:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
All repostiory request that mach ‘*’ will be redirected to the nexus server.
We wanted to avoid this rule to test some packages before configure this in our nexus server. To exclude a repositories you specify multiple fliters by using a comma as the delimiter.
in our case we adjusted the setting.xml to match the following configuration.
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*,!http://labs.consol.de/maven/*</mirrorOf>
<url>http://nexus:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
here some extra examples:
- * = everything
- external:* = everything not on the localhost and not file based.
- repo,repo1 = repo or repo1
- *,!repo1 = everything except repo1
Popularity: 3% [?]
Theo van Arem is a Integration specialist working at 

