Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DC55C10DA7 for ; Mon, 9 Dec 2013 22:35:06 +0000 (UTC) Received: (qmail 72233 invoked by uid 500); 9 Dec 2013 22:35:04 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 72169 invoked by uid 500); 9 Dec 2013 22:35:04 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 72161 invoked by uid 99); 9 Dec 2013 22:35:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Dec 2013 22:35:04 +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 omarnetbox@googlemail.com designates 209.85.128.182 as permitted sender) Received: from [209.85.128.182] (HELO mail-ve0-f182.google.com) (209.85.128.182) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Dec 2013 22:35:01 +0000 Received: by mail-ve0-f182.google.com with SMTP id jy13so4186037veb.41 for ; Mon, 09 Dec 2013 14:34:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=JmCMpT+O19tFOQ5ocJTUIwGFi0qH7kRYeOVLje3SMI0=; b=kdZAXLYZ5pGj0+048pcn8Klzn57N/Ua6MJDtGN5aOek+yhctIapcgjD430H/bmFUqO yOf0JchIc5msOC09N5mwGlKw9nBuwlnMiphrwgkPBXduOSvNA4ThcA8A7mECGiwOBVtI EJ349moLjQbsskUn0Kj1Uw0BaxhwEekVdgEQqPUnlpmKNSSRGOlou6zlN797RT/geA8M +Ah4XhVaGXPg8f8VPmMPQ/QemBp0QAfudX7fY/FAYpE6Az9Yse1vmMAcEUVgF/ThVhao XtPRQX0DS0H5VdswkO2OlwP+jKeGNaEr5HtzwGm1gzotrLFfe4lxrC96P/I6ANrFz2Aa zHuQ== MIME-Version: 1.0 X-Received: by 10.58.128.41 with SMTP id nl9mr302441veb.65.1386628480266; Mon, 09 Dec 2013 14:34:40 -0800 (PST) Received: by 10.220.247.208 with HTTP; Mon, 9 Dec 2013 14:34:40 -0800 (PST) In-Reply-To: References: Date: Mon, 9 Dec 2013 22:34:40 +0000 Message-ID: Subject: Re: Sonar with Maven: Fail to connect to database: Cannot loa d JDBC driver class 'oracle.jdbc.OracleDriver' From: "Omar@Gmail" To: Maven Users List Content-Type: multipart/alternative; boundary=047d7b67035100771f04ed219ac7 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b67035100771f04ed219ac7 Content-Type: text/plain; charset=ISO-8859-1 OK I see, so we are throwing it over the fence :) Sonar has very nice solution for it's side which is a folder under lib to hold jdbc drivers, shame Maven doesn't. Seems I have to stick with hacking the mvn script file. Thanks guys this is done with. On 9 December 2013 22:06, Robert Scholte wrote: > I agree with David. The Sonar team should be able to help you. > I had a small look at the code of the *plugin*[1], and it doesn't contain > any references to JDBC drivers. > Sonar probably has a trick, which reuses the Maven classpath. > Anyhow, they know the trick, so they should know the solution for you. > > Robert > > [1] http://mojo.codehaus.org/sonar-maven-plugin/xref/index.html > > Op Mon, 09 Dec 2013 22:46:51 +0100 schreef Omar@Gmail < > omarnetbox@googlemail.com>: > > > Thanks David, >> >> The problem is Maven side as I have clearly explained so not not sure why >> I should pursue this on Sonar user list. >> >> Explain to me why you still think it is a Sonar issue. >> >> >> >> On 9 December 2013 00:44, David Karr wrote: >> >> I suggest you pursue this on the Sonar user list, then. >>> >>> On Sun, Dec 8, 2013 at 11:55 AM, Omar@Gmail >> >wrote: >>> >>> > Thanks David, >>> > >>> > Yes Sonar on separate server. >>> > >>> > Also please see >>> > http://www.mail-archive.com/users@maven.apache.org/msg132123.html >>> > >>> > >>> > On 8 December 2013 18:31, David Karr >>> wrote: >>> > >>> > > I assume that your Sonar server is not the box you're running Maven >>> on? >>> > > >>> > > What Sonar properties are you setting in your settings.xml? Feel >>> free >>> to >>> > > omit the value for each if you need to. >>> > > >>> > > In the Sonar installation instructions there is a section titled >>> "Adding >>> > > the JDBC Driver" which talks about adding the Oracle JDBC driver to >>> the >>> > > SONAR installation. Have you done this? >>> > > >>> > > >>> > > >>> > > >>> > > On Sat, Dec 7, 2013 at 4:33 AM, Omar@Gmail < >>> omarnetbox@googlemail.com >>> > > >wrote: >>> > > >>> > > > Objective: Get Maven to publish sonar results to running Sonar >>> server >>> > > > >>> > > > Steps: >>> > > > >>> > > > - Installed and ran Sonar, accessible from browser >>> > > > - The back-end database is Oracle >>> > > > - >>> > > > >>> > > > Installed and configured Maven in settings.xml file to connect >>> to >>> > the >>> > > > Oracle db >>> > > > - >>> > > > >>> > > > Invoked: mvn clean install -DSkipTests=true >>> > > > - Invoke: mvn sonar:sonar >>> > > > >>> > > > But getting following mvn sonar:sonar Fail to connect to database: >>> > Cannot >>> > > > load JDBC driver class 'oracle.jdbc.OracleDriver' >>> > > > >>> > > > So I need somehow to put the ojdbc6.jar on Maven classpath. Tried >>> > placing >>> > > > the ojdbc6.jar in /lib and lib/ext but did not help. >>> > > > >>> > > > Am I missing something here? please help. >>> > > > >>> > > > To fix this I modified *maven113home/bin/mvn*.bat at line 161 and >>> added >>> > > > >>> > > > %MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath path/to/ojdbc6.jar;... >>> > > > >>> > > > *Which is nasty!* >>> > > > >>> > > > Please suggest a better approach. >>> > > > >>> > > >>> > >>> >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > For additional commands, e-mail: users-help@maven.apache.org > > --047d7b67035100771f04ed219ac7--