<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.zhg2yqq</groupId>
	<artifactId>wheels-dynamic-code</artifactId>
	<name>${project.groupId}:${project.artifactId}</name>
	<version>1.8.2${versionSuffix}</version>
	<description>Java8 Dynamic Code in anywhere</description>
	<url>https://github.com/520zhgzhg</url>
	<!-- 许可证信息 -->
	<licenses>
		<!-- Apache许可证 -->
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>
	<!-- SCM信息 -->
	<scm>
		<connection>scm:git:git://github.com/520zhgzhg/dynamic-code.git</connection>
		<developerConnection>scm:git:ssh://github.com/520zhgzhg/dynamic-code.git</developerConnection>
		<url>https://github.com/520zhgzhg/dynamic-code.git</url>
	</scm>
	<!-- 开发者信息 -->
	<developers>
		<developer>
			<name>zhg2yqq</name>
			<email>875452220@qq.com</email>
			<url>https://github.com/520zhgzhg</url>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>1.8</java.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.googlecode.concurrentlinkedhashmap</groupId>
			<artifactId>concurrentlinkedhashmap-lru</artifactId>
			<version>1.4.2</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
			<version>4.13.2</version>
		</dependency>
	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<!-- 是否开启过滤替换配置，默认是不开启的 -->
				<filtering>true</filtering>
			</resource>
			<resource>
				<directory>lib</directory>
				<targetPath>lib</targetPath>
				<filtering>false</filtering>
				<includes>
					<include>**/*.jar</include>
				</includes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
					<encoding>utf-8</encoding>
					<compilerArguments>
						<extdirs>${basedir}/lib</extdirs>
					</compilerArguments>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestEntries>
							<Built-By>zhg2yqq</Built-By>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<forkMode>once</forkMode>
					<argLine>-Dfile.encoding=UTF-8</argLine>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>dev</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<versionSuffix>-SNAPSHOT</versionSuffix>
			</properties>
		</profile>
		<profile>
			<!-- 编译命令示例：mvn clean deploy -P release -settings C:\apache-maven-3.6.0\conf\settings_aliyun.xml -->
			<id>release</id>
			<properties>
				<versionSuffix></versionSuffix>
			</properties>
			<build>
				<plugins>
					<!-- source包 -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<configuration>
							<attach>true</attach>
						</configuration>
						<executions>
							<execution>
								<phase>compile</phase>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<!-- 生成doc文档 -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<charset>UTF-8</charset>
							<encoding>UTF-8</encoding>
							<docencoding>UTF-8</docencoding>
							<additionalOptions>-Xdoclint:none</additionalOptions>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<!-- 简化版，不含自带的tools.jar包，减小体积。但运行时，必须指定自己tools.jar的路径或者环境中必需有JDK -->
			<!-- 编译命令示例：mvn clean deploy -P lite -settings C:\apache-maven-3.6.0\conf\settings_aliyun.xml -->
			<id>lite</id>
			<properties>
				<versionSuffix>-LITE</versionSuffix>
			</properties>
			<build>
				<plugins>
					<!--排除resources文件夹 -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-resources-plugin</artifactId>
						<configuration>
							<resources>
								<resource>
									<directory>lib</directory>
									<excludes>
										<exclude>**/*.jar</exclude>
									</excludes>
								</resource>
							</resources>
						</configuration>
					</plugin>
					<!-- source包 -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<configuration>
							<attach>true</attach>
							<excludes>
								<exclude>**/*.jar</exclude>
							</excludes>
						</configuration>
						<executions>
							<execution>
								<phase>compile</phase>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<!-- 生成doc文档 -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<charset>UTF-8</charset>
							<encoding>UTF-8</encoding>
							<docencoding>UTF-8</docencoding>
							<additionalOptions>-Xdoclint:none</additionalOptions>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<skipTests>true</skipTests>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<pluginRepositories>
		<pluginRepository>
			<id>public</id>
			<name>aliyun nexus</name>
			<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</pluginRepository>
	</pluginRepositories>
	<!-- 部署配置 -->
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>
</project>
