views:

20

answers:

1

I have added my Oracle JDBC driver to my Maven repository and everything is working fine however I am still receiving warnings whenever I package my project. E.g.

[INFO] Unable to find resource 'com.oracle:ojdbc14:pom:10.2.0' in repository central (http://repo1.maven.org/maven2)

How can I stop those warnings from showing up?

+2  A: 

Maven is trying to get the .pom file of your Oracle driver because it can't find it in your local repository. A simple ojdbc14-10.2.0.pom with the following content would suffice:

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.oracle</groupId>
  <artifactId>ojdbc14</artifactId>
  <version>10.2.0</version>
</project>

You could create it manually or get it generated by Maven when invoking install:install-file (to install it in your local repository) or deploy:deploy-file (to install it in a remote repository) using the generatePom optional parameter:

mvn install:install-file -Dfile=/path/to/ojdbc14.jar \
                         -DgroupId=com.oracle \
                         -DartifactId=ojdbc14 \
                         -Dversion=10.2.0 \
                         -Dpackaging=jar \
                         -DgeneratePom=true 

The deploy:deploy-file goal admits the same generatePom optional parameter.

PS: My recommendation would be to use the Oracle Database 11g Release 2 (11.2.0.1.0) drivers.

Pascal Thivent
Thank you very much Pascal. That helped immensely.
Luke
@Luke: You're welcome.
Pascal Thivent