title: How to force Maven to ignore <repository> from dependcy pom.xml
body: <p>I had a pom in my dependencies which contains :</p>
  
  <pre><code>&lt;repositories&gt;
    &lt;repository&gt;
     &lt;id&gt;spring-releases&lt;/id&gt;
     &lt;url&gt;http://repo.spring.io/libs-release-remote/&lt;/url&gt;
  &lt;/repository&gt;
  &lt;repository&gt;
    &lt;id&gt;public-jboss&lt;/id&gt;
    &lt;url&gt;https://repository.jboss.org/nexus/content/groups/public-jboss&lt;/url&gt;
  &lt;/repository&gt;
  &lt;repository&gt;
    &lt;id&gt;spring-plugin-releases&lt;/id&gt;
    &lt;url&gt;http://repo.spring.io/plugins-release/&lt;/url&gt;
  &lt;/repository&gt;
  </code></pre>
  
  <p></p>
  
  <p>and a settings.xml in $M2_HOME which contains :</p>
  
  <pre><code>&lt;settings&gt;
    &lt;mirrors&gt;
      &lt;mirror&gt;
        &lt;id&gt;nexus&lt;/id&gt;
        &lt;mirrorOf&gt;*&lt;/mirrorOf&gt;
        &lt;url&gt;http://mynexus/repository/maven-public/&lt;/url&gt;
      &lt;/mirror&gt;
    &lt;/mirrors&gt;
    &lt;profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;ignore-repositories&lt;/id&gt;
          &lt;activation&gt;
              &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
          &lt;/activation&gt;
        &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
            &lt;id&gt;public-jboss&lt;/id&gt;
            &lt;url&gt;http://mynexus/repository/maven-public/&lt;/url&gt;
          &lt;/pluginRepository&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;spring-releases&lt;/id&gt;
            &lt;url&gt;http://mynexus/repository/maven-public/&lt;/url&gt;
          &lt;/pluginRepository&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;spring-plugin-releases&lt;/id&gt;
            &lt;url&gt;http://mynexus/repository/maven-public/&lt;/url&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;
    &lt;/profile&gt;
  &lt;/profiles&gt;
  &lt;/settings&gt;
  </code></pre>
  
  <p>I tried also with <code>repositories/repository</code>:</p>
  
  <pre><code>&lt;settings&gt;
    &lt;mirrors&gt;
      &lt;mirror&gt;
        &lt;id&gt;nexus&lt;/id&gt;
        &lt;mirrorOf&gt;*&lt;/mirrorOf&gt;
        &lt;url&gt;http://mynexus/repository/maven-public/&lt;/url&gt;
      &lt;/mirror&gt;
    &lt;/mirrors&gt;
    &lt;profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;ignore-repositories&lt;/id&gt;
          &lt;activation&gt;
              &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
          &lt;/activation&gt;
        &lt;repositories&gt;
          &lt;repository&gt;
            &lt;id&gt;public-jboss&lt;/id&gt;
            &lt;url&gt;http://mynexus/repository/maven-public/&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-releases&lt;/id&gt;
            &lt;url&gt;http://mynexus/repository/maven-public/&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-plugin-releases&lt;/id&gt;
            &lt;url&gt;http://mynexus/repository/maven-public/&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
    &lt;/profile&gt;
  &lt;/profiles&gt;
  &lt;/settings&gt;
  </code></pre>
  
  <p>But that never take mynexus when maven resolve this pom example :</p>
  
  <pre><code>[INFO] --- wildfly-swarm-plugin:2016.10.0:package (package) @ microservice-attendee ---
  Downloading: http://mynexus/repository/maven-public/org/wildfly/swarm/fraction-list/2016.10.0/fraction-list-2016.10.0.pom
  Downloaded: http://mynexus/repository/maven-public/org/wildfly/swarm/fraction-list/2016.10.0/fraction-list-2016.10.0.pom (2 KB at 16.4 KB/sec)
  Downloading: http://mynexus/repository/maven-public/org/wildfly/swarm/tools/2016.10.0/tools-2016.10.0.pom
  Downloaded: http://mynexus/repository/maven-public/org/wildfly/swarm/tools/2016.10.0/tools-2016.10.0.pom (2 KB at 215.5 KB/sec)
  Downloading: http://mynexus/repository/maven-public/com/eclipsesource/minimal-json/minimal-json/0.9.4/minimal-json-0.9.4.pom
  Downloaded: http://mynexus/repository/maven-public/com/eclipsesource/minimal-json/minimal-json/0.9.4/minimal-json-0.9.4.pom (5 KB at 53.2 KB/sec)
  Downloading: http://mynexus/repository/maven-public/org/wildfly/swarm/fraction-list/2016.10.0/fraction-list-2016.10.0.jar
  Downloading: http://mynexus/repository/maven-public/com/eclipsesource/minimal-json/minimal-json/0.9.4/minimal-json-0.9.4.jar
  Downloading: http://mynexus/repository/maven-public/org/wildfly/swarm/tools/2016.10.0/tools-2016.10.0.jar
  Downloaded: http://mynexus/repository/maven-public/org/wildfly/swarm/fraction-list/2016.10.0/fraction-list-2016.10.0.jar (171 KB at 12211.5 KB/sec)
  Downloaded: http://mynexus/repository/maven-public/com/eclipsesource/minimal-json/minimal-json/0.9.4/minimal-json-0.9.4.jar (30 KB at 1859.1 KB/sec)
  Downloaded: http://mynexus/repository/maven-public/org/wildfly/swarm/tools/2016.10.0/tools-2016.10.0.jar (65 KB at 4276.7 KB/sec)
  Downloading: http://repository.jboss.org/nexus/content/groups/public/org/glassfish/javax.json/1.0.3/javax.json-1.0.3.pom
  Downloading: http://mynexus/repository/maven-public/org/glassfish/javax.json/1.0.3/javax.json-1.0.3.pom
  Downloaded: http://mynexus/repository/maven-public/org/glassfish/javax.json/1.0.3/javax.json-1.0.3.pom (10 KB at 392.0 KB/sec)
  Downloading: http://repository.jboss.org/nexus/content/groups/public/org/glassfish/json/1.0.3/json-1.0.3.pom
  Downloading: http://mynexus/repository/maven-public/org/glassfish/json/1.0.3/json-1.0.3.pom
  ...
  </code></pre>
  
  <p>Any idea ?</p>
  
  <p>Thanks for your help.</p>
  
  <pre><code>mvn --version
  Apache Maven 3.3.9
  Maven home: /usr/share/maven
  Java version: 1.8.0_91, vendor: Oracle Corporation
  Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
  Default locale: fr_FR, platform encoding: UTF-8
  OS name: "linux", version: "4.4.0-45-generic", arch: "amd64", family: "unix"
  </code></pre>