本地jar包 maven 引入方式

做下记录,以下方法不建议在线上使用,线上使用的最佳方式是上传到nexus直接使用

       <dependency>
            <groupId>com.fadada.api</groupId>
            <artifactId>fadada_api_sdk</artifactId>
            <version>1.0.0</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/src/main/resources/libs/fadada_api_sdk.jar</systemPath>
        </dependency>

要引插件,要不然线上会报错,类找不到

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <includeSystemScope>true</includeSystemScope>
                </configuration>
            </plugin>
posted @ 2021-06-21 12:02  ThomasChang0109  阅读(145)  评论(2)    收藏  举报