我使用maven 3.0和Apache Archiva作为远程内部存储库(在settings.xml中配置为mirrior)但是我在下载SNAPSHOT工件时遇到问题。
无法在项目IntegrationTests上执行目标:无法解析项目com.br.bigdata的依赖项:IntegrationTests:jar:1.0-SNAPSHOT:找不到工件com.br.bigdata:HBaseSchema:jar:1.0-SNAPSHOT in archiva .default(... / archiva / repository / internal /) - > [帮助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>
答案 0 :(得分: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>