Gareth H
Gareth H

Reputation: 103

Artifactory 3rd party jar

I've added a 3rd party jar into my artifactory (libs-release repos, and its the microsoft jdbc 4 connector).

The problem i have is that maven/apache servicemix fail to download the jar as they have the following setup, and it seems like they always attempt to download stuff from the remote-repos first.

<mirrors>
<mirror>
  <mirrorOf>*</mirrorOf>
  <name>remote-repos</name>
  <url>http://...:8081/artifactory/remote-repos</url>
  <id>remote-repos</id>
</mirror>
</mirrors>
<profiles>
<profile>
  <repositories>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>libs-release</name>
      <url>http://...:8081/artifactory/libs-release</url>
    </repository>
    <repository>
      <snapshots/>
      <id>snapshots</id>
      <name>libs-snapshot</name>
      <url>http://...:8081/artifactory/libs-snapshot</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>plugins-release</name>
      <url>http://...:8081/artifactory/plugins-release</url>
    </pluginRepository>
    <pluginRepository>
      <snapshots/>
      <id>snapshots</id>
      <name>plugins-snapshot</name>
      <url>http://...:8081/artifactory/plugins-snapshot</url>
    </pluginRepository>
  </pluginRepositories>
  <id>artifactory</id>
</profile>

Any ideas whats wrong/how i can fix this? A temp fix is to install the jar into my local repos, but i dont want to do that on other work pcs.

Cheers.

Upvotes: 0

Views: 1373

Answers (1)

JBaruch
JBaruch

Reputation: 22923

'remote-repos' repository in Artifactory is a virtual repository which aggregates, well, remote repositories :) Since you added your jar to your local repository, it can't be resolved from 'remote-repos'. Pointing your mirror-any to 'repo' should do the job.

Upvotes: 1

Related Questions