<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>org.activiti</groupId>
	<artifactId>workflow-server</artifactId>
	<version>6.0.0</version>
	<name>workflow-server</name>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<!-- Libraries versions -->
		<activiti.version>6.1.1</activiti.version>
		<druid.version>1.1.13</druid.version>
		<sqljdbc4.version>4.0</sqljdbc4.version>
		<sqljdbc4.version>4.0</sqljdbc4.version>
		<spring-cloud.version>2020.0.4</spring-cloud.version>
		<java.jwt.version>3.7.0</java.jwt.version>
	</properties>
	
	<!--指定父级依赖 -->
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.4.6</version>
		<relativePath /> <!-- lookup parent from repository -->
	</parent>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-dependencies</artifactId>
				<version>${spring-cloud.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

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

		<dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-bootstrap</artifactId>
        </dependency>

		<!-- Eureka服务发现注册 -->
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
		</dependency>

		<!-- Feign 声明式服务 -->
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-openfeign</artifactId>
		</dependency>
		
		<!-- spring cloud config 客户端包 -->
		<dependency>
		    <groupId>org.springframework.cloud</groupId>
		    <artifactId>spring-cloud-starter-config</artifactId>
		</dependency>
		
        <dependency>
		    <groupId>org.apache.el</groupId>
		    <artifactId>com.springsource.org.apache.el</artifactId>
		    <version>7.0.26</version>
		</dependency>

		<!--jwt 权限验证 -->
		<dependency>
			<groupId>com.auth0</groupId>
			<artifactId>java-jwt</artifactId>
			<version>${java.jwt.version}</version>
		</dependency>
		

		<!-- JODA TIME -->
		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time-hibernate</artifactId>
			<version>1.3</version>
		</dependency>

<!-- 		<dependency> -->
<!-- 			<groupId>commons-validator</groupId> -->
<!-- 			<artifactId>commons-validator</artifactId> -->
<!-- 			<version>1.5.1</version> -->
<!-- 		</dependency> -->

		<!-- Activiti -->
		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-engine</artifactId>
			<version>${activiti.version}</version>
		</dependency>

<!--		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-spring</artifactId>
			<version>${activiti.version}</version>
		</dependency>-->

<!-- 		<dependency> -->
<!-- 			<groupId>org.activiti</groupId> -->
<!-- 			<artifactId>activiti-rest</artifactId> -->
<!-- 			<version>${activiti.version}</version> -->
<!-- 		</dependency> -->

		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-bpmn-model</artifactId>
			<version>${activiti.version}</version>
		</dependency>

		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-bpmn-converter</artifactId>
			<version>${activiti.version}</version>
		</dependency>

		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-json-converter</artifactId>
			<version>${activiti.version}</version>
		</dependency>


		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-bpmn-layout</artifactId>
			<version>${activiti.version}</version>
		</dependency>

		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-process-validation</artifactId>
			<version>${activiti.version}</version>
		</dependency>
		
		<dependency>
		    <groupId>org.springframework</groupId>
		    <artifactId>spring-jdbc</artifactId>
		</dependency>

		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid</artifactId>
			<version>${druid.version}</version>
		</dependency>


		<dependency>
		    <groupId>com.microsoft.sqlserver</groupId>
		    <artifactId>mssql-jdbc</artifactId>
		</dependency>

		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.uuid</groupId>
			<artifactId>java-uuid-generator</artifactId>
			<version>3.1.0</version>
		</dependency>

		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz</artifactId>
		</dependency>
		
		<!-- 增加MYSQL数据库的连接 -->
		<dependency>
		    <groupId>mysql</groupId>
		    <artifactId>mysql-connector-java</artifactId>
		</dependency>
		
	
		<!-- 数据库架构迁移到最新版本（兼容SQL SERVER 2014） -->
		<dependency>
		    <groupId>org.flywaydb</groupId>
		    <artifactId>flyway-core</artifactId>
    		<version>5.2.4</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>


	<build>
		<!--默认源代码目录 -->
		<sourceDirectory>src/main/java </sourceDirectory>
		<!--默认测试源代码目录 -->
		<testSourceDirectory>src/test/java</testSourceDirectory>
		<!--默认资源目录 -->
		<resources>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
		</resources>
		<!--默认测试资源目录 -->
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
			</testResource>
		</testResources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<skip>true</skip>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<!-- 指定打包的jar包输出路径 -->
					<outputDirectory>${project.build.directory}/WorkflowServer</outputDirectory>
					<archive>
						<addMavenDescriptor>false</addMavenDescriptor>
						<manifest>
							<addClasspath>true</addClasspath>
							<classpathPrefix>lib/</classpathPrefix>
							<mainClass>com.leanwo.activiti.WorkflowApp</mainClass>
						</manifest>
						<manifestEntries>
							<Class-Path>resources/</Class-Path>
						</manifestEntries>
					</archive>
					<!--注意这玩意从编译结果目录开始算目录结构-->
					<excludes>				         
				         <exclude>**/*.yml</exclude>
				         <exclude>**/*.xml</exclude>
				         <exclude>**/*.bat</exclude>
				         <exclude>**/*.properties</exclude>
				         <exclude>**/*.sql</exclude>
				         <exclude>**/*.txt</exclude>
				         <exclude>**/*.jks</exclude>
				         <exclude>webapp-app/**</exclude>
				     </excludes>
				</configuration>
			</plugin>

			<!-- 分离lib -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/WorkflowServer/lib</outputDirectory>
							<excludeTransitive>false</excludeTransitive>
							<stripVersion>false</stripVersion>
							<!-- 依赖包的作用域 -->
							<includeScope>runtime</includeScope>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- 复制资源文件 -->
			
			<!-- 复制资源文件 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<!-- 资源文件输出目录 -->
							<outputDirectory>${project.build.directory}/WorkflowServer/resources</outputDirectory>
							<resources>
								<resource>
									<directory>src/main/resources</directory>
									<excludes>
										<exclude>*.bat</exclude>
									</excludes>
								</resource>
							</resources>
						</configuration>
					</execution>
					
					<execution>
						<id>copy-dependencies-bat</id>
						<phase>package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<!-- 资源文件输出目录 -->
							<outputDirectory>${project.build.directory}/WorkflowServer</outputDirectory>
							<resources>
								<resource>
									<directory>src/main/resources</directory>
									<includes>
										<include>*.bat</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	
</project>