From dev-return-15485-archive-asf-public=cust-asf.ponee.io@jmeter.apache.org Fri Jan 15 19:30:41 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 382BA180654 for ; Fri, 15 Jan 2021 20:30:41 +0100 (CET) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id 59D5C66035 for ; Fri, 15 Jan 2021 19:30:40 +0000 (UTC) Received: (qmail 83191 invoked by uid 500); 15 Jan 2021 19:30:39 -0000 Mailing-List: contact dev-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jmeter.apache.org Delivered-To: mailing list dev@jmeter.apache.org Received: (qmail 83179 invoked by uid 99); 15 Jan 2021 19:30:39 -0000 Received: from spamproc1-he-fi.apache.org (HELO spamproc1-he-fi.apache.org) (95.217.134.168) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jan 2021 19:30:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamproc1-he-fi.apache.org (ASF Mail Server at spamproc1-he-fi.apache.org) with ESMTP id 726B0C046A for ; Fri, 15 Jan 2021 19:30:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamproc1-he-fi.apache.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.2, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamproc1-he-fi.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-he-de.apache.org ([116.203.227.195]) by localhost (spamproc1-he-fi.apache.org [95.217.134.168]) (amavisd-new, port 10024) with ESMTP id HSeK-WnsWgTJ for ; Fri, 15 Jan 2021 19:30:37 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::b32; helo=mail-yb1-xb32.google.com; envelope-from=philippe.mouawad@gmail.com; receiver= Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id E2A477FA03 for ; Fri, 15 Jan 2021 19:30:36 +0000 (UTC) Received: by mail-yb1-xb32.google.com with SMTP id z1so6066770ybr.4 for ; Fri, 15 Jan 2021 11:30:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=a5IPLwtAWG8k7uLWAeuqoYZOP06IkmC/u3kfifuSVBs=; b=AZ6KzRDT3VRnYE9G0fa5kCjg4HlGz+cD7QnNII8WHLS9VjEhM7BJSu1bB6ybFc4Tpv 5C/V/8gJxWY7ximqDzEqzobG5EuK9cdo17GRyIV2wN+2zCIe+vnfURaPG0G1XNg71lPT MoGka3OL64H/PZNJYqKW9wBDNeVLHh4XxAomfEE4OPbk/uhSEE2teDbtncawEFr53Ff6 Dke1NFsVHJ4O/3Q0ADezrVSn94L6ywTzK+YRQA+HK5oR/FWRCkZJC7Zwr7Iivi9xnVhf 58aCMZKv6HR7teC8fvVuy9rXSH2C5b3lYiFqkgW2taRQK2u1TGUaTDkWBnGKixpTAMwx Dhpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=a5IPLwtAWG8k7uLWAeuqoYZOP06IkmC/u3kfifuSVBs=; b=frxW1UEgm4Ahtk5PAsrEMdUB6OA1vKcfkYF6vO92nmn25wXhMfEuJ0SGb3IZG3Zinb 6pkdq00xMKEWNAR2IKxdIoasjJMdkL5cRuBusPZ3vbvW1C9UIFSV7/tH1UOU7bmoKuf5 SeccAIMsJ7TIqLjeRb/loQbLtVHgFasXOEKqo/qqYyJTCbDlGx8PjRx6+c/imI7bfYH/ 2F5arF+zax/oZ0DErSBuZ3xebrkinEwdITGBms6IjVpDe6RTvF55Q8HikqXKHIu3ULiQ sQQyisRHPgFaKVuvU/xu4vgsjkvSp4V6k3WBgUmSnkqfVPv+/Neem664FU6ZWoMnSuIF l3+w== X-Gm-Message-State: AOAM533aGjpKO5x4I9NKcVSBa+a659MZ86voyTT64zw3H7mxDFqx3bop 6HWDIovgvBRc1ejN47BBniQLf4VWKilhrLzBMENcpcEwXPY= X-Google-Smtp-Source: ABdhPJzOJ6kV2GP83ImE1cX1Aq/X+o4gKVLBvzWGkzoMHGb8mzSypB93bA0UcEEjtK6EvAjmJW+zuWckEYR8UeFrGA4= X-Received: by 2002:a25:3288:: with SMTP id y130mr5417548yby.486.1610739035383; Fri, 15 Jan 2021 11:30:35 -0800 (PST) MIME-Version: 1.0 References: <161073239121.7800.913811359353135083@gitbox.apache.org> <20210115173951.607C58E7AB@gitbox.apache.org> <389e8170-152c-7f69-c5b6-397437726a6e@internetallee.de> In-Reply-To: <389e8170-152c-7f69-c5b6-397437726a6e@internetallee.de> From: Philippe Mouawad Date: Fri, 15 Jan 2021 20:30:23 +0100 Message-ID: Subject: Re: [jmeter] 01/02: Partly revert "Silence warning of tika about missing sqlite-jdbc dependency" To: ApacheJMeter dev list Content-Type: multipart/alternative; boundary="00000000000007ab2d05b8f568a6" --00000000000007ab2d05b8f568a6 Content-Type: text/plain; charset="UTF-8" Thanks ! On Fri, Jan 15, 2021 at 7:16 PM Felix Schumacher < felix.schumacher@internetallee.de> wrote: > > Am 15.01.21 um 19:04 schrieb Felix Schumacher: > > Am 15.01.21 um 18:52 schrieb Philippe Mouawad: > >> Hi Felix, > >> For simplicity and impact on Maven plugin , why not embed > tika-config.xml > >> in core (src/main/resources) ? > > > > Will try to do it. > > Done > > Felix > > > > > Felix > > > >> Regards > >> > >> On Fri, Jan 15, 2021 at 6:39 PM wrote: > >> > >>> This is an automated email from the ASF dual-hosted git repository. > >>> > >>> fschumacher pushed a commit to branch master > >>> in repository https://gitbox.apache.org/repos/asf/jmeter.git > >>> > >>> commit 803f69f8484aa34c78ab160d1474db56bf0aff47 > >>> Author: Felix Schumacher > >>> AuthorDate: Fri Jan 15 15:34:11 2021 +0100 > >>> > >>> Partly revert "Silence warning of tika about missing sqlite-jdbc > >>> dependency" > >>> > >>> This reverts commit aa6c7633d6ff8125d588071cb4739930a847e1fa. > >>> > >>> Instead of using a system property and extending the shell scripts > to > >>> start > >>> JMeter, we now configure Tika inside the client code directly. The > used > >>> config file stays at the same location and has still the same > content. > >>> --- > >>> .gitignore | 2 +- > >>> bin/jmeter | 2 +- > >>> bin/jmeter.bat | 2 +- > >>> .../protocol/http/gui/action/ParseCurlCommandAction.java | 15 > >>> ++++++++++++++- > >>> 4 files changed, 17 insertions(+), 4 deletions(-) > >>> > >>> diff --git a/.gitignore b/.gitignore > >>> index 61df09b..21abad6 100644 > >>> --- a/.gitignore > >>> +++ b/.gitignore > >>> @@ -51,7 +51,7 @@ > >>> /bin/*.jmx > >>> /bin/*.jtl > >>> /bin/*.xml > >>> -# We need log4j2.xml even though we want to exclude xml created by > batch > >>> tests > >>> +# We need log4j2.xml and tika-config.xml even though we want to > exclude > >>> xml created by batch tests > >>> !/bin/log4j2.xml > >>> !/bin/tika-config.xml > >>> > >>> diff --git a/bin/jmeter b/bin/jmeter > >>> index fae82ff..5d5b949 100755 > >>> --- a/bin/jmeter > >>> +++ b/bin/jmeter > >>> @@ -187,7 +187,7 @@ esac > >>> > >>> # Always dump on OOM (does not cost anything unless triggered) > >>> DUMP="-XX:+HeapDumpOnOutOfMemoryError" > >>> -SYSTEM_PROPS="-Djava.security.egd=file:/dev/urandom > >>> -Dtika.config=${JMETER_HOME}/bin/tika-config.xml" > >>> +SYSTEM_PROPS="-Djava.security.egd=file:/dev/urandom" > >>> SERVER="-server" > >>> > >>> if [ -z "${JMETER_COMPLETE_ARGS}" ]; then > >>> diff --git a/bin/jmeter.bat b/bin/jmeter.bat > >>> index 2c96b54..80fc534 100644 > >>> --- a/bin/jmeter.bat > >>> +++ b/bin/jmeter.bat > >>> @@ -162,7 +162,7 @@ if not defined GC_ALGO ( > >>> set GC_ALGO=-XX:+UseG1GC -XX:MaxGCPauseMillis=100 > >>> -XX:G1ReservePercent=20 > >>> ) > >>> > >>> -set SYSTEM_PROPS=-Djava.security.egd=file:/dev/urandom > >>> -Dtika.config=%JMETER_BIN%tika-config.xml > >>> +set SYSTEM_PROPS=-Djava.security.egd=file:/dev/urandom > >>> > >>> rem Always dump on OOM (does not cost anything unless triggered) > >>> set DUMP=-XX:+HeapDumpOnOutOfMemoryError > >>> diff --git > >>> > a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java > >>> > b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java > >>> index d610b52..d601618 100644 > >>> --- > >>> > a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java > >>> +++ > >>> > b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java > >>> @@ -29,6 +29,7 @@ import java.io.IOException; > >>> import java.net.MalformedURLException; > >>> import java.net.URL; > >>> import java.nio.charset.StandardCharsets; > >>> +import java.nio.file.Paths; > >>> import java.text.MessageFormat; > >>> import java.time.LocalDateTime; > >>> import java.time.format.DateTimeFormatter; > >>> @@ -104,8 +105,11 @@ import org.apache.jorphan.collections.HashTree; > >>> import org.apache.jorphan.gui.ComponentUtil; > >>> import org.apache.jorphan.gui.JMeterUIDefaults; > >>> import org.apache.tika.Tika; > >>> +import org.apache.tika.config.TikaConfig; > >>> +import org.apache.tika.exception.TikaException; > >>> import org.slf4j.Logger; > >>> import org.slf4j.LoggerFactory; > >>> +import org.xml.sax.SAXException; > >>> > >>> /** > >>> * Opens a popup where user can enter a cURL command line and create a > >>> test plan > >>> @@ -130,7 +134,16 @@ public class ParseCurlCommandAction extends > >>> AbstractAction implements MenuCreato > >>> private JSyntaxTextArea cURLCommandTA; > >>> private JLabel statusText; > >>> private JCheckBox uploadCookiesCheckBox; > >>> - private final Tika tika = new Tika(); > >>> + private final Tika tika = createTika(); > >>> + > >>> + private Tika createTika() { > >>> + try { > >>> + return new Tika(new > >>> TikaConfig(Paths.get(JMeterUtils.getJMeterBinDir(), > "tika-config.xml"))); > >>> + } catch (TikaException | IOException | SAXException e) { > >>> + return new Tika(); > >>> + } > >>> + } > >>> + > >>> public ParseCurlCommandAction() { > >>> super(); > >>> } > >>> > >>> > -- Cordialement. Philippe Mouawad. --00000000000007ab2d05b8f568a6--