Updated POM to use Java 8. Updated some tool versions in the POMs.

This commit is contained in:
LevelX2 2016-09-29 16:21:32 +02:00
parent ca39289a3a
commit 3516dc75e4
3 changed files with 19 additions and 29 deletions

View file

@ -13,8 +13,6 @@ import static org.junit.Assert.assertTrue;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mage.test.serverside.base.MageTestBase; import org.mage.test.serverside.base.MageTestBase;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/** /**
* *
@ -84,21 +82,14 @@ public class BoosterGenerationTest extends MageTestBase {
} }
private static boolean contains(List<Card> cards, List<String> names, String code) { private static boolean contains(List<Card> cards, List<String> names, String code) {
for (String name : names) { return names.stream().anyMatch((name) -> (contains(cards, name, code)));
if (contains(cards, name, code)) {
return true;
}
}
return false;
} }
private static boolean contains(List<Card> cards, String name, String code) { private static boolean contains(List<Card> cards, String name, String code) {
for (Card card : cards) { return cards.stream().anyMatch((card)
if (card.getName().equals(name) && (code == null || card.getExpansionSetCode().equals(code))) { -> (card.getName().equals(name)
return true; && (code == null || card.getExpansionSetCode().equals(code)))
} );
}
return false;
} }
} }

View file

@ -34,7 +34,6 @@
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
@ -145,7 +144,7 @@
<finalName>mage</finalName> <finalName>mage</finalName>
<!-- The extension below is added added by following http://vlkan.com/blog/post/2015/11/27/maven-protobuf/ --> <!-- The extension below is added by following http://vlkan.com/blog/post/2015/11/27/maven-protobuf/ -->
<extensions> <extensions>
<!-- provides os.detected.classifier (i.e. linux-x86_64, osx-x86_64) property --> <!-- provides os.detected.classifier (i.e. linux-x86_64, osx-x86_64) property -->
<extension> <extension>

26
pom.xml
View file

@ -15,10 +15,10 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version> <version>3.5.1</version>
<configuration> <configuration>
<source>1.7</source> <source>1.8</source>
<target>1.7</target> <target>1.8</target>
<encoding>UTF-8</encoding> <encoding>UTF-8</encoding>
<!-- <!--
Because of known error in maven-compiler-plugin 3.2 useIncrementalCompilation is inverted Because of known error in maven-compiler-plugin 3.2 useIncrementalCompilation is inverted
@ -26,26 +26,26 @@
https://jira.codehaus.org/browse/MCOMPILER-209 https://jira.codehaus.org/browse/MCOMPILER-209
--> -->
<useIncrementalCompilation>false</useIncrementalCompilation> <useIncrementalCompilation>false</useIncrementalCompilation>
<!-- <compilerArgument>-Xlint:all</compilerArgument> --> <!-- <compilerArgument>-Xlint:all</compilerArgument> -->
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<version>2.7</version> <version>2.7</version>
<configuration> <configuration>
<encoding>UTF-8</encoding> <encoding>UTF-8</encoding>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<version>2.5</version> <version>2.5</version>
<configuration> <configuration>
<archive> <archive>
<manifestEntries> <manifestEntries>
<Built-By>MageTeam</Built-By> <Built-By>MageTeam</Built-By>
</manifestEntries> </manifestEntries>
</archive> </archive>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
@ -102,7 +102,7 @@
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId> <artifactId>slf4j-log4j12</artifactId>
<version>1.7.10</version> <version>1.7.19</version>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>