But in times of crisis the wise build bridges, while the foolish build barriers. 危机四伏之时,智者筑桥,愚者设障。
引入外部jar
<dependency>
<groupId>cn.emay</groupId>
<artifactId>eucp.sms.sdk</artifactId>
<version>1.3.3</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/eucp-sms-sdk-1.3.3.jar</systemPath>
</dependency>
pom.xml配置
<properties>
<skipTests>true</skipTests>
</properties>
<build>
<finalName>saas-client</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!--maven项目引入外部jar(打包是jar形式springboot项目)-->
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!--使单元测试不影响项目的编译-->
<!--<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>-->
</plugins>
<!--<resources>
<resource>
<directory>src/main/resources/lib</directory>
<targetPath>BOOT-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<targetPath>BOOT-INF/classes/</targetPath>
</resource>
</resources>-->
</build>