我希望答案将成为如何连接Maven,Oracle和Artifactory的通用指南,并将成为网上最有用的网页。很可能这个问题会被标记下来,但我只是放弃了Maven,Artifactory和Oracle。
我正在运行Windows 7-64,并将maven作为Oracle jdev的一部分安装。公司在vpn网络上设置并运行Artifactory ....但有些事情是不对的。
遵循以下简单说明: http://biemond.blogspot.co.uk/2013/07/maven-support-in-weblogic-jdeveloper.html
在第一次指示时失败:
将oracle maven同步插件安装到本地存储库 命令:
mvn deploy:deploy-file -DpomFile = oracle-maven-sync.12.1.2.pom -Dfile = oracle-maven-sync.12.1.2.jar
错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file (default-cli) on project standalone-pom: The parameters 'url' for goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file are missing or invalid -> [Help 1]
添加
-Durl=file://C:\Users\{user}\.m2
似乎将该工件安装到我的本地.m2 repo
C:\Users\{user}\.m2\com\oracle\maven\oracle-maven-sync\12.1.2-0-0
但似乎只有,然后我在该教程上获得第3名:
给出错误:
[ERROR] Error resolving version for plugin 'com.oracle.maven:oracle-maven-sync' from the repositories [local (C:\Users\{user}\.m2), central (http://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [Help 1]
因此插件无法安装?
由于奇怪的oracle思想,Oracle Maven存储库受密码保护, Artifactory有外部中央和Oracle存储库为什么让它镜像所有停止maven甚至找不到部署模块?
这是我的settings.xml:
<?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>user</username>
<password>xxx</password>
<id>central</id>
</server>
<server>
<username>user</username>
<password>xxx</password>
<id>snapshots</id>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release-local</name>
<url>http://art.host.ru:8081/artifactory/libs-release-local</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot-local</name>
<url>http://art.host.ru:8081/artifactory/libs-snapshot-local</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release-local</name>
<url>http://art.host.ru:8081/artifactory/plugins-release-local</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>plugins-snapshot-local</name>
<url>http://art.host.ru:8081/artifactory/plugins-snapshot-local</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
<profile>
<id>oracle-maven</id>
<properties>
<oracle-maven-sync.oracleHome>C:\Oracle\Middleware\Oracle_Home</oracle-maven-sync.oracleHome>
<oracle-maven-sync.testOnly>false</oracle-maven-sync.testOnly>
<oracle-maven-sync.failOnError>false</oracle-maven-sync.failOnError>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>oracle-maven</activeProfile>
</activeProfiles>
</settings>
答案 0 :(得分:1)
好吧,我认为你只是按照错误的指南。所有这些手动部署一些随机maven插件都是错误的。 只需按照the Artifactory User Guide中的简单详细说明操作,即可。
答案 1 :(得分:1)
问题出在-Dmaven.repo.local
不提供参数。
答案 2 :(得分:0)
对大多数工件使用http://jcenter.bintray.com
对于Oracle: oracle-maven-sync 插件 oracle instructions
settings.xml添加以下代码
<profiles>
<profile>
<properties>
<oracle-maven-sync.oracleHome>$ORACLE_HOME</oracle-maven-sync.oracleHome>
<oracle-maven-sync.testOnly>false</oracle-maven-sync.testOnly>
<oracle-maven-sync.failOnError>false</oracle-maven-sync.failOnError>
<oracle-maven-sync.serverId>oracle-local-12.1.2</oracle-maven-sync.serverId></properties>
artifactory - &gt;用户名(右上角) - &gt;输入传递 - &gt;解锁 - &gt; забрать加密密码(复制)