1

I'm working with a Java Maven - project in my parent pom, I have defined 3 repositories

<repositories>
    <repository>
        <id>company-central</id>
        <name>company</name>
        <url>https://artifactory.company.com/artifactory/company/</url>
    </repository>
    <repository>
        <id>releases</id>
        <name>nexus</name>
        <url>https://nexus-proxy.dev.company.io/nexus/content/repositories/releases/</url>
    </repository>
    <repository>
        <id>thirdparty</id>
        <name>nexus</name>
        <url>https://nexus-proxy.dev.company.io/nexus/content/repositories/thirdparty/</url>
    </repository>
</repositories>

but when i run maven its skipp the company-central repository and wont try to download from there

[INFO] Building core 0.0.1-SNAPSHOT                                      [7/49]
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from releases: https://nexus-proxy.dev.company.io/nexus/content/repositories/releases/org/....
Downloading from thirdparty: https://nexus-proxy.dev.company.io/nexus/content/repositories/thirdparty/org/....
Downloading from releases: https://nexus-proxy.dev.company.io/nexus/content/repositories/releases/com/....
Downloading from thirdparty: https://nexus-proxy.dev.company.io/nexus/content/repositories/thirdparty/com/....

And finally it fails on "missing jars" which exists on company-central

[ERROR] Failed to execute goal on project core: Could not resolve dependencies for project com.company:core:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at org.apache.commons......

My setting.xml

<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
                      https://maven.apache.org/xsd/settings-1.0.0.xsd">
  <servers>
    <server>
      <id>company-central</id>
      <username>1234</username>
      <password>1234</password>
    </server>

  <server>
    <id>nexus</id>
    <username>/1234</username>
    <password>1234</password>
  </server>

  <server>
    <id>central</id>
    <username>/1234</username>
    <password>1234</password>
  </server>

  <server>
    <id>core</id>
    <username>/1234</username>
    <password>1234</password>
  </server>

  </servers>

the profile part in my setting XML

  <profiles>
      <profile>
        <id>AAAAA</id>
        <repositories>
          <repository>
            <id>central</id>
            <url>https://example.com/nexus/content/groups/public</url>
          </repository>
        </repositories>
        <pluginRepositories>
          <pluginRepository>
            <id>central</id>
            <url>https://example.com/nexus/content/groups/public</url>
          </pluginRepository>
        </pluginRepositories>
      </profile>
    </profiles>
    <activeProfiles>
      <activeProfile>AAAAA</activeProfile>
    </activeProfiles>

</settings>
Hard Worker
  • 995
  • 11
  • 33

0 Answers0