今天用maven打包時,提示程序包com.aspose.slides不存在
原來第三方jar是直接導入的,打包時沒找到
那項目中帶有第三方jar包,怎么打包?
方法:
1、根路徑建立lib包,將第三方jar復制進去
2、在pom.xml文件中
(1)dependency部分加入
<dependency> <groupId>aspose.slides</groupId> <artifactId>slides</artifactId> <version>15.9.0</version> <scope>system</scope> <systemPath>${basedir}/lib/aspose.slides-15.9.0.jar</systemPath> </dependency>
(2)build部分
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- 加入部分開始-->
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
<!-- 加入部分結束-->
</plugin>
</plugins>
</build>
修改后打包成功