环境:
- java: 11.0.15.1
- maven: 3.6.3
- idea: 2021.1
项目启动报错
Executing pre-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Running 'before' tasks
Checking sources
Copying resources... [xxx-xxx-loyalty]
Copying resources... [xxx-xxx-core]
Copying resources... [xxx-xxx-common]
Copying resources... [xxx-xxx-api]
Copying resources... [xxx-xxx-adapter]
Parsing java... [xxx-xxx-common]
java: User-specified option "-proc:none" is ignored for "xxx-xxx-common". This compilation parameter is set automatically according to project settings.
java: java.lang.ClassCastException: class com.sun.proxy.$Proxy27 cannot be cast to class com.sun.tools.javac.processing.JavacProcessingEnvironment (com.sun.proxy.$Proxy27 is in unnamed module of loader java.net.URLClassLoader @5ecddf8f; com.sun.tools.javac.processing.JavacProcessingEnvironment is in module jdk.compiler of loader 'app')
java: java.lang.ClassCastException: class com.sun.proxy.$Proxy27 cannot be cast to class com.sun.tools.javac.processing.JavacProcessingEnvironment (com.sun.proxy.$Proxy27 is in unnamed module of loader java.net.URLClassLoader @5ecddf8f; com.sun.tools.javac.processing.JavacProcessingEnvironment is in module jdk.compiler of loader 'app')
Checking dependencies... [xxx-xxx-common]
Dependency analysis found 0 affected files
Errors occurred while compiling module 'accor-dfc-common'
javac 11.0.15.1 was used to compile java sources
Finished, saving caches...
Executing post-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Synchronizing output directories...
2022/5/18, 9:18 上午 - Build completed with 2 errors and 0 warnings in 3 sec, 212 ms
排查: 使用maven命令构建成功,
使用idea内置构建失败
异常原因: maven的问题,具体原因不太清楚
解决:
|