From ee95868c7c0a142c2aaf4f49d711b37c00711aa9 Mon Sep 17 00:00:00 2001 From: Mark Raynsford Date: Thu, 15 Nov 2012 22:26:26 +0000 Subject: Add trivial JOAL maven example --- maven/trivial/.classpath | 26 +++++++++++ maven/trivial/.project | 23 ++++++++++ .../.settings/org.eclipse.core.resources.prefs | 2 + maven/trivial/.settings/org.eclipse.jdt.core.prefs | 5 +++ maven/trivial/.settings/org.eclipse.m2e.core.prefs | 4 ++ maven/trivial/README.txt | 12 ++++++ maven/trivial/pom.xml | 50 ++++++++++++++++++++++ .../java/com/io7m/example/test_joal/TestJOAL.java | 22 ++++++++++ 8 files changed, 144 insertions(+) create mode 100644 maven/trivial/.classpath create mode 100644 maven/trivial/.project create mode 100644 maven/trivial/.settings/org.eclipse.core.resources.prefs create mode 100644 maven/trivial/.settings/org.eclipse.jdt.core.prefs create mode 100644 maven/trivial/.settings/org.eclipse.m2e.core.prefs create mode 100644 maven/trivial/README.txt create mode 100644 maven/trivial/pom.xml create mode 100644 maven/trivial/src/test/java/com/io7m/example/test_joal/TestJOAL.java diff --git a/maven/trivial/.classpath b/maven/trivial/.classpath new file mode 100644 index 0000000..fd7ad7f --- /dev/null +++ b/maven/trivial/.classpath @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/maven/trivial/.project b/maven/trivial/.project new file mode 100644 index 0000000..410bcb3 --- /dev/null +++ b/maven/trivial/.project @@ -0,0 +1,23 @@ + + + trivial-joal + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/maven/trivial/.settings/org.eclipse.core.resources.prefs b/maven/trivial/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/maven/trivial/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=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 index 0000000..60105c1 --- /dev/null +++ b/maven/trivial/.settings/org.eclipse.jdt.core.prefs @@ -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 index 0000000..f897a7f --- /dev/null +++ b/maven/trivial/.settings/org.eclipse.m2e.core.prefs @@ -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 index 0000000..f10af47 --- /dev/null +++ b/maven/trivial/README.txt @@ -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 index 0000000..abc2308 --- /dev/null +++ b/maven/trivial/pom.xml @@ -0,0 +1,50 @@ + + 4.0.0 + + com.io7m.example + trivial-joal + 1.0.0 + jar + + jogl-mvn-test + http://maven.apache.org + + + UTF-8 + + + + + junit + junit + 4.10 + test + + + org.jogamp.gluegen + gluegen-rt-main + 2.0-rc11 + + + org.jogamp.joal + joal-main + 2.0-rc11 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + 1.6 + 1.6 + + + + + + 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 index 0000000..a3f4efb --- /dev/null +++ b/maven/trivial/src/test/java/com/io7m/example/test_joal/TestJOAL.java @@ -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); + } + } +} -- cgit v1.2.3