跳过Ivy手动解析和下载依赖关系 [英] Skip Ivy resolve and download dependencies manually instead

查看:471
本文介绍了跳过Ivy手动解析和下载依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装cassandra,并且在解决某些依赖项时遇到困难。有任何方法可以直接下载jar文件,并跳过ivy解析选项。

I am trying to install cassandra, and am having difficulty in resolving certain dependencies. Is there any way to simply download the jar files directly and skip the ivy resolve option.

我不熟悉Apache Ant或Apache Ivy。

I am not familiar with Apache Ant or with Apache Ivy.

Apache Ivy设置描述如下: https://gist.github .com / nipunarora / 5fa2c22770f575d81a0698644c5eeb02

The Apache Ivy settings are described here: https://gist.github.com/nipunarora/5fa2c22770f575d81a0698644c5eeb02

Apache Ivy在这里:
https://gist.github.com/nipunarora/d24f15768ff13470c5eb55a4f356650a

The Apache Ivy is here: https://gist.github.com/nipunarora/d24f15768ff13470c5eb55a4f356650a

cloudera的几个依赖项无法解决。我可以从网络下载jar文件,所以我想跳过解决依赖关系并手动下载它们。

A couple of the dependencies from cloudera cannot be resolved. I can download the jar files from the web, so I would like to skip resolving dependencies and downloading them manually instead.

推荐答案

手动管理依赖不是很有趣...我不会推荐它....

Manually managing dependencies is not fun... I wouldn't recommend it....

您的问题似乎是cloudera已经更改了他们的存储库URL。我发现了第二个问题,其中hadoop流工件丢失。

Your issue appears to be that cloudera have changed their repository URL. I discovered a second issue where the hadoop streaming artifact was missing. I pulled the jar from the hadoop project instead.

我建议使用替代和更简单的设置:

I suggest using an alternative and simpler settings:

<ivysettings>
  <settings defaultResolver="central"/>
  <resolvers>
    <ibiblio name="central" m2compatible="true" />
    <ibiblio name="cloudera" root="https://repository.cloudera.com/cloudera/repo" m2compatible="true" />
  </resolvers>
  <modules>
    <module organisation="com.cloudera.hadoop" resolver="cloudera" />
  </modules>
</ivysettings>

基本上配置ivy从cloudera仓库下载cloudera工件以及 Maven中央

Basically configure ivy to download cloudera artifacts from the cloudera repo and everything else from Maven central

对cloudera存储库的搜索无法找到所需的依赖项:

A search of the cloudera repository was unable to find your desired dependency:

  • dependency org="com.cloudera.hadoop" name="hadoop-streaming" rev="0.20.2-320"

我建议您使用以下ivy档案:

I suggest the following ivy file:

<ivy-module version="2.0">
  <info organisation="apache-cassandra" module="cassandra"/>

  <configurations>
    <conf name="compile" description="Required to compile application"/>
    <conf name="runtime" description="Additional run-time dependencies" extends="compile"/>
    <conf name="test"    description="Required for test only" extends="runtime"/>
  </configurations>

  <dependencies>
    <!-- FIXME: paranamer can be dropped after we're depending on avro                                                        
    (since it depends on them). -->
    <dependency org="com.thoughtworks.paranamer" name="paranamer-ant" rev="2.1" conf="compile->default"/>
    <dependency org="junit" name="junit" rev="4.6"  conf="compile->default"/>
    <dependency org="commons-logging" name="commons-logging" rev="1.1.1" conf="compile->default"/>
    <dependency org="org.apache.rat" name="apache-rat" rev="0.6"  conf="compile->default"/>
    <dependency org="net.sf.jopt-simple" name="jopt-simple" rev="3.2" conf="compile->default"/>
    <dependency org="net.java.dev.jna" name="jna" rev="3.2.7" conf="compile->default"/>

    <dependency org="com.cloudera.hadoop" name="hadoop-core" rev="0.20.2-320" conf="compile->default"/>
    <dependency org="org.apache.hadoop" name="hadoop-streaming" rev="2.7.2" conf="compile->default"/>
  </dependencies>
</ivy-module>

注意:


  • 我已包含配置映射,以便更好地控制依赖关系(常见的习惯,类似于Maven中范围的工作方式)。

这篇关于跳过Ivy手动解析和下载依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆