java编译项目代码报错

  1. 报错
    [artifact:mvn] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project xxx-server: Compilation failure: Compilation failure:
    [artifact:mvn] [ERROR] symbol: class Pair
    [artifact:mvn] [ERROR] location: class com.vrts.xxx.
    [artifact:mvn] [ERROR] Translator.java:[191,30] cannot find symbol

解决方法:centos yum安装的maven版本过低,需要升级重新安装maven版本

2.报错
[taskdef] Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.
[typedef] Could not load definitions from resource org/apache/maven/artifact/ant/antlib.xml. It could not be found.
[taskdef] Could not load definitions from resource org/jacoco/ant/antlib.xml. It could not be found.

解决方法:

你可能感兴趣的:(java编译项目代码报错)