<?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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<packaging>pom</packaging>

	<groupId>cn.javainterview</groupId>
	<artifactId>javainterview-parent</artifactId>
	<version>2.0.2</version>
	<name>JavaInterview</name>
	<description>JavaInterview是【Java面试+Java学习】仓库。</description>
	<url>https://github.com/yangchunjian/JavaInterview</url>

	<modules>
		<module>javainterview-core</module>
		<module>javainterview-algorithm</module>
        <module>javainterview-code</module>
		<module>javainterview-all</module>
    </modules>

	<properties>
		<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>utf-8</project.reporting.outputEncoding>

		<!-- versions -->
		<compile.version>8</compile.version>
		<junit.version>4.13.2</junit.version>
		<lombok.version>1.18.18</lombok.version>
	</properties>

	<dependencies>
		<!-- 全局单元测试 -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>${lombok.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<issueManagement>
		<system>Github Issue</system>
		<url>https://github.com/yangchunjian/JavaInterview/issues</url>
	</issueManagement>

	<licenses>
		<license>
			<name>Mulan Permissive Software License，Version 1</name>
			<url>https://license.coscl.org.cn/MulanPSL2</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>JavaInterview.cn</name>
			<email>1091938307@qq.com</email>
		</developer>
	</developers>

	<scm>
		<connection>scm:git@github.com:yangchunjian/JavaInterview.git</connection>
		<developerConnection>scm:git@github.com:yangchunjian/JavaInterview.git</developerConnection>
		<url>git@github.com:yangchunjian/JavaInterview.git</url>
	</scm>


	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>
				<configuration>
					<source>${compile.version}</source>
					<target>${compile.version}</target>

					<encoding>UTF-8</encoding>
					<compilerArguments>
						<verbose />
						<!-- 将jdk的依赖jar打入项目中，这样项目中使用的jdk的依赖就能正常使用 -->
						<!--注意windows下使用分号（;）分隔，linux/mac下使用冒号（:）分隔-->
						<!--<bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar;${java.home}/lib/jsse.jar</bootclasspath>-->
						<bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar:${java.home}/lib/jsse.jar</bootclasspath>
					</compilerArguments>
				</configuration>
			</plugin>
			<!-- Javadoc -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.1.1</version>
				<configuration>
					<!-- jdk1.8要加上，1.7要去掉，否则会报错 -->
					<additionalJOptions>
						<additionalJOption>-Xdoclint:none</additionalJOption>
					</additionalJOptions>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<!-- 要生成Javadoc和Source jar文件，您必须配置javadoc和源Maven插件 -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.2.1</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.10.4</version>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<additionalparam>-Xdoclint:none</additionalparam>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<!--  必须配置GPG插件用于使用以下配置对组件进行签名 -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<!-- 【注】snapshotRepository 与 repository 中的 id 一定要与 setting.xml 中 server 的 id 保持一致！ -->
			<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>
		</profile>
	</profiles>

</project>
