我已经开始使用JFrog Artifactory 4.14,我的maven app需要一个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.html https://www.jfrog.com/blog/fronting-oracle-maven-repository-artifactory/
TEST按钮表示连接成功
我已经用生成的JFrog Artifactory替换了settings.xml文件
/opt/android-sdk
我已添加到我的POM
<?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>
但是当我尝试运行maven命令时
清理安装
我得到了
无法解析以下工件:com.oracle.jdbc:ojdbc7:jar: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 :(得分:1)
您需要在JFrog中定义虚拟存储库。这将是其他存储库的组合,这是您将在settings.xml中指出的那个。
请参阅https://www.jfrog.com/confluence/display/RTF/Virtual+Repositories
我怀疑你的settings.xml中还需要一个代理元素。
答案 1 :(得分:0)