GitHub項目作爲依賴,供其他項目導入

照着他人文檔操作,出了文檔中沒有出現的異常,故轉載並記錄下異常問題

Failed to execute goal com.github.github:site-maven-plugin:0.12:site (default) on project framework:

Execution default of goal com.github.github:site-maven-plugin:0.12:site failed:

Plugin com.github.github:site-maven-plugin:0.12 or one of its dependencies could not be resolved:

Failed to collect dependencies at com.github.github:site-maven-plugin:jar:0.12 -> com.github.github:github-maven-core:jar:0.12 -> org.eclipse.mylyn.github:org.eclipse.egit.github.core:jar:3.1.0.201310021548-r: Failed to read artifact descriptor for org.eclipse.mylyn.github:org.eclipse.egit.github.core:jar:3.1.0.201310021548-r: Could not transfer artifact org.eclipse.mylyn.github:org.eclipse.egit.github.core:pom:3.1.0.201310021548-r from/to egit (https://repo.eclipse.org/content/repositories/egit-releases/):

Connect to repo.eclipse.org:443 [repo.eclipse.org/198.41.30.233] failed: Connection timed out: connect -> [Help 1]

解決:

maven換成淘寶鏡像解決
    <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>        
    </mirror>
 

同時出現另一個問題:

Failed to execute goal com.github.github:site-maven-plugin:0.12:site (default) on project framework:

Execution default of goal com.github.github:site-maven-plugin:0.12:site failed:

Plugin com.github.github:site-maven-plugin:0.12 or one of its dependencies could not be resolved:

Failed to collect dependencies at com.github.github:site-maven-plugin:jar:0.12 -> com.github.github:github-maven-core:jar:0.12 -> org.eclipse.mylyn.github:org.eclipse.egit.github.core:jar:3.1.0.201310021548-r: Failed to read artifact descriptor for org.eclipse.mylyn.github:org.eclipse.egit.github.core:jar:3.1.0.201310021548-r: Could not transfer artifact org.eclipse.mylyn.github:org.eclipse.egit.github.core:pom:3.1.0.201310021548-r from/to alimaven (http://maven.aliyun.com/nexus/content/groups/public/):

archiva-maven-storage-prod.oss-cn-beijing.aliyuncs.com: Unknown host archiva-maven-storage-prod.oss-cn-beijing.aliyuncs.com -> [Help 1]

解決:

在pom.xml中添加以下jar包,解決

<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.10</version>
    <scope>test</scope>
</dependency>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章