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>