IntellJ idea maven打包——項目帶有第三方jar包


今天用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>                

修改后打包成功

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM