feat: Add Maven frameworks support.

1. Add JUnit Jupiter dependency;
2. Add maven-resources-plugin to fix path problem in SimplexNoise testcase;
3. Add maven-compiler-plugin to tell the default compiler version;
This commit is contained in:
laingke 2019-07-19 14:16:37 +08:00
parent 837f635001
commit d579b8e903

64
pom.xml Normal file
View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>algorithm</groupId>
<artifactId>java-algorithm</artifactId>
<version>1.0-SNAPSHOT</version>
<name>java-algorithm</name>
<description>All algorithms implemented in Java (for education)</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<resources.plugin.version>3.1.0</resources.plugin.version>
<compiler.plugin.version>3.8.0</compiler.plugin.version>
<!-- JDK version-->
<java.version>1.8</java.version>
<file.encoding>UTF-8</file.encoding>
<!-- JUnit Jupiter version -->
<junit-jupiter-api.version>5.5.0</junit-jupiter-api.version>
</properties>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter-api.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${resources.plugin.version}</version>
<configuration>
<encoding>${file.encoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${file.encoding}</encoding>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/test/resources</directory>
</resource>
</resources>
</build>
</project>