刚从GitHub下载下来的dubbo-admin直接构建汇报如下错误,原因是maven库里没有该dubbo的jar包。
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.alibaba:dubbo-admin:war:2.5.4-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ com.alibaba:dubbo-parent:2.5.4-SNAPSHOT, F:\DevelopTools\dubbo\dubbo-master\pom.xml, line 381, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ com.alibaba:dubbo-parent:2.5.4-SNAPSHOT, F:\DevelopTools\dubbo\dubbo-master\pom.xml, line 367, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing. @ com.alibaba:dubbo-parent:2.5.4-SNAPSHOT, F:\DevelopTools\dubbo\dubbo-master\pom.xml, line 451, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building dubbo-admin 2.5.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.alibaba:dubbo:jar:2.5.4-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.397 s
[INFO] Finished at: 2017-03-16T21:38:28+08:00
[INFO] Final Memory: 8M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project dubbo-admin: Could not resolve dependencies for project com.alibaba:dubbo-admin:war:2.5.4-SNAPSHOT: Could not find artifact com.alibaba:dubbo:jar:2.5.4-SNAPSHOT -> [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/DependencyResolutionException
意思是maven库里没有dubbo2.5.4-SNAPSHOT.jar这个版本的dubbo的jar包,把dubbo-admin项目的pom.xml的
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>${project.parent.version}</version>
</dependency>
改为
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>2.5.3</version>
</dependency>
重新build即可!