<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.codeages</groupId>
	<artifactId>framework-boot</artifactId>
	<version>1.0.6-RELEASE</version>
	<packaging>pom</packaging>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.4.RELEASE</version>
	</parent>

	<modules>
		<module>test-framework</module>
		<module>framework</module>
	</modules>

	<properties>
		<org.mapstruct.version>1.3.1.Final</org.mapstruct.version>
		<org.projectlombok.version>1.18.10</org.projectlombok.version>
		<spring-restdocs.version>2.0.4.RELEASE</spring-restdocs.version>
		<java.version>11</java.version>
		<compiler.encoding>UTF-8</compiler.encoding>
		<start-class>com.codeages.framework.FrameworkApplication</start-class>
    </properties>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
			<groupId>org.flywaydb</groupId>
			<artifactId>flyway-core</artifactId>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>${org.projectlombok.version}</version>
		</dependency>
		<dependency>
			<groupId>org.mapstruct</groupId>
			<artifactId>mapstruct</artifactId>
			<version>${org.mapstruct.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-amqp</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-cache</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-aop</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-redis</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-quartz</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>
		<dependency>
			<groupId>io.micrometer</groupId>
			<artifactId>micrometer-registry-influx</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>28.2-jre</version>
		</dependency>
		<dependency>
			<groupId>commons-httpclient</groupId>
			<artifactId>commons-httpclient</artifactId>
			<version>3.1</version>
		</dependency>

		<!-- fix jdk9 -->
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>2.3.0</version>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
			<version>2.3.0</version>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-core</artifactId>
			<version>2.3.0</version>
		</dependency>
		<dependency>
			<groupId>javax.activation</groupId>
			<artifactId>activation</artifactId>
			<version>1.1.1</version>
		</dependency>

		<!-- runtime dependency -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>
	</dependencies>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.codeages</groupId>
				<artifactId>framework</artifactId>
				<version>1.0.6-RELEASE</version>
			</dependency>

			<dependency>
				<groupId>com.codeages</groupId>
				<artifactId>test-framework</artifactId>
				<version>1.0.6-RELEASE</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-starter-test</artifactId>
				<version>2.2.4.RELEASE</version>
				<exclusions>
					<exclusion>
						<groupId>org.junit.vintage</groupId>
						<artifactId>junit-vintage-engine</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>com.h2database</groupId>
				<artifactId>h2</artifactId>
				<version>1.4.200</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.restdocs</groupId>
				<artifactId>spring-restdocs-mockmvc</artifactId>
				<version>${spring-restdocs.version}</version>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
			</dependency>
			<dependency>
				<groupId>com.googlecode.junit-toolbox</groupId>
				<artifactId>junit-toolbox</artifactId>
				<version>2.4</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution></distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>codeages</name>
			<email>codeages@howzhi.com</email>
			<organization>codeages</organization>
			<url>https://github.com/spring-skeleton</url>
		</developer>
	</developers>


	<scm>
		<url>https://github.com/spring-skeleton/framework-boot</url>
		<connection>https://github.com/spring-skeleton/framework-boot.git</connection>
		<developerConnection>scm:git:https://github.com/spring-skeleton/framework-boot.git</developerConnection>
		<tag>${project.version}</tag>
	</scm>

	<!--发布到maven仓库-->
	<distributionManagement>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<build>
		<finalName>framework-boot</finalName>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
					<configuration>
						<source>${java.version}</source>
						<target>${java.version}</target>
						<encoding>${compiler.encoding}</encoding>
						<annotationProcessorPaths>
							<path>
								<groupId>org.projectlombok</groupId>
								<artifactId>lombok</artifactId>
								<version>${org.projectlombok.version}</version>
							</path>
							<path>
								<groupId>org.mapstruct</groupId>
								<artifactId>mapstruct-processor</artifactId>
								<version>${org.mapstruct.version}</version>
							</path>
						</annotationProcessorPaths>
						<compilerArgs>
							<compilerArg>
								-Amapstruct.suppressGeneratorTimestamp=true
							</compilerArg>
							<compilerArg>
								-Amapstruct.suppressGeneratorVersionInfoComment=true
							</compilerArg>
						</compilerArgs>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.2.0</version>
					<configuration>
						<excludes>
							<exclude>/application-*.properties</exclude>
						</excludes>
						<archive>
							<manifest>
								<addClasspath>true</addClasspath>
								<classpathPrefix>lib/</classpathPrefix>
								<mainClass>${start-class}</mainClass>
								<useUniqueVersions>false</useUniqueVersions>
							</manifest>
							<manifestEntries>
								<Class-Path>./config/</Class-Path>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>3.1.1</version>
					<executions>
						<execution>
							<id>copy</id>
							<phase>package</phase>
							<goals>
								<goal>copy-dependencies</goal>
							</goals>
							<configuration>
								<outputDirectory>
									./target/lib
								</outputDirectory>
								<includeScope>runtime</includeScope>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.2.1</version>
					<executions>
						<execution>
							<phase>package</phase>
							<goals>
								<goal>jar-no-fork</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.2.0</version>
					<configuration>
						<encoding>${compiler.encoding}</encoding>
						<charset>${compiler.encoding}</charset>
						<docencoding>${compiler.encoding}</docencoding>
					</configuration>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<phase>package</phase>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.12.4</version>
					<configuration>
						<includes>
							<include>**/*Test.java</include>
						</includes>
						<excludes>
							<exclude>**/BaseTest.java</exclude>
						</excludes>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.8</version>
					<executions>
						<execution>
							<id>package</id>
							<phase>package</phase>
							<goals>
								<goal>run</goal>
							</goals>
							<configuration>
								<tasks>
									<copy todir="${project.build.directory}/${project.name}/lib" overwrite="true">
										<fileset dir="${project.build.directory}/lib">
											<include name="*.jar"/>
										</fileset>
									</copy>
									<copy tofile="${project.build.directory}/${project.name}/${project.name}.jar" file="${project.build.directory}/${project.name}.jar" overwrite="true"/>
									<mkdir dir="${project.build.directory}/${project.name}/config" />
									<copy todir="${project.build.directory}/${project.name}/config" overwrite="true">
										<fileset dir="src/main/resources">
											<include name="application-*.properties"/>
										</fileset>
									</copy>
								</tasks>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>com.codeages</groupId>
					<artifactId>generate-bin</artifactId>
					<version>1.0.3-RELEASE</version>
					<executions>
						<execution>
							<id>package</id>
							<phase>package</phase>
							<goals>
								<goal>generate-bin</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<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>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
			</plugin>
		</plugins>
	</build>
</project>
