英文:
mvn: assign depenendecy to repository
问题
需要将此存储库添加到才能下载此依赖项:
<repositories>
<repository>
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-streams-avro-serde</artifactId>
<version>${kafka.streams.avro-serde.version}</version>
</dependency>
</dependencies>
但是,mvn 正试图使用此存储库下载所有其他依赖项。如何设置只有上面的依赖项使用上面的 confluent
存储库?
英文:
I need to add this repository in order to be able to download this dependency:
<repositories>
<repository>
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-streams-avro-serde</artifactId>
<version>${kafka.streams.avro-serde.version}</version>
</dependency>
</dependencies>
However, mvn is trying to download all other dependencies using this repository.
How could I set that only above dependency uses above confluent
repository?
答案1
得分: 1
你不能将依赖关联到存储库。
但通常这不是问题,因为Maven将浏览所有存储库以查找你的依赖项,所以最终会找到它们。
如果有一个存储库非常慢(并减慢下载速度),尝试将其放在最后。
英文:
You cannot relate dependencies to repositories.
But this is usually no problem because Maven will go through all repositories to find your dependencies, so it will eventually find them.
If one is very slow (and slows down the downloads), try to place it at the end.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论