apache / servicecomb-samples

Apache servicecomb
https://servicecomb.apache.org/
Apache License 2.0
499 stars 144 forks source link

org.apache.servicecomb:java-chassis-bom:${project.version} #71

Closed split47 closed 3 years ago

split47 commented 3 years ago

我不知道我这样引用是否正确,我在我的项目中使用了

org.apache.servicecomb java-chassis-parent 2.1.5

但是无法启动,因为我必须在我的项目中规定2.1.5 否则会提示 [ERROR] The build could not read 1 project -> [Help 1] [ERROR]
[ERROR] The project com.jdkj:service-comb-parent:0.0.1 (/Volumes/SSD/SVNProjects/ServiceComb/TEST/0x02/ServiceCombParent/pom.xml) has 1 error [ERROR] Non-resolvable import POM: Failure to find org.apache.servicecomb:java-chassis-bom:pom:0.0.1 in https://maven.aliyun.com/repository/central was cached in the local repository, resolution will not be reattempted until the update interval of alimaven has elapsed or updates are forced @ org.apache.servicecomb:java-chassis-dependencies:2.1.5, /Users/matcha/.m2/repository/org/apache/servicecomb/java-chassis-dependencies/2.1.5/java-chassis-dependencies-2.1.5.pom, line 876, column 19 -> [Help 2] [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 [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

于是我找到了在java-chassis-dependencies-2.1.5.pom中876行有如下内容

org.apache.servicecomb java-chassis-bom ${project.version} pom import

我想知道是不是我使用的方式错误,这样导致我无法规定自己项目的版本号

liubao68 commented 3 years ago

从日志看,应该是POM格式不对,导致版本不对。 你可以参考例子来写POM。

有个maven的原理介绍,参考: http://servicecomb.apache.org/cn/docs/maven_dependency_management/