Getting a little quicker with Maven

I posted the following message to the Bitronix Transaction Manager user forum when I figured out what appears to be an error in the instructions for using pre-release versions of BTM with Maven 2.

The thing that encouraged me was that this time it didn’t take much time for me to figure out that <remoteRepository> looked strange, and didn’t fit the pom schema.  I checked the Maven local and global settings.xml files, but they didn’t seem to have a <remoteRepository> concept either.  So I used an existing <repository> definition in one of my settings.xml files as a guide and converted the <remoteRepository> to that format… and it worked!

Kind of a tiny thing, but sometimes it’s the little things that make you happy… :)

The message I posted is below.


I think the instructions for using pre-release versions of BTM with Maven 2 are a little wrong: They show that you should put this in your pom.xml file:

<remoteRepository>
    <key>codehaus-snapshots</key>
    <handleReleases>true</handleReleases>
    <handleSnapshots>false</handleSnapshots>
    <url>http://snapshots.repository.codehaus.org</url>
</remoteRepository>

But that is not valid syntax for the pom file (I think it’s the format you would use for an Ant task). I think this is what needs to be put in the pom file:

<repository>
    <id>codehaus-snapshots</id>
    <url>http://snapshots.repository.codehaus.org</url>
    <snapshots>
        <enabled>false</enabled>
    </snapshots>
</repository>

I tried this and it brought in the btm-1.3-RC2.jar as I hoped:

Downloading: http://snapshots.repository.codehaus.org/org/codehaus/btm/btm/1.3-RC2/btm-1.3-RC2.jar

Or maybe I’m misunderstanding what the instructions were trying to tell me? :)


Update 8/13/2008: Ludovic has updated his instructions.  Cool!

Advertisements

, ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s