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