解决 IVY ANT 的 Oracle JDBC 依赖性
我正在尝试从 Maven 存储库转移到 IVY 存储库。
我设置存储库的风格是:
<filesystem name="local" checkmodified="true">
<ivy pattern="${ivy.local.default.root}/${ivy.local.default.ivy.pattern}" />
<artifact pattern="${ivy.local.default.root}/${ivy.local.default.artifact.pattern}"/>
</filesystem>
我在本地存储库中获取 oracle jar 时遇到问题:
我的 maven 脚本如下:
<dependency>
<groupId>oracle.jdbc</groupId>
<artifactId>ojdbc11g</artifactId>
<version>${oracle-jdbc-version}</version>
</dependency>
我将尝试在 ivy.xml 中显示为:
<ivy:install settingsRef="basic.settings" organisation="oracle.jdbc" module="ojdbc11g" revision="[1.0,)" overwrite="TRUE" from="${from.resolver}" to="${to.resolver}" />
不幸的是, 我收到此错误:
[ivy:install]
[ivy:install] :: problems summary ::
[ivy:install] :::: WARNINGS
[ivy:install] module not found: oracle.jdbc#ojdbc11g;[1.0,)
[ivy:install] ==== libraries: tried
[ivy:install] http://repo1.maven.org/maven2/oracle/jdbc/ojdbc11g/[revision]/ojdbc11g-[revision].pom
[ivy:install] -- artifact o`enter code here`racle.jdbc#ojdbc11g;[1.0,)!ojdbc11g.jar:
[ivy:install] http://repo1.maven.org/maven2/oracle/jdbc/ojdbc11g/[revision]/ojdbc11g-[revision].jar
[ivy:install] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install] :: UNRESOLVED DEPENDENCIES ::
[ivy:install] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install] :: oracle.jdbc#ojdbc11g;[1.0,): not found
[ivy:install] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install]
[ivy:install] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
构建失败 /root/tools/apache-ivy-2.2.0/src/example/build-a-ivy-repository/build.xml:199:安装模块时发生问题 - 有关详细信息,请参阅输出
我该如何解决此问题?
提前致谢。
I'm trying to shift from Maven repository to IVY repository.
My style for setting up repository is as:
<filesystem name="local" checkmodified="true">
<ivy pattern="${ivy.local.default.root}/${ivy.local.default.ivy.pattern}" />
<artifact pattern="${ivy.local.default.root}/${ivy.local.default.artifact.pattern}"/>
</filesystem>
I'm having trouble getting oracle jar in my local repository:
My maven script is as follows:
<dependency>
<groupId>oracle.jdbc</groupId>
<artifactId>ojdbc11g</artifactId>
<version>${oracle-jdbc-version}</version>
</dependency>
I'll trying to show in ivy.xml as:
<ivy:install settingsRef="basic.settings" organisation="oracle.jdbc" module="ojdbc11g" revision="[1.0,)" overwrite="TRUE" from="${from.resolver}" to="${to.resolver}" />
Unfortunately,
I'm getting this error:
[ivy:install]
[ivy:install] :: problems summary ::
[ivy:install] :::: WARNINGS
[ivy:install] module not found: oracle.jdbc#ojdbc11g;[1.0,)
[ivy:install] ==== libraries: tried
[ivy:install] http://repo1.maven.org/maven2/oracle/jdbc/ojdbc11g/[revision]/ojdbc11g-[revision].pom
[ivy:install] -- artifact o`enter code here`racle.jdbc#ojdbc11g;[1.0,)!ojdbc11g.jar:
[ivy:install] http://repo1.maven.org/maven2/oracle/jdbc/ojdbc11g/[revision]/ojdbc11g-[revision].jar
[ivy:install] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install] :: UNRESOLVED DEPENDENCIES ::
[ivy:install] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install] :: oracle.jdbc#ojdbc11g;[1.0,): not found
[ivy:install] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install]
[ivy:install] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
BUILD FAILED
/root/tools/apache-ivy-2.2.0/src/example/build-a-ivy-repository/build.xml:199: Problem happened while installing modules - see output for details
How can i resolved this ?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Oracle JDBC 驱动程序在公共 Maven 存储库中不可用。您必须从 Oracle 下载它们,并以其他方式将它们包含在您的项目中 – 可能使用相当于用户或公司存储库的 Ivy。这个SO问题可能会有所帮助。
The Oracle JDBC drivers aren't available in the public Maven repositories. You have to download them from Oracle and include them in your project in some other way – perhaps using whatever the Ivy equivalent to a user or company repository is. This SO question might help.
我建议运行 Maven 存储库管理器,而不是尝试创建自己的 ivy 存储库。
Ivy 与 Maven 存储库完全兼容。只需声明一个 ibiblio 解析器,如下所示
:软件将是:
Maven 存储库管理器可以充当第三方软件存储库(例如 Maven Central)的智能缓存。他们还将提供用于上传具有限制性许可证的 jar 的工具,例如 Oracle JDBC 驱动程序。
Instead of trying to create your own ivy repository, I'd suggest running a Maven repository manager.
Ivy is fully compatible with Maven repositories. Just declare a ibiblio resolver as follows:
Examples of such software would be:
A Maven repository manager can act as an intelligent cache for 3rd party repositories of software such as Maven Central. They will also provide tooling for uploading jars with restrictive licenses such as the Oracle JDBC drivers.