jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject [jmeter] branch master updated: Move tika-config.xml into the JAR file for the http component
Date Fri, 15 Jan 2021 18:15:03 GMT
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


The following commit(s) were added to refs/heads/master by this push:
     new 769b02a  Move tika-config.xml into the JAR file for the http component
769b02a is described below

commit 769b02a29049f57251c775ae5c554747a9fe8d16
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Fri Jan 15 19:14:11 2021 +0100

    Move tika-config.xml into the JAR file for the http component
    
    This should make it easier to use the JAR from maven or similar.
---
 .../apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java | 3 +--
 .../org/apache/jmeter/protocol/http/gui/action}/tika-config.xml        | 0
 2 files changed, 1 insertion(+), 2 deletions(-)

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 1979a61..c7a8fc7 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,7 +29,6 @@ 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;
@@ -137,7 +136,7 @@ public class ParseCurlCommandAction extends AbstractAction implements
MenuCreato
 
     private Tika createTika() {
         try {
-            return new Tika(new TikaConfig(Paths.get(JMeterUtils.getJMeterBinDir(), "tika-config.xml")));
+            return new Tika(new TikaConfig(this.getClass().getClassLoader().getResourceAsStream("tika-config.xml")));
         } catch (TikaException | IOException | SAXException e) {
             return new Tika();
         }
diff --git a/bin/tika-config.xml b/src/protocol/http/src/main/resources/org/apache/jmeter/protocol/http/gui/action/tika-config.xml
similarity index 100%
rename from bin/tika-config.xml
rename to src/protocol/http/src/main/resources/org/apache/jmeter/protocol/http/gui/action/tika-config.xml


Mime
View raw message