290 lines
8.1 KiB
XML
290 lines
8.1 KiB
XML
<?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>
|
||
<parent>
|
||
<groupId>com.sunfintech</groupId>
|
||
<artifactId>sunpls</artifactId>
|
||
<version>0.0.1-SNAPSHOT</version>
|
||
<relativePath>../../pom.xml</relativePath>
|
||
</parent>
|
||
<artifactId>sunpls-provider-gateway</artifactId>
|
||
<name>sunpls-provider-gateway</name>
|
||
<url>http://maven.apache.org</url>
|
||
<properties>
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
</properties>
|
||
<dependencies>
|
||
|
||
<dependency>
|
||
<groupId>com.sunfintech</groupId>
|
||
<artifactId>sunpls-common</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.sunfintech</groupId>
|
||
<artifactId>sunpls-dao</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.sunfintech</groupId>
|
||
<artifactId>sunpls-base</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.sunfintech</groupId>
|
||
<artifactId>sunpls-facade</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.sunfintech</groupId>
|
||
<artifactId>sunpls-activiti</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.sunfintech</groupId>
|
||
<artifactId>sunpls-cache</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.sunfintech</groupId>
|
||
<artifactId>sunpls-provider-common</artifactId>
|
||
<version>0.0.1-SNAPSHOT</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.apache.zookeeper</groupId>
|
||
<artifactId>zookeeper</artifactId>
|
||
<exclusions>
|
||
<exclusion>
|
||
<groupId>org.slf4j</groupId>
|
||
<artifactId>slf4j-log4j12</artifactId>
|
||
</exclusion>
|
||
<exclusion>
|
||
<groupId>log4j</groupId>
|
||
<artifactId>log4j</artifactId>
|
||
</exclusion>
|
||
</exclusions>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.101tec</groupId>
|
||
<artifactId>zkclient</artifactId>
|
||
<exclusions>
|
||
<exclusion>
|
||
<groupId>org.slf4j</groupId>
|
||
<artifactId>slf4j-log4j12</artifactId>
|
||
</exclusion>
|
||
<exclusion>
|
||
<groupId>log4j</groupId>
|
||
<artifactId>log4j</artifactId>
|
||
</exclusion>
|
||
</exclusions>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>commons-httpclient</groupId>
|
||
<artifactId>commons-httpclient</artifactId>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>junit</groupId>
|
||
<artifactId>junit</artifactId>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.mockito</groupId>
|
||
<artifactId>mockito-all</artifactId>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.hamcrest</groupId>
|
||
<artifactId>hamcrest-library</artifactId>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.easytesting</groupId>
|
||
<artifactId>fest-assert</artifactId>
|
||
<version>1.4</version>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.antgroup</groupId>
|
||
<artifactId>zmxy</artifactId>
|
||
<version>20171212112759</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>net.sf.json-lib</groupId>
|
||
<artifactId>json-lib</artifactId>
|
||
<version>2.3</version>
|
||
<classifier>jdk15</classifier>
|
||
</dependency>
|
||
</dependencies>
|
||
|
||
<build>
|
||
<finalName>sunpls-provider-gateway</finalName>
|
||
<resources>
|
||
<resource>
|
||
<targetPath>${project.build.directory}/classes</targetPath>
|
||
<directory>src/main/resources</directory>
|
||
<excludes>
|
||
<exclude>profiles/**/*</exclude>
|
||
<exclude>resource/*</exclude>
|
||
</excludes>
|
||
</resource>
|
||
<resource>
|
||
<targetPath>${project.build.directory}/classes</targetPath>
|
||
<directory>src/main/resources/profiles/${profiles.active}</directory>
|
||
</resource>
|
||
<!-- 结合com.alibaba.dubbo.container.Main -->
|
||
<resource>
|
||
<targetPath>${project.build.directory}/classes/META-INF/spring</targetPath>
|
||
<directory>src/main/resources/spring</directory>
|
||
<filtering>true</filtering>
|
||
<includes>
|
||
<include>applicationContext.xml</include>
|
||
</includes>
|
||
</resource>
|
||
</resources>
|
||
<plugins>
|
||
|
||
<!--打成jar时,设定manifest的参数,比如指定运行的Main class,还有依赖的jar包,加入classpath中 -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-jar-plugin</artifactId>
|
||
<configuration>
|
||
<classesDirectory>target/classes/</classesDirectory>
|
||
<archive>
|
||
<manifest>
|
||
<mainClass>com.sunfintech.startup.GatewayProvider</mainClass>
|
||
<!-- 打包时 MANIFEST.MF文件不记录的时间戳版本 -->
|
||
<useUniqueVersions>false</useUniqueVersions>
|
||
<addClasspath>true</addClasspath>
|
||
<classpathPrefix>lib/</classpathPrefix>
|
||
</manifest>
|
||
<manifestEntries>
|
||
<Class-Path>.</Class-Path>
|
||
</manifestEntries>
|
||
</archive>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<!-- 用于复制依赖的jar包到指定的文件夹里 -->
|
||
<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>
|
||
<type>jar</type>
|
||
<includeTypes>jar</includeTypes>
|
||
<outputDirectory>
|
||
${project.build.directory}/lib
|
||
</outputDirectory>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
<!-- 编译Java源码,一般只需设置编译的jdk版本 -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-compiler-plugin</artifactId>
|
||
<version>3.1</version>
|
||
<configuration>
|
||
<source>1.8</source>
|
||
<target>1.8</target>
|
||
<encoding>utf8</encoding>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<!-- 跳过单元测试的运行,也跳过测试代码的编译 -->
|
||
<plugin>
|
||
<artifactId>maven-surefire-plugin</artifactId>
|
||
<version>2.10</version>
|
||
<configuration>
|
||
<skip>true</skip>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<!-- 用来处理资源文件 -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-resources-plugin</artifactId>
|
||
<version>2.7</version>
|
||
<configuration>
|
||
<encoding>UTF-8</encoding>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<!-- 用于把多个jar包,打成1个jar包,一般Java项目都会依赖其他第三方jar包,最终打包时,希望把其他jar包包含在一个jar包里 -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-shade-plugin</artifactId>
|
||
<version>1.4</version>
|
||
<executions>
|
||
<execution>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>shade</goal>
|
||
</goals>
|
||
<configuration>
|
||
<transformers>
|
||
<transformer
|
||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||
<mainClass>com.sunfintech.startup.GatewayProvider</mainClass>
|
||
</transformer>
|
||
<transformer
|
||
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
|
||
<resource>META-INF/spring.handlers</resource>
|
||
</transformer>
|
||
<transformer
|
||
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
|
||
<resource>META-INF/spring.schemas</resource>
|
||
</transformer>
|
||
</transformers>
|
||
<filters>
|
||
<filter>
|
||
<artifact>*:*</artifact>
|
||
<excludes>
|
||
<exclude>META-INF/*.SF</exclude>
|
||
<exclude>META-INF/*.DSA</exclude>
|
||
<exclude>META-INF/*.RSA</exclude>
|
||
</excludes>
|
||
</filter>
|
||
</filters>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
|
||
<profiles>
|
||
<profile>
|
||
<!-- 本地开发环境 及 wx -->
|
||
<id>dev</id>
|
||
<properties>
|
||
<profiles.active>dev</profiles.active>
|
||
</properties>
|
||
<activation>
|
||
<activeByDefault>true</activeByDefault>
|
||
</activation>
|
||
</profile>
|
||
<profile>
|
||
<!-- 测试环境 嘉兴银行测试环境 -->
|
||
<id>test</id>
|
||
<properties>
|
||
<profiles.active>test</profiles.active>
|
||
</properties>
|
||
</profile>
|
||
<profile>
|
||
<!-- 生产环境 -->
|
||
<id>pro</id>
|
||
<properties>
|
||
<profiles.active>pro</profiles.active>
|
||
</properties>
|
||
</profile>
|
||
</profiles>
|
||
|
||
</project>
|