IDEA引入外部jar包,打包失败的解决方法

  1. pom引入外部依赖
        <dependency>
            <groupId>com.sys</groupId>
            <artifactId>sys</artifactId>
            <version>1.0.6</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/src/main/resources/lib/jarName.jar</systemPath>
        </dependency>
  1. pom设置build
<build>
        <finalName>jar包名</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <includeSystemScope>true</includeSystemScope>
                </configuration>
            </plugin>
        </plugins>
    </build>

此时打包就大功告成啦!

上一篇:maven聚合项目解析


下一篇:Maven