0

i'm using the tag-jmeter-extn-1.1 tha tis the Properties file reader plugin. how i can add it on the section dependencies of pom file ?

<dependencies>
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-all</artifactId>
            <version>5.16.0</version>
        </dependency>
    
    <dependency>
        <groupId>com.blazemeter</groupId>
        <artifactId>jmeter-plugins-directory-listing</artifactId>
        <version>0.3</version>
    </dependency>

        <dependency>
            <groupId>com.example</groupId>
            <artifactId>tag-jmeter-extn</artifactId>
            <version>1.1</version>
        </dependency>
    
    </dependencies>
Luca Ruggeri
  • 121
  • 1
  • 7

2 Answers2

0

on pom file under the build-plugins add the below entry

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-install-plugin</artifactId>
    <version>${maven-install-plugin.version}</version>
    <executions>
        <execution>
            <id>Property Reader Ext Lib</id>
            <phase>initialize</phase>
            <goals>
                <goal>install-file</goal>
            </goals>
            <configuration>
                <file>${basedir}/src/test/resources/lib/ext/tag-jmeter-extn-1.1.jar</file>
                <groupId>com.xxxx.jmeter.ext</groupId>
                <artifactId>PropertyReader</artifactId>
                <version>1.1</version>
                <packaging>jar</packaging>
            </configuration>
        </execution>
    </executions>
</plugin>

under the plugin com.lazerycode.jmeter add the below artifacts

<jmeterExtensions>
    <artifact>com.xxxx.jmeter.ext:PropertyReader:1.1</artifact>
</jmeterExtensions>
Luca Ruggeri
  • 121
  • 1
  • 7
0

When it comes to adding libraries to JMeter Classpath using JMeter Maven plugin you shouldn't be using <dependencies> section as it will be silently ignored, instead you should provide them in the relevant <configuration> sub-section of the plugin.

Check out Adding jar's to the /lib/ext directory section

However the plugin is using Eclipse Aether so the plugin needs to be present in Maven Central or in your local repository.

In general I fail to see why this plugin exists because reading properties files including custom ones is built-in JMeter feature.

With JMeter Maven plugin you can use <customPropertiesFile> for this.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133