Return-Path: X-Original-To: apmail-hadoop-common-dev-archive@www.apache.org Delivered-To: apmail-hadoop-common-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B6BEF10D56 for ; Wed, 30 Oct 2013 12:54:41 +0000 (UTC) Received: (qmail 28194 invoked by uid 500); 30 Oct 2013 12:54:36 -0000 Delivered-To: apmail-hadoop-common-dev-archive@hadoop.apache.org Received: (qmail 27968 invoked by uid 500); 30 Oct 2013 12:54:31 -0000 Mailing-List: contact common-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-dev@hadoop.apache.org Received: (qmail 27808 invoked by uid 99); 30 Oct 2013 12:54:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2013 12:54:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of stevel@hortonworks.com designates 209.85.128.177 as permitted sender) Received: from [209.85.128.177] (HELO mail-ve0-f177.google.com) (209.85.128.177) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2013 12:54:26 +0000 Received: by mail-ve0-f177.google.com with SMTP id oz11so909185veb.8 for ; Wed, 30 Oct 2013 05:54:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=s7jEGb53G+kahCMgMLmcOqEzgaGbZJqs2MKyseZjQMQ=; b=Fh23gJRmeSBBUM2OYjDdQa9REEpkWYuL8kpkl+KOdOF6VKxbL/HezfE+todwMAXmhE LZ1JPfdul1lbQm5dg5sII1py3ms6idXyZWsZU/dKIV2F8t6xQ0r5Ak7wnaoJIQYUSaoE +PyS3pmT7yEcwtY84WQJVYSZe43unH+wJADTN3mggHFRd0UGwDEgXJaiDDFzaM61g1vW qpC25a7GLslnXdDg1JRyXVgHf/ilWanVB3Y+bWvxMGePaMn+vfrjAZ4n6KEVVnKG2bgx DxuHUb0l5jFcI1oy6ZpMbUyY7+V4HNJfWkbFptrso5RtO4qP5F+zyDh8BesSXkGifh0q Rdcg== X-Gm-Message-State: ALoCoQlqwv8vaF5b3jVRhJgTRHan0bGr1zBP9JdgTC5JHC+WczO2XHTQSJ8orkwfDHYSUlTYytQiscA9UZODbgTmajN6e7mjcJb/hRxQDm4PfhFrdn1FPLo= MIME-Version: 1.0 X-Received: by 10.52.118.73 with SMTP id kk9mr2458248vdb.13.1383137645202; Wed, 30 Oct 2013 05:54:05 -0700 (PDT) Received: by 10.58.154.98 with HTTP; Wed, 30 Oct 2013 05:54:05 -0700 (PDT) In-Reply-To: References: Date: Wed, 30 Oct 2013 12:54:05 +0000 Message-ID: Subject: Re: Question on hadoop dependencies. From: Steve Loughran To: "common-dev@hadoop.apache.org" Content-Type: multipart/alternative; boundary=089e0122f0f204bd9f04e9f4d456 X-Virus-Checked: Checked by ClamAV on apache.org --089e0122f0f204bd9f04e9f4d456 Content-Type: text/plain; charset=UTF-8 Why hello Peter, Which version are you using? The reason those dependencies are declared are because things like Jetty use them -and the classpath for the server side Hadoop is "things needed to run Hadoop". Client-side I think there's too much in the maven dependency tree (servlets, jetty, ...) On 29 October 2013 19:22, Petar Tahchiev wrote: > Hi guys, > > I'm using Spring-data-solr in my project. SDS declares Solr-core as a > dependency. Solr declares hadoop-auth, hadoop-common, hadoop-hdfs > dependencies. Each and every one of those dependencies declares log4j and > slf4j-log4j12 as runtime dependencies, and also hadoop-common declares > servlet-api version 2.5 as runtime dependency. So in the end I also get > servlet-api 2.5, slf4 and log4j in my classpath. > This normally shouldn't be a problem, but in my case I'm using Servlet 3.0, > log4j2, and SL4j for log4j2. This completely messes up my classpath, so I > have to manually exclude those dependencies, like this: > ----------------------------------------------- > > org.apache.solr > solr-core > ${solr.version} > > > org.slf4j > slf4j-jdk14 > > > org.apache.solr > solr-core > > > > > org.apache.solr > solr-core > ${solr.version} > > > org.apache.hadoop > hadoop-auth > > > org.apache.hadoop > hadoop-common > > > org.apache.hadoop > hadoop-hdfs > > > > > org.apache.hadoop > hadoop-auth > ${hadoop.version} > > > log4j > log4j > > > org.slf4j > slf4j-log4j12 > > > > > org.apache.hadoop > hadoop-common > ${hadoop.version} > > > log4j > log4j > > > org.slf4j > slf4j-log4j12 > > > javax.servlet > servlet-api > > > > > org.apache.hadoop > hadoop-hdfs > ${hadoop.version} > > > log4j > log4j > > > org.slf4j > slf4j-log4j12 > > > javax.servlet > servlet-api > > > > --------------------------------------------------- > Just out of curiosity here - what is the reason to include log4j, > slf4j-log4j12 and servlet-api as runtime dependencies? I think they should > be with scope provided. It's good to program your API against slf4j, but > then the connector should be specified by the user (Log4J2 in my case). > Also are there any plans to migrate to Log4J2 - it seems pretty solid (9 > betas so far) and It is supposed to be released soon. > > Thanks for you time and keep up the good work. > > -- > Regards, Petar! > Karlovo, Bulgaria. > --- > Public PGP Key at: > https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611 > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF 55A5 1965 8550 C311 0611 > -- CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You. --089e0122f0f204bd9f04e9f4d456--