Browse Source

Converted to maven project

Tankernn 8 years ago
parent
commit
499bbe7c03
3 changed files with 96 additions and 1 deletions
  1. 2 1
      .gitignore
  2. 91 0
      pom.xml
  3. 3 0
      src/main/java/eu/tankernn/gameoflife/GameOfLife.java

+ 2 - 1
.gitignore

@@ -1,5 +1,6 @@
 .metadata
 bin/
+target/
 tmp/
 *.tmp
 *.bak
@@ -47,4 +48,4 @@ local.properties
 .springBeans
 
 # Code Recommenders
-.recommenders/
+.recommenders/

+ 91 - 0
pom.xml

@@ -0,0 +1,91 @@
+
+<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>eu.tankernn.gameoflife</groupId>
+	<artifactId>game-of-life</artifactId>
+	<version>1.0</version>
+	<packaging>jar</packaging>
+
+	<url>http://tankernn.eu</url>
+	<name>Conway's Game of Life</name>
+
+	<repositories>
+		<repository>
+			<id>tankernn-repo</id>
+			<name>tankernn maven repository</name>
+			<url>http://repo.maven.tankernn.eu/</url>
+		</repository>
+	</repositories>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.lwjgl.lwjgl</groupId>
+			<artifactId>lwjgl</artifactId>
+			<version>2.9.3</version>
+		</dependency>
+		<dependency>
+			<groupId>org.lwjgl.lwjgl</groupId>
+			<artifactId>lwjgl_util</artifactId>
+			<version>2.9.3</version>
+		</dependency>
+		<dependency>
+			<groupId>eu.tankernn.gameEngine</groupId>
+			<artifactId>tankernn-game-engine</artifactId>
+			<version>1.0.1-SNAPSHOT</version>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<executions>
+					<execution>
+						<phase>package</phase>
+						<goals>
+							<goal>single</goal>
+						</goals>
+						<configuration>
+							<archive>
+								<manifest>
+									<addClasspath>true</addClasspath>
+									<mainClass>eu.tankernn.gameoflife.GameOfLife</mainClass>
+								</manifest>
+							</archive>
+							<!-- The filename of the assembled distribution file defualt ${project.build.finalName} -->
+							<finalName>${project.build.finalName}</finalName>
+							<appendAssemblyId>false</appendAssemblyId>
+						</configuration>
+					</execution>
+				</executions>
+				<configuration>
+					<descriptorRefs>
+						<descriptorRef>jar-with-dependencies</descriptorRef>
+					</descriptorRefs>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>com.googlecode.mavennatives</groupId>
+				<artifactId>maven-nativedependencies-plugin</artifactId>
+				<version>0.0.6</version>
+				<executions>
+					<execution>
+						<id>unpacknatives</id>
+						<phase>package</phase>
+						<goals>
+							<goal>copy</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+	<properties>
+		<maven.compiler.source>1.8</maven.compiler.source>
+		<maven.compiler.target>1.8</maven.compiler.target>
+	</properties>
+	<description>A version of the classic Game of Life originally created by John Conway.</description>
+</project>

+ 3 - 0
src/eu/tankernn/gameoflife/GameOfLife.java → src/main/java/eu/tankernn/gameoflife/GameOfLife.java

@@ -8,6 +8,8 @@ import org.lwjgl.opengl.Display;
 import org.lwjgl.opengl.DisplayMode;
 import org.lwjgl.opengl.GL11;
 
+import eu.tankernn.gameEngine.util.NativesExporter;
+
 public class GameOfLife {
 
 	private static long lastFrameTime;
@@ -27,6 +29,7 @@ public class GameOfLife {
 	private static boolean debug = true;
 
 	private static void initDisplay() {
+		NativesExporter.exportNatives();
 		try {
 			Display.setDisplayMode(new DisplayMode(displayWidth, displayHeight));
 			Display.create();