LWJGL use in Maven

LWJGL is available in Maven Central Repo starting with the version 2.8.0

You need to add the lwjgl dependency like this org.lwjgl.lwjgl lwjgl 2.8.4

This dependency will get you the main lwjgl.jar and the natives for Windows, Linux and Mac OSX.

The natives dependencies will have a classifier with the form "natives-${OS}" being:


 * natives-windows
 * natives-linux
 * natives-osx

You can use the mavennatives plugin to handle the natives unpacking, this plugin by default seaches for dependencies with classifier like natives-* and unpacks its content to the dir target/natives

com.googlecode.mavennatives maven-nativedependencies-plugin 0.0.5                        unpacknatives generate-resources copy

Adding the plugin like this, will bind it to the maven generate-resources phase, you can also run it manually like "mvn nativedependencies:copy"

This maven plugin can be used with an eclipse plugin that will run it automatically and add the correct java.library.path to your eclipse run configurations but for now it only works with m2eclipse 0.12.* versions.

Example project
There is an example project that uses lwjgl from maven central, when running the "mvn package" command with that project, it will generate a zip file in the target/ dir. This zip file contains the example's main jar, the dependencies, the unpacked natives and batch files so you can run the example in windows, linux and mac.

Other Dependencies
LWJGL Util

org.lwjgl.lwjgl lwjgl_util 2.8.4

LWJGL appletloader

org.lwjgl.lwjgl lwjgl_util_applet</artifactId> 2.8.4