Is libtiled-java available on any maven server?

(Casper Færgemand) #1

It doesn’t appear on Maven Central, is it available elsewhere? Can it be made available?

(Thorbjørn Lindeijer) #2

I guess it could, with the only problem that I have no idea what I’d need to do for this. The issue kind of got stuck here, and so far I haven’t gotten around at digging into those docs:

Any guidance would be greatly appreciated.

Note however, that apart from making libtiled-java properly accessible, a major issue is still that the library is somewhat outdated and doesn’t currently have a maintainer.

(Mike Thomas) #3

I uploaded an older version to sonatype snapstots repository a while back, which can be acessed by adding the following to your pom:



I am currently updating the java libraries to use the latest tmx map updates (see which I am using for a personal project I am developing which is taking up most of my free time at the moment.

The binaries need to be signed by a pgp key so that they can be upladed to maven central… @bjorn, if you are ok with me using my own key rather than yours? then I can see about publishing the version in the master branch to central for you.

(Thorbjørn Lindeijer) #4

What a huge change! Looking forward to reviewing it. :wink:

That would be perfectly fine with me. Thanks for your help!

(Mike Thomas) #5

It’s not quite ready for prime time just yet but will definately raise a pull request when it is :slight_smile:

I have staged a release in nexus (see attached screenshot), if you want to take a look using the login you created for your jira account:

All that is left to do is click the release button and comment on the jira ticket as it is the first release so that they can start the sync process to central.

let me know if you are happy with what’s in the release (you can view the contents in the “Content” tab you can see in the screenshot) and I’ll start the process to deploy to central.

(Thorbjørn Lindeijer) #6

Contents look fine as far as I can see. What is the purpose of tiled-parent?

(Mike Thomas) #7

It’s the main project file containing the configuration for libtiled and tmxviewer. It just makes it easier to share common plugins and build config with both modules.

I’ll start the process of deploying now and will let you know when the artefacts are available in maven central :smiley:

(Mike Thomas) #8

It looks like the release has been completed as the jar files are now available in the central repository:

You should now be able to request the jar using the following:


Let me know if you need anything else :slight_smile:

(Casper Færgemand) #9

Yep, this works better than the oss.sonatype link, since it lets me get the source for easy browsing.

In the yet-to-be-released version, I assume the xjb files generate the missing classes?

Edit: I stopped trying to use gradle and accepted your maven solution. I got it to compile just fine.

(Casper Færgemand) #10

@mikethomas Both the original and your version seem to choke on maps that use tsx files that are not at the default path. In the current test code, create a new folder and copy desert.tmx and desert.tsx into it. Then add the following test case:

public void testErrorReadingMap() throws Exception {
    new TMXMapReader().readMap("other/desert.tmx");

It throws the an error like this in my code:

 java.lang.IndexOutOfBoundsException: Index: 16, Size: 1
	at java.util.ArrayList.rangeCheck(
	at java.util.ArrayList.get(
	at tiled.core.TileSet.getTile(

I think the issue is that the tsx file is on a path relative to the tmx file, but some other path is searched when the tsx file is attempted loaded. I recall an older version of the code having the same problem. It worked only when the resources were folders named the same as the package structure of the class from which the tmx file was attempted loaded. I’m looking through the source, but I haven’t found the problem yet.

(Thorbjørn Lindeijer) #11

It would be good to report such issues on the issue tracker.

(Casper Færgemand) #12

It is done.