title: Maven and the JOGL library?
body: <p>I've been studying Maven in my free time over the last several days but can't seem to figure out how to organize a project so that the JOGL libraries are used. I would preferably like the following:</p>
  
  <ol>
  <li>Automatically download, if necessary, the OS-specific JOGL zip file from <a href="http://download.java.net/media/jogl/builds/archive/jsr-231-2.0-beta10/" rel="noreferrer" title="jsr-231-2.0-beta10">here</a> (contains 4 jar files and some native library files (.so/.dll)); or depend on a Maven project which is a wrapper of one of the files.</li>
  <li>Unzip that zip file appropriately, so that:
  
  <ol>
  <li>the jar files are added to the classpath and deployed as necessary, and</li>
  <li>the native library files are added to the final jar file (would this enable them to be automatically used, or would I need something more involved?)</li>
  </ol></li>
  </ol>
  
  <p>I think part of my problem is that I don't fully understand the use of JOGL, where to place the native libraries when running the code, etc. I need to go back to the basics and write a JOGL hello world, compile it from the command line and run it from the command line to see exactly what it requires as far as directory placement of the native libraries; I may go do that right now, actually.</p>
  
  <p>With item 1, I've found some OS-specific features; Maven profiles can be activated based on properties of the system, which include the operating system. So then I could activate a Windows profile which has a dependency of the Windows-specific JOGL library, same for the Linux, and both having a 64-bit alter ego. (Activation <a href="http://maven.apache.org/guides/introduction/introduction-to-profiles.html" rel="noreferrer">official docs</a> / <a href="http://www.sonatype.com/books/maven-book/reference/profiles-sect-activation.html" rel="noreferrer">unofficial docs</a>.)</p>
  
  <p>I have tried creating a Maven repository based on a JOGL jar file, and then adding the JOGL jar file project as a dependency of my project; the dependency is downloaded, but not used. I have no idea where the jar file goes or how to use it, unpack it, etc. <a href="http://pastebin.ca/1727280" rel="noreferrer">Here is the command I used.</a></p>
  
  <p>So, in short: <strong>JOGL consists of four .jar files and some native libraries. How can I integrate those files into my Maven project so that I can write a JOGL application with Maven handling my build process?</strong> Furthermore, how can I use a different set of files depending on the operating system, because of course the native libraries and even the .jar files differ between Windows, Linux and Mac.</p>