Maven IDEA打包Maven时出现Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin解决方法

一、准备工作
在这里插入图片描述

<dependency>
			<groupId>lan</groupId>
			<artifactId>lan</artifactId>
			<version>1.0.0</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/src/main/resources/lib/xxx.jar
			</systemPath>
</dependency>

把自己的xxx.jar放进lib ,在pom文件里面还要加下面这行

<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<mainClass>com.xxx.BootApplication</mainClass>
					<includeSystemScope>true</includeSystemScope><!-- 把第三方jar包加进去 -->
				</configuration>

在这里插入图片描述
加上述这一句即可。

二、使用
在这里插入图片描述
在这里插入图片描述
导入进去就可以正常使用了。

发布了32 篇原创文章 · 获赞 13 · 访问量 1515

猜你喜欢

转载自blog.csdn.net/weixin_38068605/article/details/103984556