使用ant构建hadoop

发布于 2024-12-08 00:01:32 字数 5228 浏览 0 评论 0原文

我尝试使用 ant 构建 hadoop-mapreduce-project。我尝试使用 maven 它成功了,但我需要使用 ant 构建它。或者他们在maven构建中可以替代“antcompile-mapred-test”吗? 出现的错误是:

io problem while parsing ivy file: https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-yarn-server-common/0.24.0-SNAPSHOT/hadoop-yarn-server-common-0.24.0-20110914.035045-1.pom: Impossible to load parent for file:/home/mohyt/.ivy2/cache/org.apache.hadoop/hadoop-yarn-server-common/ivy-0.24.0-SNAPSHOT.xml.original. Parent=org.apache.hadoop#hadoop-yarn-server;${yarn.version}
[ivy:resolve]       module not found: org.apache.hadoop#hadoop-yarn-server-common;0.24.0-SNAPSHOT
[ivy:resolve]   ==== apache-snapshot: tried
[ivy:resolve]     https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-yarn- server/${yarn.version}/hadoop-yarn-server-${yarn.version}.pom
[ivy:resolve]     -- artifact org.apache.hadoop#hadoop-yarn-server;${yarn.version}!hadoop-yarn-server.jar:
[ivy:resolve]     https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-yarn-server/${yarn.version}/hadoop-yarn-server-${yarn.version}.jar
[ivy:resolve]   ==== maven2: tried
[ivy:resolve]     http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-yarn-server-common/0.24.0-SNAPSHOT/hadoop-yarn-server-common-0.24.0-SNAPSHOT.pom
[ivy:resolve]     -- artifact org.apache.hadoop#hadoop-yarn-server-common;0.24.0-SNAPSHOT!hadoop-yarn-server-common.jar:
[ivy:resolve]     http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-yarn-server-common/0.24.0-SNAPSHOT/hadoop-yarn-server-common-0.24.0-SNAPSHOT.jar
[ivy:resolve]   io problem while parsing ivy file: https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-mapreduce-client-core/0.24.0-SNAPSHOT/hadoop-mapreduce-client-core-0.24.0-20110914.035126-1.pom: Impossible to load parent for file:/home/mohyt/.ivy2/cache/org.apache.hadoop/hadoop-mapreduce-client-core/ivy-0.24.0-SNAPSHOT.xml.original. Parent=org.apache.hadoop#hadoop-mapreduce-client;${hadoop-mapreduce.version}
[ivy:resolve]       module not found: org.apache.hadoop#hadoop-mapreduce-client-core;0.24.0-SNAPSHOT
[ivy:resolve]   ==== apache-snapshot: tried
[ivy:resolve]     https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-mapreduce-client/${hadoop-mapreduce.version}/hadoop-mapreduce-client-${hadoop-mapreduce.version}.pom
[ivy:resolve]     -- artifact org.apache.hadoop#hadoop-mapreduce-client;${hadoop-mapreduce.version}!hadoop-mapreduce-client.jar:
[ivy:resolve]     https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-mapreduce-client/${hadoop-mapreduce.version}/hadoop-mapreduce-client-${hadoop-mapreduce.version}.jar
[ivy:resolve]   ==== maven2: tried
[ivy:resolve]     http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapreduce-client-core/0.24.0-SNAPSHOT/hadoop-mapreduce-client-core-0.24.0-SNAPSHOT.pom
[ivy:resolve]     -- artifact org.apache.hadoop#hadoop-mapreduce-client-core;0.24.0-SNAPSHOT!hadoop-mapreduce-client-core.jar:
[ivy:resolve]     http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapreduce-client-core/0.24.0-SNAPSHOT/hadoop-mapreduce-client-core-0.24.0-SNAPSHOT.jar
[ivy:resolve]   io problem while parsing ivy file: https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-yarn-common/0.24.0-SNAPSHOT/hadoop-yarn-common-0.24.0-20110914.034958-1.pom: Impossible to load parent for file:/home/mohyt/.ivy2/cache/org.apache.hadoop/hadoop-yarn-common/ivy-0.24.0-SNAPSHOT.xml.original. Parent=org.apache.hadoop#hadoop-yarn;${yarn.version}
[ivy:resolve]       module not found: org.apache.hadoop#hadoop-yarn-common;0.24.0-SNAPSHOT
[ivy:resolve]   ==== apache-snapshot: tried
[ivy:resolve]     https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-yarn/${yarn.version}/hadoop-yarn-${yarn.version}.pom
[ivy:resolve]     -- artifact org.apache.hadoop#hadoop-yarn;${yarn.version}!hadoop-yarn.jar:
[ivy:resolve]     https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-yarn/${yarn.version}/hadoop-yarn-${yarn.version}.jar
[ivy:resolve]   ==== maven2: tried
[ivy:resolve]     http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-yarn-common/0.24.0-SNAPSHOT/hadoop-yarn-common-0.24.0-SNAPSHOT.pom
[ivy:resolve]     -- artifact org.apache.hadoop#hadoop-yarn-common;0.24.0-SNAPSHOT!hadoop-yarn-common.jar:
[ivy:resolve]     http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-yarn-common/0.24.0-SNAPSHOT/hadoop-yarn-common-0.24.0-SNAPSHOT.jar
[ivy:resolve]       ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]       ::          UNRESOLVED DEPENDENCIES         ::
[ivy:resolve]       ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]       :: org.apache.hadoop#hadoop-yarn-server-common;0.24.0-SNAPSHOT: not found
[ivy:resolve]       :: org.apache.hadoop#hadoop-mapreduce-client-core;0.24.0-SNAPSHOT: not found
[ivy:resolve]       :: org.apache.hadoop#hadoop-yarn-common;0.24.0-SNAPSHOT: not found
[ivy:resolve]       ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] 
[ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

I tried to build hadoop-mapreduce-project using ant.I tried with maven it suceeded but i need to build it with ant. OR is their any alternative of "ant compile-mapred-test" in maven build?
The error occurs is:

io problem while parsing ivy file: https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-yarn-server-common/0.24.0-SNAPSHOT/hadoop-yarn-server-common-0.24.0-20110914.035045-1.pom: Impossible to load parent for file:/home/mohyt/.ivy2/cache/org.apache.hadoop/hadoop-yarn-server-common/ivy-0.24.0-SNAPSHOT.xml.original. Parent=org.apache.hadoop#hadoop-yarn-server;${yarn.version}
[ivy:resolve]       module not found: org.apache.hadoop#hadoop-yarn-server-common;0.24.0-SNAPSHOT
[ivy:resolve]   ==== apache-snapshot: tried
[ivy:resolve]     https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-yarn- server/${yarn.version}/hadoop-yarn-server-${yarn.version}.pom
[ivy:resolve]     -- artifact org.apache.hadoop#hadoop-yarn-server;${yarn.version}!hadoop-yarn-server.jar:
[ivy:resolve]     https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-yarn-server/${yarn.version}/hadoop-yarn-server-${yarn.version}.jar
[ivy:resolve]   ==== maven2: tried
[ivy:resolve]     http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-yarn-server-common/0.24.0-SNAPSHOT/hadoop-yarn-server-common-0.24.0-SNAPSHOT.pom
[ivy:resolve]     -- artifact org.apache.hadoop#hadoop-yarn-server-common;0.24.0-SNAPSHOT!hadoop-yarn-server-common.jar:
[ivy:resolve]     http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-yarn-server-common/0.24.0-SNAPSHOT/hadoop-yarn-server-common-0.24.0-SNAPSHOT.jar
[ivy:resolve]   io problem while parsing ivy file: https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-mapreduce-client-core/0.24.0-SNAPSHOT/hadoop-mapreduce-client-core-0.24.0-20110914.035126-1.pom: Impossible to load parent for file:/home/mohyt/.ivy2/cache/org.apache.hadoop/hadoop-mapreduce-client-core/ivy-0.24.0-SNAPSHOT.xml.original. Parent=org.apache.hadoop#hadoop-mapreduce-client;${hadoop-mapreduce.version}
[ivy:resolve]       module not found: org.apache.hadoop#hadoop-mapreduce-client-core;0.24.0-SNAPSHOT
[ivy:resolve]   ==== apache-snapshot: tried
[ivy:resolve]     https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-mapreduce-client/${hadoop-mapreduce.version}/hadoop-mapreduce-client-${hadoop-mapreduce.version}.pom
[ivy:resolve]     -- artifact org.apache.hadoop#hadoop-mapreduce-client;${hadoop-mapreduce.version}!hadoop-mapreduce-client.jar:
[ivy:resolve]     https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-mapreduce-client/${hadoop-mapreduce.version}/hadoop-mapreduce-client-${hadoop-mapreduce.version}.jar
[ivy:resolve]   ==== maven2: tried
[ivy:resolve]     http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapreduce-client-core/0.24.0-SNAPSHOT/hadoop-mapreduce-client-core-0.24.0-SNAPSHOT.pom
[ivy:resolve]     -- artifact org.apache.hadoop#hadoop-mapreduce-client-core;0.24.0-SNAPSHOT!hadoop-mapreduce-client-core.jar:
[ivy:resolve]     http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapreduce-client-core/0.24.0-SNAPSHOT/hadoop-mapreduce-client-core-0.24.0-SNAPSHOT.jar
[ivy:resolve]   io problem while parsing ivy file: https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-yarn-common/0.24.0-SNAPSHOT/hadoop-yarn-common-0.24.0-20110914.034958-1.pom: Impossible to load parent for file:/home/mohyt/.ivy2/cache/org.apache.hadoop/hadoop-yarn-common/ivy-0.24.0-SNAPSHOT.xml.original. Parent=org.apache.hadoop#hadoop-yarn;${yarn.version}
[ivy:resolve]       module not found: org.apache.hadoop#hadoop-yarn-common;0.24.0-SNAPSHOT
[ivy:resolve]   ==== apache-snapshot: tried
[ivy:resolve]     https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-yarn/${yarn.version}/hadoop-yarn-${yarn.version}.pom
[ivy:resolve]     -- artifact org.apache.hadoop#hadoop-yarn;${yarn.version}!hadoop-yarn.jar:
[ivy:resolve]     https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-yarn/${yarn.version}/hadoop-yarn-${yarn.version}.jar
[ivy:resolve]   ==== maven2: tried
[ivy:resolve]     http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-yarn-common/0.24.0-SNAPSHOT/hadoop-yarn-common-0.24.0-SNAPSHOT.pom
[ivy:resolve]     -- artifact org.apache.hadoop#hadoop-yarn-common;0.24.0-SNAPSHOT!hadoop-yarn-common.jar:
[ivy:resolve]     http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-yarn-common/0.24.0-SNAPSHOT/hadoop-yarn-common-0.24.0-SNAPSHOT.jar
[ivy:resolve]       ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]       ::          UNRESOLVED DEPENDENCIES         ::
[ivy:resolve]       ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]       :: org.apache.hadoop#hadoop-yarn-server-common;0.24.0-SNAPSHOT: not found
[ivy:resolve]       :: org.apache.hadoop#hadoop-mapreduce-client-core;0.24.0-SNAPSHOT: not found
[ivy:resolve]       :: org.apache.hadoop#hadoop-yarn-common;0.24.0-SNAPSHOT: not found
[ivy:resolve]       ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] 
[ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

無心 2024-12-15 00:01:32

Hadoop 正在从branch-0.23 和trunk 中的ant 转向maven。截至目前,一些模块(例如 MRv1)必须进行 mavenized。 Branch-0.23 和 trunk 不支持 Ant 构建。 ant 和 Maven 构建生成的工件应该或多或少相同。使用 ant 没有任何意义,除非有特定的原因使用它。

这里是构建 Hadoop 的不同 Maven 选项。

Hadoop is going towards maven from ant in branch-0.23 and trunk. As of now, some of the modules like MRv1 have to be mavenized though. Ant builds won't be supported in branch-0.23 and trunk. The artifacts produced by the ant and the maven build should be more or less the same. There is no point in using ant, unless there is a specific reason for using it.

Here are the different maven options for building Hadoop.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文