gpt4 book ai didi

java - maven:依赖编译错误

转载 作者:行者123 更新时间:2023-11-30 03:31:29 26 4
gpt4 key购买 nike

我的pom.xml

 <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.myorg.write</groupId>
<artifactId>simple-client</artifactId>
<packaging>jar</packaging>
<version>0.1.0</version>

<repositories>
<repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>2.0.0-mrl-cdh4.0.0</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<mainClass>org.myorg.Write</mainClass>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

我指的是cdh site

我使用它编译

mvn -e clean dependency:copy-dependencies package

我收到以下错误

[ERROR] Failed to execute goal on project simple-client: Could not resolve 
dependencies for project org.myorg.write:simple-client:jar:0.1.0: Failur\
e to find org.apache.hadoop:hadoop-client:jar:2.0.0-mrl-cdh4.0.0 in
https://repository.cloudera.com/artifactory/cloudera-repos/ was cached in
the local repository, resolution will not be reattempted until the update
interval of cloudera has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal on project simple-client: Could not resolve dependencies for project
org.myorg.write:simple-client:jar:0.1.0: Failure to find
org.apache.hadoop:hadoop-client:jar:2.0.0-mrl-cdh4.0.0 in
https://repository.cloudera.com /artifactory/cloudera-repos/ was cached in
the local repository, resolution will not be reattempted until the update
interval of cloudera has elapsed or updates are forced

无法解析依赖关系。我检查了this site

我可以在上述站点中看到org.apache.hadoop:hadoop-client:jar:2.0.0-mrl-cdh4.0.0。但是上面的语句之间是什么 jar 呢?它会导致错误吗?我该如何解决这个问题?

我正在尝试通过java与在另一台机器上运行的hadoop进行通信。

最佳答案

你的 pom 中有一个拼写错误。依赖项 "2.0.0-mrl-cdh4.0.0" 应替换为 "2.0.0-mr1-cdh4.4.0"。您可以在 cloudera 存储库上检查这一点。

关于java - maven:依赖编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28895204/

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