2013-07-16 31 views
1

我使用maven 3.0和Apache Archiva作爲遠程內部存儲庫(在settings.xml中配置爲mirrior),但我在下載SNAPSHOT構件時遇到問題。無法從Apache archiva下載「internal」SNAPSHOT文物

無法執行項目目標IntegrationTests:無法解析項目com.br.bigdata的依賴項:IntegrationTests:jar:1.0-SNAPSHOT:無法找到工件com.br.bigdata:HBaseSchema:jar:1.0-SNAPSHOT in archiva.default(.../archiva/repository/internal /) - > [Help 1]

我在這裏檢查了類似的帖子,但無法解決我的問題。

我查了一下Archiva庫,神器存在,正確的POM版本等 在我的POM中指定的依賴:

<dependency> 
     <groupId>${project.groupId}</groupId> 
     <artifactId>HBaseSchema</artifactId> 
     <version>${version.hbaseSchema}</version> 
     <scope>test</scope> 
    </dependency> 

的神器POM:

<groupId>com.br.bigdata</groupId> 
<artifactId>HBaseSchema</artifactId> 
<version>1.0-SNAPSHOT</version> 
<packaging>jar</packaging> 
<name>HBaseSchema</name> 
<description>Logical HBase schema</description> 

回答

2

排序。這需要被添加到的Settings.XML

<mirror> 
    <id>archiva.snapshots</id> 
    <url>http://localhost:8080/archiva/repository/snapshots</url> 
    <mirrorOf>snapshots</mirrorOf> 
</mirror> 

<profile> 
    <activation> 
     <activeByDefault>true</activeByDefault> 
    </activation> 
    <repositories> 
     <repository> 
      <id>internal</id> 
      <name>Archiva Managed Internal Repository</name> 
      <url>https://lab-insighttc:8080/archiva/repository/internal</url> 
      <releases> 
      <enabled>true</enabled> 
      </releases> 
      <snapshots> 
      <enabled>false</enabled> 
      </snapshots> 
     </repository> 
     <repository> 
      <id>snapshots</id> 
      <name>Archiva Managed Internal Repository</name> 
      <url>https://lab-insighttc:8080/archiva/repository/snapshots/</url> 
      <releases> 
      <enabled>false</enabled> 
      </releases> 
      <snapshots> 
      <enabled>true</enabled> 
      </snapshots> 
     </repository> 
    </repositories> 
</profile>