2

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.

Maulzey
  • 4,100
  • 5
  • 22
  • 30

2 Answers2

2

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.

Community
  • 1
  • 1
millimoose
  • 39,073
  • 9
  • 82
  • 134
2

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:

<ivysettings>
    <settings defaultResolver="myrepo"/>
    <resolvers>
        <ibiblio name="myrepo" m2compatible="true" root="http://myhost/....."/>
    </resolvers>
</ivysettings>

Examples of such software would be:

  • Nexus
  • Artifactory
  • Apache Achiva

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.

Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185