2017-01-04 79 views
0

我已经开始使用JFrog Artifactory的4.14,我的Maven的应用程序需要ojdbc罐子可以从Oracle存储库,而如果我用maven本地设置,我会从 http://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9010JFrog Artifactory的和Oracle库

设置好的下载

现在,使用JFrog Artifactory的,我已经根据 http://buttso.blogspot.lt/2015/02/fronting-oracle-maven-repository-with.htmlhttps://www.jfrog.com/blog/fronting-oracle-maven-repository-artifactory/

enter image description here

enter image description here

设置好的远程回购

测试按钮,说连接成功

我已经更换了settings.xml文件与生成给我一个JFrog Artifactory的

<?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命令时

clean install

我得到

以下工件无法解析:com.oracle.jdbc:ojdbc7:罐子:12.1.0.2,com.oracle.jdbc:UCP中:jar:12.1.0.2:无法找到工件com.oracle.jdbc:ojdbc7:jar:12.1.0.2 in remote-repos

+0

你永远也找不到文物茨艾伦公共库。 – khmarbaise

+0

我不明白你的意见???这些工件不在公共存储库中,它们处于神谕故事中 –

回答

0

您需要在JFrog中定义一个虚拟存储库。这将是其他存储库的组合,这是您将在settings.xml中指向的那个存储库。

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

我怀疑你还需要一个代理元素在你的settings.xml。

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

+0

我想这是一个问题,我刚刚将Oracle存储库添加到虚拟存储库,现在似乎一切正常。我在settings.xml中没有任何东西,没有任何代理。 –

相关问题