编译时报错 : dependencies.dependency.version' for com.google.guava:guava:jar is missing.
具体如下
XYSZM00089:presto-audit-plugin leonlai$ mvn clean package -Dmaven.test.skip=true
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.facebook.presto:presto-spi:jar -> version 0.224 vs 0.217 @ line 33, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 56, column 21
[ERROR] 'dependencies.dependency.version' for com.google.guava:guava:jar is missing. @ line 12, column 21
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.facebook.presto:presto-audit-plugin:0.224 (/Users/leonlai/data/data_dev/xy-presto/presto-plugins/presto-audit/presto-audit-plugin/pom.xml) has 1 error
[ERROR] 'dependencies.dependency.version' for com.google.guava:guava:jar is missing. @ line 12, column 21
[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/ProjectBuildingException
原因:没有指定com.google.guava版本
<dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </dependency>
解决:指定guava版本
<dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>28.1-jre</version> </dependency>