编译失败的报错信息如下D:\Software\Java\jdk1.8.0_351\bin\java.exe -Dmaven.multiModuleProjectDirectory=D:\04_01存档资料\project\Seconde_hand\Seconde_hand -Djansi.passthrough=true -Dmaven.home=D:\Software\maven\apache-maven-3.9.0 -Dclassworlds.conf=D:\Software\maven\apache-maven-3.9.0\bin\m2.conf "-Dmaven.ext.class.path=D:\04_02 IJ_ java\Idea2023\IntelliJ IDEA 2023.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\04_02 IJ_ java\Idea2023\IntelliJ IDEA 2023.2\lib\idea_rt.jar=19776:D:\04_02 IJ_ java\Idea2023\IntelliJ IDEA 2023.2\bin" -Dfile.encoding=UTF-8 -classpath D:\Software\maven\apache-maven-3.9.0\boot\plexus-classworlds-2.6.0.jar;D:\Software\maven\apache-maven-3.9.0\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2023.2 -s D:\Software\maven\apache-maven-3.9.0\conf\settings.xml -Dmaven.repo.local=D:\Software\maven\repository install -P !JDK-1.8
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< com.campus:second-hand >-----------------------
[INFO] Building second-hand 1.0.0
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ second-hand ---
[INFO] Copying 1 resource from src\main\resources to target\classes
[INFO] Copying 56 resources from src\main\resources to target\classes
[INFO]
[INFO] --- compiler:3.10.1:compile (default-compile) @ second-hand ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ second-hand ---
[INFO] skip non existing resourceDirectory D:\04_01存档资料\project\Seconde_hand\Seconde_hand\src\test\resources
[INFO]
[INFO] --- compiler:3.10.1:testCompile (default-testCompile) @ second-hand ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to D:\04_01存档资料\project\Seconde_hand\Seconde_hand\target\test-classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.243 s
[INFO] Finished at: 2025-09-12T20:55:07+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:testCompile (default-testCompile) on project second-hand: Fatal error compiling: 无效的标记: --release -> [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
| 改 IDEA 设置(推荐) | Settings ➜ Build Tools ➜ Maven ➜ Importing & Runner ➜ 把 JDK for importer / Runner 全部改成 JDK 11+ |

4464

被折叠的 条评论
为什么被折叠?



