2.IDEA错误集-maven-compiler-plugin:3.2

在使用IDEA进行项目开发时遇到了maven-compiler-plugin:3.2编译错误,提示UTF-8编码问题。通过网络搜索,发现解决方案是删除并重新编写pom.xml中JDK版本的相关配置,然后执行install操作,最终成功解决了问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.报错信息:
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ testJson ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ testJson ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to E:\MyJava\JavaTest\4Student\testJson\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.690 s
[INFO] Finished at: 2019-04-15T10:50:45+08:00
[INFO] Final Memory: 10M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project testJson: Fatal error compiling: UTF‐8 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Process finished with exit code 1

2.从网上搜索:
maven-compiler-plugin:3.2:compile (default-compile) on project testJson: Fatal error compiling: UTF‐8

3.解决:最后我把pom.xml文件的jdk版本插件删除,再重新写了一遍.再install了下,成功了.

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值