启动idea项目报错,maven一直出问题!终于解决了!
错误3:java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid'意思是什么使用了一个与编译器内部类不兼容的版本,查了一下网上资料;这个错误的解决办法是:修改ma
起因:从git上克隆项目,打开idea下载依赖的时候报错
错误1:[ERROR] Failed to execute goal on project wvp: Could not resolve dependencies for project com.gbcom:wvp:jar:1.1.0: Could not find artifact com.gbcom:hc_license_proxy:jar:2.6 in aliyunmaven (https://maven.aliyun.com/repository/public) -> [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] DependencyResolutionException - Apache Maven - Apache Software Foundation
这个错误的解决办法是:修改maven的setting.xml的阿里云配置,如果你没问题那就换一个阿里云仓库!!!
解决完之后又报错
错误2:[ERROR] Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.8:check (validate) on project wvp: You have 4854 PMD violations. For more details see: D:\wvp-server\target\pmd.xml -> [Help 1] 我真的服了,这个错误是说Maven 项目编译过程中检查出 PMD 违规;
解决办法:在项目的 pom.xml 文件中对 maven-pmd-plugin 进行相应的配置,忽略pmd校验;
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.8</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
又开始报第三个错了![]()
错误3:java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid'意思是什么使用了一个与编译器内部类不兼容的版本,查了一下网上资料;
解决办法:把 lombok依赖升级 为 1.18.30 ,jdk最新版;
如果还是报这个什么不兼容的错,就clean!我就是这样成功了!!太不容易了
一定要记得右击pom.xml点击maven,选择reload project!!!
错误4:
There are test failures.
Please refer to D:\meshView\mesh-nmp\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
解决办法:跳过test
更多推荐




所有评论(0)