gpt4 book ai didi

java - 找不到用于导入的 jar 文件

转载 作者:行者123 更新时间:2023-12-01 09:44:43 25 4
gpt4 key购买 nike

嗨,我有以下导入:

import org.hyperic.hq.measurement.UnitsConvert;
import org.hyperic.hq.product.MeasurementInfo;
import org.hyperic.hq.product.MeasurementPlugin;
import org.hyperic.hq.product.MeasurementPluginManager;
import org.hyperic.hq.product.MetricValue;
import org.hyperic.hq.product.PluginNotFoundException;
import org.hyperic.hq.product.ProductPlugin;
import org.hyperic.hq.product.ProductPluginManager;
import org.hyperic.hq.product.TypeInfo;
import org.hyperic.util.config.ConfigResponse;
import org.hyperic.util.units.FormattedNumber;

它说无法解析符号hq,因为我没有所需的 jar 文件。

我在网上搜索过,但没有找到jar文件。我已经尝试了很长时间但没有成功,我发现类似的东西是 hyperic/hq但是我怎样才能从中获取jar文件或maven存储库呢?

请有人帮助我。任何指示都会非常有帮助。

最佳答案

我从一个关键项目复制了设置:

https://github.com/pivotal/tcs-hq-product-plugin/blob/master/pom.xml

它包含列表存储库:

<repositories>
<repository>
<id>hyperic-external</id>
<name>Hyperic External Repository</name>
<url>http://maven.cm.hyperic.org/external</url>
</repository>
<repository>
<id>hyperic-milestone</id>
<name>Hyperic Milestone Repository</name>
<url>http://maven.cm.hyperic.org/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>hyperic-release</id>
<name>Hyperic Release Repository</name>
<url>http://maven.cm.hyperic.org/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>private-springsource-external</id>
<name>Private Springsource External Repository</name>
<url>http://private.maven.springsource.com/external</url>
</repository>
</repositories>

我与https://github.com/hyperic/hq进行比较并做了一个小的修改(上面已修改): maven.hyperic.org/... => maven.cm.hyperic.org/...

这有效:

<dependency>
<groupId>org.hyperic.hq</groupId>
<artifactId>hq-util</artifactId>
<version>4.6.5</version>
</dependency>
<dependency>
<groupId>org.hyperic.hq</groupId>
<artifactId>hq-common</artifactId>
<version>4.6.5</version>
</dependency>

我对这些存储库进行了工件搜索(使用我的 IDE),它只列出了 hq-common 的 2 个版本:4.5.0.M64.6.5

您的另一个选择是从 github ( https://github.com/hyperic/hq ) 克隆代码并在本地构建。然后,您将能够使用最新版本。

关于java - 找不到用于导入的 jar 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38159435/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com