Fork me on GitHub

IDEA pom中引用本地lib下的jar包

在将word文档转为图片时,使用的aspose-words,因为其转换完的图片带有水印,所以在网上找了一个破解版的jar包。现需要将其引入自己的maven项目。

  1. 添加依赖如下:

    <dependency>
                <groupId>com.aspose</groupId>
                <artifactId>aspose-words</artifactId>
                <version>15.8.0-crack</version>
                <!--使用本地jar-->
                <scope>system</scope>
        		<!--jar包地址-->
                <systemPath>${project.basedir}/lib/aspose-words-15.8.0-crack.jar</systemPath>
    </dependency>
    

    对应的目录路径结构:

  2. 打包插件配置:

    <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <!--关键地方  包含本地jar-->
                    <configuration>
                        <includeSystemScope>true</includeSystemScope>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    
posted @ 2021-08-11 09:22  ayueC  阅读(992)  评论(0)    收藏  举报