Maven-Repository for LWJGL

Started by chrisabit, January 07, 2008, 22:35:57

Previous topic - Next topic

chrisabit

Hi all,

LWJGL is a wonderful piece of code. But I never was 100% happy with the kind it is delivered. Because I develop with eclipse I installed the LWJGL-Directories and defined a classpathcontainer with the LWJGL-Jars and the corresponding Shared Libraries / DLLs. Although that works - it's a very primitive way. Therefore I restructured the LWJGL stuff to a Maven-repository (i.e. a well structured Jar / Javadoc / Sources directory structure) that is maintained by Maven and can be used in Eclipse with a nice plugin (m2eclipse).

Anyone interested in using that? If interested contact me...

Regard

Chris

markush

Yes! I'm very interested!

Post the link to the repository or pm me :)

How do you handle native libs? I have my own private maven repository with the lwjgl jars but have to handle the native stuff manually. Have you a better solution for that?

Greetings
Markus

chrisabit

Quote from: markush on January 08, 2008, 07:49:17
Yes! I'm very interested!

Post the link to the repository or pm me :)

How do you handle native libs? I have my own private maven repository with the lwjgl jars but have to handle the native stuff manually. Have you a better solution for that?

Greetings
Markus

Hi Markus,

the JNI-shared libs / dlls (i.e. liblwjgl.so, lwjgl.dll, etc.) are part of the repository, because they are strongly coupled with the Jars by their System.loadLibrary() usage. Since Maven appends a version postfix to all repository files I had to recompile the LWJGL-Jars accordingly:
doLoadLibrary(lib_name + "-" + VERSION);


My maven repository maintains dependencies between Jars and JNI Shared Libs. Moreover Javadoc and Sources are associated with the Jars.
You can use the eclipse plugin m2eclipse to reference components from the repository in your eclipse projects.

=> http://m2eclipse.codehaus.org/update

Sounds good, doesn't it ?

But there a some disadvantages:

  • IMHO it neither makes sense to maintain non-JNI shared libs (for instance libopenal.so or libIL.so) in the repository nor to use those from the LWJGL-Zips. That's why god gave us yum / apt-get / rpm. But you have to configure your system accordingly...
  • I  integrated exclusively those Jars/Shared Libs, which are available on ALL supported platforms (Linux x86, Linux x86_64, Win32, MacOS X). Thus several components are NOT part of the repo: FMOD3, JInput

If you are still interested you may private me with your email address. I'll send the repo with a sample eclipse project if you want. Alternatively you may let me know of a fileserver where I can drop those files.

Best regards

Chris





void256

Hey Chris,

this sounds very exciting! Why do you not share your repository url in public?

I'd really want to see lwjgl (and slick2d) in a maven repository. But I don't like to mess with the lwjgl distribution, changing code etc. at all or to make the deployment to the maven repo a seperate manual step. What I'd rather like to do ist to persuade Mazon :) to do this automatically.

This does not mean that he needs to completly build lwjgl with maven (we've tried to persuade him for this before and failed :) see the end of this thread: http://lwjgl.org/forum/index.php/topic,278.0.html) but to just deploy the artefacts as part of the lwjgl release process to a remote maven repository.

I've tried this with slick2d yesterday using a modified ant build.xml that is using the maven ant plugin. This was rather easy to do. You've just use your projects build process and when it has ended you use an additional ant build target (with the maven ant plugin) to deploy the results to a remote repository! I need to talk about integrating this into official slick2d builds with kev too - which should be fun :) - and I will probaby post a RFE in the slick2d forum for this soon.

I used the remote repository I've already set up for Nifty GUI at sf.net for this test. But the final goal for the process woud be of course to get both lwjgl and slick2d finally into the central maven repository. Has this already been done by someone else maybe? Otherwise I've read a bit how this works. The prefered way is to register over at maven with an rsynch mechanism to an already existing remote repository. You deploy your artefacts to a remote repository that is later synchronized automatically from the central.

To have lwjgl and slick in the central maven repo would make it a lot easier for people that use maven to get up and running with the libs in no speed at all!

I've done the same with Nifty GUI already (-> manually deploying lwjgl and slick2d to my maven repo at sf.net). Which makes building Nifty *that* much easier. You can check the repo out here:

http://nifty-gui.sourceforge.net/nifty-maven-repo/

and how easy it is to build Nifty with maven and the libs already available in a repo here:

http://apps.sourceforge.net/mediawiki/nifty-gui/index.php?title=Getting_Started#Build_Nifty_with_Maven

The only thing that might be a problem are the native libs. I've not yet tried to deploy a "dll" or "so" to the maven repo. This should be possible but there might be - as you already mentioned - an issue with the version numbers maven adds to the artefacts. But I'm not sure about that yet and will probably try this on my own soon. At the moment you need to figure out the native runtime libs you need for the matching lwjgl version on your own when you use the Nifty maven repo over at sf.net. For me this hasn't been a big problem so far. Being able to compile your project without much hassle is already a lot worth.

Any ideas or comments? :)

void256

Endolf

JInput is should work on all platforms, under solaris the AWT plugin should work just fine (no controller input though). There are natives for windows 32 bit, 64 bit, linux 32 and 64 bit and osx on PPC, x86 and x86_64.

The version of JInput in LWJGL just doesn't have all of them. Thats on my list for this weekend, girlfriend permitting :)

I'm working on the LWJGL build scripts at the moment to get nightly builds working on my build farm, now is the time to speak if people want artifacts from the nightly build publishing to a maven repository :)

Endolf

void256

Quote from: Endolf on April 09, 2009, 07:45:40now is the time to speak if people want artifacts from the nightly build publishing to a maven repository :)

*SPEAK* no *SCREAMS* :D