Karachi   ->   Sweden   ->   Karachi, again   ->   Dubai   ->   Bahrain   ->   Karachi, once more   ->   London and Leeds

Sunday, February 09, 2014

Configuring jPOS with Maven POM

jPOS is now available on GitHub. If you want to make use of the ISO8583 Java library in your Maven project, following are the dependency settings that you need to define in your POM.xml:

<dependency>
<groupId>org.jpos</groupId>
<artifactId>jpos</artifactId>
<version>1.9.2</version>
</dependency>
view raw jpos_pom.xml hosted with ❤ by GitHub
In other words, the groupId is org.jpos and the artifactId is jpos. The latest released version as of today is 1.9.2.

A frequently encountered error, however, is related to missing sleepycat jar when you build your maven project having jPOS as a dependency. The exact error is something like "missing com.sleepycat:je:4.1.10 artifact".

A nice solution to that is to add Oracle's maven repository in your project's list of repositories, so that the missing dependency gets resolved automatically. For this, you just need to add reference to http://download.oracle.com/maven in your POM file, as shown below:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<repositories>
<repository>
<id>oracle</id>
<name>Oracle repo</name>
<url>http://download.oracle.com/maven</url>
</repository>
</repositories>
<!-- your project artifact definition and other dependencies go here -->
</project>

No comments:

Post a Comment