Java maven:依赖项编译错误

Java maven:依赖项编译错误,java,maven,Java,Maven,我的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.xs

我的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>
我犯了以下错误

[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
无法解析依赖关系。我查过了

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


我正试图通过java与另一台机器上运行的hadoop对话。

问题是您的版本
2.0.0-mrl-cdh4.0.0
使用了
l
字母,而不是
1
。我检查了cloudera存储库,它不包含版本
2.0.0-mrl-cdh4.0.0
,但包含版本
2.0.0-mr1-cdh4.0.0

您的pom中有一个打字错误。 依赖项
“2.0.0-mrl-cdh4.0.0”
应替换为
“2.0.0-mr1-cdh4.4.0”

你可以在cloudera存储库中查看这一点。

只是为了确保,在“2.0.0-mrl-cdh4.0.0”和“2.0.0-mr1-cdh4.4.0”之间没有输入错误哦,伙计:)来吧,你找到我了:)是的,我的pom.xml中也有输入错误。它工作得很好。你能告诉我那行是什么吗?谢谢我应该删除这个任务吗?你可以在这个地址看到这个罐子。您可以在相同的地址查看pom以查看依赖关系。我想你可以删除它,但做你想做的;)文森特,谢谢。我问你
org.apache.hadoop:hadoop客户端:jar:2.0.0-mrl-cdh4.0.0
这里面是什么?是不是
groupid:artifactId:version
?哦,对不起,是groupid:artifactId:package:version。包装可以是pom、jar、war、ear。在这种情况下,它是一个罐子。
[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