From 9fa3eea9653a443167fe8bf22aebadfaa8e102db Mon Sep 17 00:00:00 2001
From: "Meredith L. Patterson" <mlp@thesmartpolitenerd.com>
Date: Thu, 2 Jan 2014 03:21:44 +0100
Subject: [PATCH] with JAVA_HOME set, mvn compile works. now to get tests
 working

---
 src/bindings/java/pom.xml | 89 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)
 create mode 100644 src/bindings/java/pom.xml

diff --git a/src/bindings/java/pom.xml b/src/bindings/java/pom.xml
new file mode 100644
index 00000000..19685d30
--- /dev/null
+++ b/src/bindings/java/pom.xml
@@ -0,0 +1,89 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>com.upstandinghackers</groupId>
+  <artifactId>hammer</artifactId>
+  <version>0.9</version>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>6.1.1</version>
+      <scope>test</scope>
+    </dependency>
+    <!-- libhammer.so goes in here, uh, somehow -->
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+	<artifactId>maven-compiler-plugin</artifactId>
+	<configuration>
+	  <source>1.7</source>
+	  <target>1.7</target>
+	</configuration>
+	<executions>
+	  <execution>
+	    <phase>validate</phase>
+	    <goals>
+	      <goal>compile</goal>
+	    </goals>
+	  </execution>
+	</executions>
+      </plugin>
+
+      <plugin>
+	<artifactId>maven-jar-plugin</artifactId>
+	<executions>
+	  <execution>
+	    <phase>validate</phase>
+	    <goals>
+	      <goal>jar</goal>
+	    </goals>
+	  </execution>
+	</executions>
+      </plugin>
+
+      <plugin>
+	<groupId>org.codehaus.mojo</groupId>
+	<artifactId>native-maven-plugin</artifactId>
+	<configuration>
+	  <javahClassNames>
+	    <javahClassName>Hammer</javahClassName>
+	    <javahClassName>ParsedToken</javahClassName>
+	    <javahClassName>Parser</javahClassName>
+	    <javahClassName>ParseResult</javahClassName>
+	  </javahClassNames>
+	  <compilerProvider>generic</compilerProvider>
+	  <compilerStartOptions>
+	    <compilerStartOption>-std=gnu99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attributes -O3 -fPIC</compilerStartOption>
+	  </compilerStartOptions>
+	  <sources>
+	    <source>
+	      <directory>src/main/native</directory>
+	      <fileNames>
+		<fileName>com_upstandinghackers_hammer_Hammer.c</fileName>
+		<fileName>com_upstandinghackers_hammer_ParsedToken.c</fileName>
+		<fileName>com_upstandinghackers_hammer_Parser.c</fileName>
+		<fileName>com_upstandinghackers_hammer_ParseResult.c</fileName>
+	      </fileNames>
+	    </source>
+	  </sources>
+	  <linkerStartOptions>
+	    <linkerStartOption>-shared -L../../ -lhammer</linkerStartOption>
+	  </linkerStartOptions>
+	</configuration>
+      </plugin>
+      <plugin>
+	<artifactId>maven-surefire-plugin</artifactId>
+	<configuration>
+	  <forkMode>once</forkMode>
+	  <environmentVariables>
+	    <LD_LIBRARY_PATH>${project.build.directory}/../../</LD_LIBRARY_PATH>
+	  </environmentVariables>
+	</configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+</project>
-- 
GitLab