Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop >> mail # user >> Re: ivy failed to resolve dependencies?


Copy link to this message
-
Re: ivy failed to resolve dependencies?
I see...

Thank you very much, Steve
Nan

On Wed, Nov 3, 2010 at 1:08 AM, Steve Loughran <[EMAIL PROTECTED]> wrote:

> On 02/11/10 14:47, Nan Zhu wrote:
>
>> Hi, Steve
>>
>> I haven't added jms and jmxtools, but I added a jxl library to generate
>> some
>> statistical result with excel format, but it seems not to be the reason,
>> because I have worked with it for several days,
>>
>> I guess it's caused by log4j, I wrote a class and add a logger in it, but
>> it's same with other original classes in hadoop, I don't know why it will
>> need these two files, when I explicitly exclude them, the building process
>> will failed on the problem of "cannot find symbols"
>>
>>
> It'll be log4J. Try making the dependency on log4j be on the base artifact
> (via a  ->master  dependency declaration), rather than ->default, which
> gives you everything the people who wrote the JAR felt you needed, which is
> often what they needed to compile it, rather than what you need to use it.
>
> Here is what my ivy.xml file looks like from a different project -all other
> modules which use any of the logging libraries depend on this module, which
> sets up all the dependencies correct by only asking for the master artifacts
> (and having separate configurations for log4j, commons-logging and slf4j)
>
>    <!--it is essential that only the master JAR of commons logging
>    is pulled in, as its dependencies are usually a mess, including things
>    like a version of JMX that isn't in the repository
>    -->
>    <dependency org="log4j"
>      name="log4j"
>      rev="${log4j.version}"
>      conf="log4j->master"
>      />
>    <!--it is essential that only the master JAR of commons logging
>    is pulled in, as its dependencies are usually a mess, including things
>    like out of date servlet APIs, bits of Avalon, etc.
>    -->
>    <dependency org="commons-logging"
>      name="commons-logging"
>      rev="${commons-logging.version}"
>      conf="commons-logging->master"/>
>
>    <dependency org="org.slf4j"
>      name="slf4j-api"
>      rev="${slf4j.version}"
>      conf="slf4j->master"/>
>
>    <dependency org="org.slf4j"
>      name="slf4j-jcl"
>      rev="${slf4j.version}"
>      conf="slf4j->master"/>
>