1
votes

I've started to use JFrog Artifactory 4.14, my maven app needs an ojdbc jar which can be downloaded from oracle repository, which, if I use maven local settings, I'd setted from http://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9010

Now, using JFrog Artifactory, I've setted remote repo according to http://buttso.blogspot.lt/2015/02/fronting-oracle-maven-repository-with.html https://www.jfrog.com/blog/fronting-oracle-maven-repository-artifactory/

enter image description here

enter image description here

TEST button says connection successful

I've replaced settings.xml file with the one JFrog Artifactory generated to me

<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <servers>
    <server>
      <username>${security.getCurrentUsername()}</username>
      <password>${security.getEscapedEncryptedPassword()!"*** Insert encrypted password here ***"}</password>
      <id>central</id>
    </server>
    <server>
      <username>${security.getCurrentUsername()}</username>
      <password>${security.getEscapedEncryptedPassword()!"*** Insert encrypted password here ***"}</password>
      <id>snapshots</id>
    </server>
  </servers>
  <mirrors>
    <mirror>
      <mirrorOf>*</mirrorOf>
      <name>remote-repos</name>
      <url>http://docker.k***.l**: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://docker.k***.l**:8081/artifactory/libs-release</url>
        </repository>
        <repository>
          <snapshots />
          <id>snapshots</id>
          <name>libs-snapshot</name>
          <url>http://docker.k***.l**:8081/artifactory/libs-snapshot</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>plugins-release</name>
          <url>http://docker.k***.l**:8081/artifactory/plugins-release</url>
        </pluginRepository>
        <pluginRepository>
          <snapshots />
          <id>snapshots</id>
          <name>plugins-snapshot</name>
          <url>http://docker.k***.l**:8081/artifactory/plugins-snapshot</url>
        </pluginRepository>
      </pluginRepositories>
      <id>artifactory</id>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>artifactory</activeProfile>
  </activeProfiles>
</settings>

I've added to my POM

<distributionManagement>
    <repository>
        <id>central</id>
        <name>e44b4c0db643-releases</name>
        <url>http://docker.k***.l**:8081/artifactory/ext-release-local</url>
    </repository>
</distributionManagement>

but when I try to run maven command

clean install

I get

The following artifacts could not be resolved: com.oracle.jdbc:ojdbc7:jar:12.1.0.2, com.oracle.jdbc:ucp:jar:12.1.0.2: Could not find artifact com.oracle.jdbc:ojdbc7:jar:12.1.0.2 in remote-repos

2
You will never find thos artifacts in public repositories.khmarbaise
I don't understand Your comment??? These artifacts aren't in public repository, they are in oracles repsitoryArvis M

2 Answers

1
votes

You need to define a virtual repository in JFrog. This will be a combination of other repositoies, this is the one you will point at in your settings.xml.

See https://www.jfrog.com/confluence/display/RTF/Virtual+Repositories

I suspect you will also need a proxy element in your settings.xml.

See https://maven.apache.org/guides/mini/guide-proxies.html

0
votes

As You already have created You new Remote Repository You have to add it to Virtual Repository enter image description here

choose New (or edit existing one)

enter image description here

and select repositories

enter image description here

that should be it