【发布时间】:2020-09-02 08:55:48
【问题描述】:
我正在尝试通过在 pom.xml 中包含依赖项来访问一些 jar 文件。问题是我在公司关系存储库中找不到错误。如何告诉 Maven 不要只在 http://sl-quality.mycompany.com/nexus/content/groups/public/ 中查找依赖项? earth 是在哪里定义的 url?
Could not resolve dependencies for project com.mycompany.myproj:mycompany-service:jar:1.0-
SNAPSHOT: Could not find artifact io.confluent.ksql:ksqldb-api-client:jar:0.11.0 in nexus
(http://sl-quality.mycompany.com/nexus/content/groups/public/
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.myapp</groupId>
<artifactId>com-mycompany-app</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<ksqldb.version>0.11.0</ksqldb.version>
<!-- Maven properties for compilation -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<repositories>
<!-- jhipster-needle-maven-repository -->
<repository>
<id>ksqlDB</id>
<name>ksqlDB</name>
<url>https://ksqldb-maven.s3.amazonaws.com/maven/</url>
</repository>
<repository>
<id>confluent</id>
<name>Confluent</name>
<url>https://jenkins-confluent-packages-beta-maven.s3.amazonaws.com/6.1.0-beta200715032424/1/maven/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.confluent.ksql</groupId>
<artifactId>ksqldb-api-client</artifactId>
<version>${ksqldb.version}</version>
</dependency>
</dependencies>
我不知道为什么它总是转到 nexus,因为这在我的 pom 文件中没有提到。我可以安装在我的本地存储库中,但不确定需要提取哪些应用程序 jar 文件才能使其工作,因为需要添加两个存储库。
我想确切地知道我可以提取哪些 jar 文件以放入我的本地存储库中。谢谢
【问题讨论】:
-
你的 settings.xml 中有什么? (C:/Users/
/.m2/settings.xml) 对于 windows -
所以你的权利它丢失了但是当我添加另外两个存储库时它仍然只检查同一个。如果我删除它,那么我会从其他罐子中得到错误..
-
所以我真的需要保留第一个镜像,因为它包含我所有的公司回购资料。如何使用额外的 repos 来获取我需要的一两个额外的 jar 文件?
-
我编辑到广告 settings.xml 但因为我的观点很少,还没有人批准它。但基本上你的权利,但我不能只是换掉镜子,因为我需要那个。我需要一种方法来以某种方式使用这两个 repos 来下载 jar!
标签: java spring-boot maven pom.xml ksqldb