<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>com.gdxsoft</groupId>
	<artifactId>emp-sqlserver-profiler</artifactId>
	<version>1.0.3</version>
	<packaging>jar</packaging>

	<name>SqlServer Profiler</name>
	<url>http://maven.apache.org</url>

	<description>SqlServer profiler java console</description>

	<developers>
		<developer>
			<id>guolei</id>
			<name>郭磊</name>
			<url>www.gdxsoft.com</url>
			<email>guolei@gdxsoft.com</email>
		</developer>
		<developer>
			<id>jinzhappeng</id>
			<name>靳朝鹏</name>
			<email>jinzhaopeng@126.com</email>
		</developer>
	</developers>
	<organization>
		<name>gdxsoft</name>
		<url>www.gdxsoft.com</url>
	</organization>
	<licenses>
		<license>
			<name>MIT License</name>
			<url>
				https://github.com/gdx1231/emp-sqlserver-profiler/blob/main/LICENSE</url>
			<distribution>repo</distribution>
			<comments>MIT license</comments>
		</license>
	</licenses>
	<!-- The scm url must start with 'scm:' -->
	<scm>
		<url>https://github.com/gdx1231/emp-sqlserver-profiler</url>
		<connection>scm:git:https://github.com/gdx1231/emp-sqlserver-profiler</connection>
		<developerConnection>
			scm:git:git@github.com:gdx1231/emp-sqlserver-profiler.git</developerConnection>
	</scm>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.gdxsoft.easyweb</groupId>
			<artifactId>emp-script</artifactId>
			<version>[1.1.8,]</version>
			<exclusions>
				<exclusion>
					<groupId>org.jodconverter</groupId>
					<artifactId>*</artifactId>
				</exclusion>
				<exclusion>
					<groupId>commons-fileupload</groupId>
					<artifactId>commons-fileupload</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.jsoup</groupId>
					<artifactId>jsoup</artifactId>
				</exclusion>
				<exclusion>
					<groupId>com.alibaba</groupId>
					<artifactId>druid</artifactId>
				</exclusion>
				<exclusion>
					<groupId>jdbf</groupId>
					<artifactId>jdbf</artifactId>
				</exclusion>
				<exclusion>
					<groupId>redis.clients</groupId>
					<artifactId>jedis</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>com.gdxsoft.easyweb</groupId>
			<artifactId>emp-script-utils</artifactId>
			<version>[1.1.8,]</version>
			<exclusions>
				<exclusion>
					<groupId>org.apache.httpcomponents</groupId>
					<artifactId>*</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.commons</groupId>
					<artifactId>commons-exec</artifactId>
				</exclusion>
				<exclusion>
					<groupId>net.coobird</groupId>
					<artifactId>thumbnailator</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>1.2.13</version>
			<scope>runtime</scope>
		</dependency>

		<!--
		https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
		<dependency>
			<groupId>com.microsoft.sqlserver</groupId>
			<artifactId>mssql-jdbc</artifactId>
			<version>10.2.1.jre8</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>3.8.1</version>
			<scope>test</scope>
		</dependency>
		<!-- 
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-jdk14</artifactId>
			<version>1.7.36</version>
			<scope>test</scope>
		</dependency>
		-->

	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<version>3.2.1</version>
				<configuration>
					<warSourceDirectory>WebRoot</warSourceDirectory>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>3.6.1</version>
				<executions>
					<execution>
						<id>copy</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/lib</outputDirectory>
							<excludeTransitive>false</excludeTransitive>
							<stripVersion>false</stripVersion>
							<excludeArtifactIds>*</excludeArtifactIds>
							<includeScope>runtime</includeScope>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.1.0</version>
				<configuration>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
				<executions>
					<execution>
						<id>copy-spring-boot-resources</id>
						<phase>validate</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<encoding>utf-8</encoding>
							<outputDirectory>
								${basedir}/../../workspace.newVersion/allclass/classes</outputDirectory>
							<resources>
								<resource>
									<directory>${basedir}/target/classes</directory>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.8</version>
				<executions>
					<execution>
						<id>copy-lib-src-webapps</id>
						<phase>package</phase>
						<configuration>
							<target>
								<echo>
									copy ${project.build.finalName}.jar to
									${basedir}/../../workspace.newVersion/allclass/lib/</echo>
								<copy
									todir="${basedir}/../../workspace.newVersion/allclass/lib/">
									<fileset dir="${project.build.directory}">
										<include
											name="${project.build.finalName}*" />
									</fileset>
								</copy>
								<echo>
									copy ${project.build.finalName}/classes/*
									to
									${basedir}/../../workspace.newVersion/allclass/classes/</echo>
								<copy
									todir="${basedir}/../../workspace.newVersion/allclass/classes/">
									<fileset
										dir="${project.build.directory}/classes">
										<include name="*" />
									</fileset>
								</copy>
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-dependency-plugin</artifactId>
										<versionRange>[1.0.0,)</versionRange>
										<goals>
											<goal>copy-dependencies</goal>
											<goal>unpack</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

	</build>

	<profiles>
		<profile>
			<!-- 打包成一个jar -->
			<!-- mvn -P onepackage package -->
			<id>onepackage</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-assembly-plugin</artifactId>
						<configuration>
							<appendAssemblyId>false</appendAssemblyId>
							<descriptorRefs>
								<descriptorRef>jar-with-dependencies</descriptorRef>
							</descriptorRefs>
							<archive>
								<manifest>
									<mainClass>
										com.gdxsoft.sqlProfiler.ProfilerControl</mainClass>
								</manifest>
							</archive>
							<outputDirectory>
								${project.build.directory}/onepackage</outputDirectory>
							<finalName>${project.build.finalName}.onepackage</finalName>
						</configuration>
						<executions>
							<execution>
								<id>make-assembly</id>
								<phase>package</phase>
								<goals>
									<goal>assembly</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<!-- 发布项目 -->
			<!-- mvn clean deploy -P release -->
			<!-- https://issues.sonatype.org/browse/OSSRH-65277 -->
			<!-- https://oss.sonatype.org/ -->
			<id>release</id>
			<build>
				<plugins>
					<!-- Source -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.2.1</version>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<!-- Javadoc -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.2.0</version>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<encoding>UTF-8</encoding>
							<charset>UTF-8</charset>
							<additionalOptions>
								<additionalOption>-Xdoclint:none</additionalOption>
							</additionalOptions>
						</configuration>
					</plugin>
					<!-- GPG -->
					<plugin>
						<!-- 进行延签 -->
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<distributionManagement>
				<snapshotRepository>
					<id>oss</id>
					<url>
						https://oss.sonatype.org/content/repositories/snapshots/</url>
				</snapshotRepository>
				<repository>
					<id>oss</id>
					<url>
						https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
			</distributionManagement>
		</profile>
	</profiles>
</project>
