springboot 项目 引入第三方 springboot jar 包
1、将要被引入 pom.xml 文件
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
修改为
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
2、打成jar 包,放入指定文件夹(可自定义),本项目是放在主目创建lib文件夹下。
3、在引入的项目中选中该jar 包,右键 Add as Libraries
4、pom.xml 文件中
<dependency>
<groupId>com.hy</groupId>
<artifactId>depent-inner</artifactId>
<scope>system</scope>
<version>1.0.0</version>
<systemPath>${project.basedir}/lib/jar-inner-demo-0.0.1-SNAPSHOT.jar</systemPath>
</dependency>
com.hy、depent-inner、1.0.0 可自定义
5、pom.xml 文件中将原有的plugs
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<!-- 打包引入第三方jar-->
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>