本地lib包多模块下开发和部署

发布时间 2023-11-09 11:45:13作者: 阿拉蕾家的小铁匠

1 首先可以放到idea的file-project Structure-Global Libraries

2 然后添加到模块,实在不好使就手动加入到pom文件

<dependency>
            <groupId>*</groupId>
            <artifactId>*</artifactId>
            <scope>system</scope>
            <version>1.0</version>
            <systemPath>${project.basedir}/*-1.0.0.jar</systemPath>
</dependency>

3 打包发布修改pom文件

<plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <!--添加如下配置-->
        <configuration>
            <includeSystemScope>true</includeSystemScope>
        </configuration>
        <!--添加如上配置-->
</plugin>