Jogamp
Add trivial JOAL maven example
authorMark Raynsford <mark@io7m.com>
Thu, 15 Nov 2012 22:26:26 +0000 (22:26 +0000)
committerMark Raynsford <mark@io7m.com>
Thu, 15 Nov 2012 22:26:26 +0000 (22:26 +0000)
maven/trivial/.classpath [new file with mode: 0644]
maven/trivial/.project [new file with mode: 0644]
maven/trivial/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
maven/trivial/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
maven/trivial/.settings/org.eclipse.m2e.core.prefs [new file with mode: 0644]
maven/trivial/README.txt [new file with mode: 0644]
maven/trivial/pom.xml [new file with mode: 0644]
maven/trivial/src/test/java/com/io7m/example/test_joal/TestJOAL.java [new file with mode: 0644]

diff --git a/maven/trivial/.classpath b/maven/trivial/.classpath
new file mode 100644 (file)
index 0000000..fd7ad7f
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" output="target/classes" path="src/main/java">
+               <attributes>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+               <attributes>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+               <attributes>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+               <attributes>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/maven/trivial/.project b/maven/trivial/.project
new file mode 100644 (file)
index 0000000..410bcb3
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>trivial-joal</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.m2e.core.maven2Builder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.m2e.core.maven2Nature</nature>
+       </natures>
+</projectDescription>
diff --git a/maven/trivial/.settings/org.eclipse.core.resources.prefs b/maven/trivial/.settings/org.eclipse.core.resources.prefs
new file mode 100644 (file)
index 0000000..99f26c0
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/maven/trivial/.settings/org.eclipse.jdt.core.prefs b/maven/trivial/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..60105c1
--- /dev/null
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/maven/trivial/.settings/org.eclipse.m2e.core.prefs b/maven/trivial/.settings/org.eclipse.m2e.core.prefs
new file mode 100644 (file)
index 0000000..f897a7f
--- /dev/null
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/maven/trivial/README.txt b/maven/trivial/README.txt
new file mode 100644 (file)
index 0000000..f10af47
--- /dev/null
@@ -0,0 +1,12 @@
+Trivial example that does nothing beyond opening an AL context. This
+should be sufficient to test package dependency resolution and whether
+or not the binaries actually work.
+
+Simply run the example with:
+
+  $ mvn -C clean verify
+
+This will cause maven to download the JOAL packages from the Central
+Repository (http://search.maven.org), compile the example code, and
+run the test suite.
+
diff --git a/maven/trivial/pom.xml b/maven/trivial/pom.xml
new file mode 100644 (file)
index 0000000..abc2308
--- /dev/null
@@ -0,0 +1,50 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>com.io7m.example</groupId>
+  <artifactId>trivial-joal</artifactId>
+  <version>1.0.0</version>
+  <packaging>jar</packaging>
+
+  <name>jogl-mvn-test</name>
+  <url>http://maven.apache.org</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.10</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jogamp.gluegen</groupId>
+      <artifactId>gluegen-rt-main</artifactId>
+      <version>2.0-rc11</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jogamp.joal</groupId>
+      <artifactId>joal-main</artifactId>
+      <version>2.0-rc11</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0.2</version>
+        <configuration>
+            <source>1.6</source>
+            <target>1.6</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/maven/trivial/src/test/java/com/io7m/example/test_joal/TestJOAL.java b/maven/trivial/src/test/java/com/io7m/example/test_joal/TestJOAL.java
new file mode 100644 (file)
index 0000000..a3f4efb
--- /dev/null
@@ -0,0 +1,22 @@
+package com.io7m.example.test_joal;
+
+import org.junit.Test;
+
+import com.jogamp.openal.AL;
+import com.jogamp.openal.ALException;
+import com.jogamp.openal.ALFactory;
+
+public class TestJOAL
+{
+  @SuppressWarnings("static-method") @Test public void go()
+  {
+    try {
+      final AL al = ALFactory.getAL();
+      al.alGetError();
+      System.err.println("AL: " + al);
+    } catch (final ALException e) {
+      e.printStackTrace();
+      System.exit(1);
+    }
+  }
+}
http://JogAmp.org git info: FAQ, tutorial and man pages.