Introduction

Apache Maven is a popular project management tool that manages all dependencies for a project, as well as helping with building, packaging, and version control. Typically Maven is used to maintain a list of all third-party jar files that a Java project is dependent on.

Configuration

The central part of a Maven managed project is the configuration file, pom.xml, and the way to include Mimer JDBC driver as a dependency is by just adding it to the dependency block:

<dependencies>
    ...
    <dependency>
        <groupId>com.mimer.jdbc</groupId>
        <artifactId>mimjdbc</artifactId>
        <version>3.42</version>
    </dependency>
    ...
</dependencies>

This downloads Mimer JDBC driver version 3.42 makes it available to the project.

Example

As an example we have prepared a demo project that contains a token application that connects to a Mimer SQL database and retrieves all rows from the system table system.manyrows. This demo makes some assumptions about the environment in that it requires a database named “mimerdb”, with a user “SYSADM” and password “SYSADM”. These parameters can be changed in the source code.

The demo project uses the Maven Assembly plug-in which makes building an application as simple as giving the following command:

mvn package assembly:single

The resulting output is a self-contained jar file with a manifest and all dependencies included and can be run stand-alone with the command “java -jar” — please see the included readme file for all details.