jfrog工件库和oracle存储库

ac1kyiln  于 2021-07-09  发布在  Java
关注(0)|答案(2)|浏览(371)

我已经开始使用jfrog artifactory 4.14,我的maven应用程序需要一个ojdbc jar,可以从oracle存储库下载,如果我使用maven本地设置,我会从http://docs.oracle.com/middleware/1213/core/maven/config_maven_repo.htm#maven9010
现在,使用jfrog artifactory,我根据http://buttso.blogspot.lt/2015/02/fronting-oracle-maven-repository-with.htmlhttps://www.jfrog.com/blog/fronting-oracle-maven-repository-artifactory/


测试按钮显示连接成功
我已经将settings.xml文件替换为生成给我的一个jfrog工件

<?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>

我已经加入了我的pom

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

但是当我尝试运行maven命令时
清洁安装
我明白了
无法解析以下项目:com.oracle。jdbc:ojdbc7:jar:12.1.0.2,com.oracle。jdbc:ucp:jar:12.1.0.2:找不到artifact com.oracle。jdbc:ojdbc7:jar:12.1.0.2 in 远程回购

hmmo2u0o

hmmo2u0o1#

由于您已经创建了新的远程存储库,因此必须将其添加到虚拟存储库中

选择新建(或编辑现有)

并选择存储库

应该是这样的

wqnecbli

wqnecbli2#

您需要在jfrog中定义一个虚拟存储库。这将是其他存储库的组合,这是您将在settings.xml中指向的存储库。
看到了吗https://www.jfrog.com/confluence/display/rtf/virtual+repositories
我怀疑在settings.xml中还需要代理元素。
看到了吗https://maven.apache.org/guides/mini/guide-proxies.html

相关问题