Oct 15, 2009

Using Microlog from Maven

Microlog V2 is available from the Maven central repository, which was not the case for Microlog V1. Thus you need to add the Microlog Maven repository to your Maven project file when using Microlog V1. This is not the case with Microlog V2, since the Maven central repository is automatically searched if no repository is specified. Just add this simple snippet into your pom.xml file:


<dependency>
<groupId>net.sf.microlog</groupId>
<artifactId>microlog-logger-core</artifactId>
<version>2.0.5</version>
<scope>compile</scope>
</dependency>


This will let you use the core part of Microlog. If you wish to have access to the MIDP part of Microlog, add this snippet:


<dependency>
<groupId>net.sf.microlog</groupId>
<artifactId>microlog-logger-midp</artifactId>
<version>2.0.5</version>
<scope>compile</scope>
</dependency>


Notice that the version is 2.0.5 which is the latest stable release as of today. For those who want to be on the cutting edge, there is also a snapshot version available. Just replace 2.0.5 with 2.1.0-SNAPSHOT in the examples above.

And that is it! You could now compile your Java ME code that uses Microlog within a a couple of minutes. A lot of projects are using Maven and I hope that you will find this tip useful.

4 comments:

My Open Source Software Development Blog said...

The 2.1.0 is now release and I recommend that you use this version instead.

alrocar said...

Is microlog-logger-android.jar hosted at any maven repo?

My Open Source Software Development Blog said...

Sorry, but microlog-logger-android.jar is not available in any repo (yet). My plan is to get it to Maven central. But to do this, the android jars from the sdk must be available in Maven central. This is hopefully true in a near future. However if there is a need to use it before that, we could do a temporary solution.

shop wedding dress said...

strapless wedding dress
strapless wedding dress