- 问题
在Termianl 输入
mvn clean package -Dmaven.test.skip=true
然后出现以下错误
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project nj_htgl: Compilation failure -> [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/MojoFailureException
- 解决方案
在pom.xml文件中添加
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<!--本地磁盘jdk路径 -->
<executable>C:\Program Files\Java\jdk1.8.0_241\bin\javac</executable>
</configuration>
</plugin>