|
<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>
<parent>
<groupId>com.ai.ipu.server</groupId>
<artifactId>ipu-rest-libs</artifactId>
<version>3.1-SNAPSHOT</version>
</parent>
<artifactId>ebc-restful</artifactId>
<packaging>jar</packaging>
<name>ebc-restful</name>
<repositories>
<!-- IPU相关仓库 -->
<repository>
<id>ipu</id>
<name>ipu repository</name>
<url>http://114.215.100.48:9090/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<properties>
<start-class>com.ai.ipu.server.demo.IpuRestDemoStart</start-class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<ipu>3.1-SNAPSHOT</ipu>
<msgframe>1.9.2</msgframe>
<jms>1.1</jms>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- 由于重写了spring的部分类,需要置前引入,提高优先级 -->
<dependency>
<groupId>com.ai.ipu.server</groupId>
<artifactId>ipu-restful</artifactId>
</dependency>
<!-- spring监听,admin-client会引入actuator -->
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
</dependency>
<dependency>
<groupId>com.ai.wade</groupId>
<artifactId>wade-data</artifactId>
</dependency>
<dependency>
<groupId>com.ai.ipu</groupId>
<artifactId>ipu-server-web</artifactId>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
<version>${jms}</version>
</dependency>
<dependency>
<groupId>com.ai.ipu</groupId>
<artifactId>ipu-sql-mgmt</artifactId>
<version>${ipu}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${compiler-version}</source>
<target>${compiler-version}</target>
<encoding>${encoding}</encoding>
<!-- 通过此方法添加本地jar -->
<compilerArguments>
<bootclasspath>${JAVA_HOME}/jre/lib/rt.jar</bootclasspath>
<extdirs>${project.basedir}/libs</extdirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!-- ==========应用包和依赖包分离的打包方法================ -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>${encoding}</encoding>
<resources>
<resource>
<directory>${project.build.directory}/classes</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
<include>**/*.yaml</include>
<include>**/*.yml</include>
<include>**/*.txt</include>
</includes>
</resource>
</resources>
<!-- 表示把配置文件拷到和jar包同一个路径下 -->
<outputDirectory>
${project.build.directory}/config
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- 复制依赖包 -->
<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}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<!--生成的jar中,不要包含pom.xml和pom.properties这两个文件-->
<addMavenDescriptor>false</addMavenDescriptor>
<manifest>
<!--是否要把第三方jar放到manifest的classpath中-->
<addClasspath>true</addClasspath>
<!--生成的manifest中classpath的前缀,lib存放第三方jar-->
<classpathPrefix>lib/</classpathPrefix>
<!--应用的main class-->
<mainClass>${start-class}</mainClass>
<!-- 去掉jar后的时间戳 -->
<useUniqueVersions>false</useUniqueVersions>
</manifest>
<!-- 自定义的MANIFEST.MF参数 -->
<manifestEntries>
<!-- 增加classpath目录config -->
<Class-Path>./config/</Class-Path>
</manifestEntries>
</archive>
<!--过滤掉不希望包含在jar中的文件-->
<excludes>
<exclude>**/*.properties</exclude>
<exclude>**/*.xml</exclude>
<exclude>**/*.yaml</exclude>
<exclude>**/*.yml</exclude>
<exclude>**/*.txt</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<!-- The configuration of the plugin -->
<configuration>
<!-- Specifies the configuration file of the assembly plugin -->
<descriptors>
<descriptor>src/main/assembly-package.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<finalName>${project.artifactId}</finalName>
</build>
</project>
|