Prechádzať zdrojové kódy

Merge branch 'master' of git@tankernn.eu:mines.git

Tankernn 8 rokov pred
rodič
commit
797e1287bc
4 zmenil súbory, kde vykonal 49 pridanie a 36 odobranie
  1. 0 27
      .classpath
  2. 10 3
      .gitignore
  3. 37 4
      pom.xml
  4. 2 2
      src/main/java/eu/tankernn/mines/Mines.java

+ 0 - 27
.classpath

@@ -1,27 +0,0 @@
-<?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" path="res"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
-		<attributes>
-			<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.m2e.MAVEN2_CLASSPATH_CONTAINER">
-		<attributes>
-			<attribute name="maven.pomderived" value="true"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>

+ 10 - 3
.gitignore

@@ -1,5 +1,12 @@
-/bin/
-/target/
+.settings/
+.classpath
 .project
-.settings
+
+tmp/
+*.tmp
+*.bak
+*.swp
+
+bin/
+target/
 .DS_Store

+ 37 - 4
pom.xml

@@ -24,13 +24,33 @@
 	</dependencies>
 
 	<build>
+		<finalName>${project.artifactId}-${project.version}.${build.number}</finalName>
 		<plugins>
 			<plugin>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<version>3.5.1</version>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<executions>
+					<execution>
+						<phase>package</phase>
+						<goals>
+							<goal>single</goal>
+						</goals>
+						<configuration>
+							<archive>
+								<manifest>
+									<addClasspath>true</addClasspath>
+									<mainClass>eu.tankernn.mines.Mines</mainClass>
+								</manifest>
+							</archive>
+							<!-- The filename of the assembled distribution file default ${project.build.finalName} -->
+							<finalName>${project.build.finalName}</finalName>
+							<appendAssemblyId>false</appendAssemblyId>
+						</configuration>
+					</execution>
+				</executions>
 				<configuration>
-					<source>1.8</source>
-					<target>1.8</target>
+					<descriptorRefs>
+						<descriptorRef>jar-with-dependencies</descriptorRef>
+					</descriptorRefs>
 				</configuration>
 			</plugin>
 			<plugin>
@@ -48,5 +68,18 @@
 				</executions>
 			</plugin>
 		</plugins>
+		<resources>
+			<resource>
+				<directory>res</directory>
+				<excludes>
+				</excludes>
+			</resource>
+		</resources>
 	</build>
+	
+	<properties>
+		<maven.compiler.source>1.8</maven.compiler.source>
+		<maven.compiler.target>1.8</maven.compiler.target>
+		<build.number>SNAPSHOT</build.number>
+	</properties>
 </project>

+ 2 - 2
src/main/java/eu/tankernn/mines/Mines.java

@@ -23,8 +23,8 @@ import eu.tankernn.gameEngine.util.InternalFile;
 import eu.tankernn.mines.Tile.TileState;
 
 public class Mines extends TankernnGame {
-	public static String GAME_NAME = "Minesweeper";
-	public static Pos[] DEFAULT_PATTERN = { new Pos(0, 1), new Pos(0, -1), new Pos(1, 0), new Pos(1, 1), new Pos(1, -1),
+	public static final String GAME_NAME = "Minesweeper";
+	public static final Pos[] DEFAULT_PATTERN = { new Pos(0, 1), new Pos(0, -1), new Pos(1, 0), new Pos(1, 1), new Pos(1, -1),
 			new Pos(-1, 0), new Pos(-1, -1), new Pos(-1, 1) };
 	public static Settings DEFAULT_SETTINGS = new Settings(DEFAULT_PATTERN, 9, 9, 20);