Dubbo下載-從missing artifactId提及

項目pom文件引入dubbo 報 missing artifactIdhtml

https://github.com/dangdangdotcom/dubbox
從GitHub上直接下載解壓包, 最好下載分支java


這段能夠不看git

解壓到D盤 進入
D:\Users\dubbox-master\dubbox-mastergithub

按住shfit 右鍵 -打開命令行窗口spring

執行 mvn install Dmaven.test.skip=true 報錯apache

看[error] 那一行
Unknown lifecycle phase "'-Dmaven.test.skip=true'". You must specify

改成 mvn clean package -Dmaven.test.skip=true
api

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:1.4:
shade (default) on project dubbo: Error creating shaded jar: Some problems were

報錯的緣由可能和 使用 shade插件打包有關, 懶得找了 可經過mvn -X package 查看打包報錯日誌
實際上不是 就是少了一個spring包緩存


看本地倉庫打包只打了一半 D:\maven_repo\com\alibaba\dubbo\2.8.4框架

從新下載maven

git 地址
下載 dubbox-2.8.4 tar.gz 另外一個是有源代碼的文件

解壓而後, E:\dubbox-dubbox-2.8.4\dubbox-dubbox-2.8.4目錄下執行

mvn install -X -f pom.xml -D maven.test.skip=true

[ERROR] Non-resolvable import POM: Failure to find org.springframework:spring-fr
amework-bom:pom:3.2.9.RELEASE in http://maven.cnsuning.com/nexus/content/reposit
ories/suningFramework was cached in the local repository, resolution will not be
 reattempted until the update interval of central has elapsed or updates are for
ced @ com.alibaba:dubbo-parent:2.8.4, E:\dubbox-dubbox-2.8.4\dubbox-dubbox-2.8.4
\pom.xml, line 164, column 16
 for project
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:216)

D:\maven_repo\org\springframework\spring-framework-bom\3.2.9.RELEASE
裏文件不全 應該是下載失敗
Maven默認會使用本地緩存的庫來編譯工程,而上次下載的庫失敗

-X命令能夠看是少了哪一個插件致使的
因而去搜 spring-framework-bom下載
http://repo.spring.io/release/org/springframework/spring-framework-bom/
找到 /3.2.9.RELEASE/, 下載pom文件,
從新命名爲 pom.xml
在該目錄下 按住shift 右鍵打開命令行 輸入
mvn install -f pom.xml -D maven.test.skip=true

D:\maven_repo\org\springframework\spring-bom\3.2.9.RELEASE 本地倉庫有了

從新回到 回到dubbo目錄下執行 ,報新的錯

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
3.2:compile (default-compile) on project dubbo-monitor-simple: Compilation failu
re: Compilation failure:
[ERROR] \dubbox-dubbox-2.8.4\dubbox-dubbox-2.8.4\dubbo-simple\dubbo-monitor-simp
le\src\main\java\com\alibaba\dubbo\monitor\simple\SimpleMonitorService.java:[372
,18] 錯誤: 沒法訪問Drawable
[ERROR] \dubbox-dubbox-2.8.4\dubbox-dubbox-2.8.4\dubbo-simple\dubbo-monitor-simp
le\src\main\java\com\alibaba\dubbo\monitor\simple\SimpleMonitorService.java:[374
,14] 錯誤: 沒法訪問PublicCloneable

因而打開SimpleMonitorService.java 文件, 發現用到 org.jfree.chart.JFreeChart, 估計又是這個jar包沒有
發現這個網站第一個接口 就是報錯的這個類
http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/util/package-frame.html

因而找到先已有的項目pom文件引入, 發現我配置文件裏的 鏡像庫是能夠下載此包的

<dependency>  
    <groupId>jfreechart</groupId>  
    <artifactId>jfreechart</artifactId>  
        <version>1.0.0</version>  
</dependency>

因而找到
E:\dubbox-dubbox-2.8.4\dubbox-dubbox-2.8.4\dubbo-simple\dubbo-monitor-simple
裏的pom文件,

jfree
jfreechart

沒找到版本號, 那麼定義在父版本,

標籤,一層一層往上找, E:\dubbox-dubbox-2.8.4\dubbox-dubbox-2.8.4裏發現
1.0.13
改成 1.0.0

再次執行命令

mvn install -X -f pom.xml -D maven.test.skip=true

D:\maven_repo\com\alibaba\dubbo\2.8.4 maven倉庫裏已經所有都有了
並且 編譯完成後,每一個文件夾下,會生成對應的target文件,裏面放着咱們須要的jar包、war包等
例如 E:\dubbox-dubbox-2.8.4\dubbox-dubbox-2.8.4\dubbo-admin\target

至此 , 全部的dubbo包都在本地倉庫安裝完畢

<dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>dubbo</artifactId>
        <version>2.8.4</version>
        <exclusions>
            <exclusion>
                <artifactId>spring</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
        </exclusions>
    </dependency>
相關文章
相關標籤/搜索