<?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">
	<parent>
		<groupId>com.github.myshzzx</groupId>
		<artifactId>mlib</artifactId>
		<version>2.1</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>

	<artifactId>mlib-cluster</artifactId>

	<dependencies>
		<dependency>
			<groupId>com.github.myshzzx</groupId>
			<artifactId>mlib-core</artifactId>
			<version>2.1</version>
		</dependency>

		<dependency>
			<groupId>org.apache.thrift</groupId>
			<artifactId>libthrift</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
		</dependency>
		<dependency>
			<groupId>de.ruedigermoeller</groupId>
			<artifactId>fst</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-pool2</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>
	</dependencies>

	<build>
		<finalName>mlib-cluster</finalName>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>
				<configuration>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
					<encoding>${sourceEncoding}</encoding>
					<compilerArgs>
<!--						<arg>&#45;&#45;add-exports=java.base/sun.security.util=mlib.cluster</arg>-->
<!--						<arg>&#45;&#45;add-exports=java.base/sun.security.util=ALL-UNNAMED</arg>-->
					</compilerArgs>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.ow2.asm</groupId>
						<artifactId>asm</artifactId>
						<version>6.1.1</version>
					</dependency>
				</dependencies>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.10</version>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/cluster-dist/main/core</outputDirectory>
							<overWriteReleases>false</overWriteReleases>
							<overWriteSnapshots>false</overWriteSnapshots>
							<overWriteIfNewer>true</overWriteIfNewer>
							<includeScope>runtime</includeScope>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.0.1</version>
				<executions>
					<execution>
						<id>copy-resources</id>
						<phase>package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<encoding>UTF-8</encoding>
							<outputDirectory>${project.build.directory}/cluster-dist</outputDirectory>
							<resources>
								<resource>
									<directory>dist</directory>
									<filtering>true</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<executions>
					<execution>
						<phase>package</phase>
					</execution>
				</executions>
				<configuration>
					<outputDirectory>${project.build.directory}/cluster-dist/main/core</outputDirectory>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>
