Ingres Community Forums Login Register Ingres.com  

Ingres Community Blogs

A few points of interest from the work that Luminary Solutions do, usually relating to Ingres and Java.

We also do a lot of OpenROAD and .NET development, but I tend to stick to the Java side.
Rate this Entry

Ingres JDBC and Maven

Submit "Ingres JDBC and Maven" to Digg Submit "Ingres JDBC and Maven" to del.icio.us Submit "Ingres JDBC and Maven" to StumbleUpon Submit "Ingres JDBC and Maven" to Google
Posted 2009-07-09 at 02:45 AM by Alan.Raison
Tags ingres, java, jdbc, maven

Java developers may be familiar with [url=http://maven.apache.org]Maven[/url], the dependency management and project lifecycle mananagement tool. It's really good at managing a structured project and best of all it automatically downloads and adds to the Java classpath any declared dependencies.

These dependency JARs are stored in Maven repositories and by default Maven only looks in the so-called "Central" repository, at [url=http://repo1.maven.org/maven2]repo1.maven.org/maven2[/url].

For a while I have been trying to get the Ingres JDBC driver into this central repository and this morning I found out that our request has been successful! This makes it really easy for Java developers to integrate the Ingres JDBC driver into their Maven-controlled projects.

Each Maven project has a project object model, or POM file, pom.xml (See [url=http://maven.apache.org/pom.html]Maven - POM Reference[/url] for details). This has a <dependencies> section into which dependencies for the project can be declared.

In order to add the Ingres JDBC driver as a dependency, add the following inside the <dependencies> tag:
[code]<dependency>
<groupId>com.ingres.jdbc</groupId>
<artifactId>iijdbc</artifactId>
</dependency>[/code]

And that's it! That will include the latest JDBC driver in your project.

If you want to specify a particular version to use, you need the Database version and the JDBC driver version. The following are currently held in the central Maven repository:
[code]
Ingres Version | JDBC Driver Version | Maven Version
Ingres 2006 Rls 2 | 3.2.4 | 9.1-3.4.2
9.2 | 3.4.7 | 9.2-3.4.7
9.2 | 3.4.8 | 9.2-3.4.8[/code]

The default version is currently 9.2-3.4.8.

It would be great to hear about your experiences with this. Obviously you will need an Ingres database to connect to, so head over to [url]esd.ingres.com[/url] to download that too!

Thanks to Teresa, Grant, Phil and the Maven guys for making this happen!
Posted in Uncategorized
Views 13584 Comments 0 Edit Tags

« Prev     Main     Next »

Total Comments 0

Comments

 
© 2009 Ingres Corporation. All Rights Reserved