Passing additional JVM_ARGS to jmeter

439 views
Skip to first unread message

luke.st...@gmail.com

unread,
May 16, 2012, 5:22:43 AM5/16/12
to maven-jmeter...@googlegroups.com
My performance test requires some additional native libraries, the location of which I usually specify using the PATH environment variable for the process.

Is it possible to configure PATH for the plugin execution?

Thanks

Luke

Mark Collin

unread,
May 16, 2012, 6:21:51 AM5/16/12
to maven-jmeter...@googlegroups.com
If you add them as dependencies to the plugin they will be added to the
path, e.g.:

<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.my.group</groupId>
<artifactId>my-artifact</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
--
You received this message because you are subscribed to the Google Groups
"Maven JMeter Plugin Users" group.
To view this discussion on the web, visit
https://groups.google.com/d/msg/maven-jmeter-plugin-users/-/grXB94BqA14J.
To post to this group, send an email to
maven-jmeter...@googlegroups.com.
To unsubscribe from this group, send email to
maven-jmeter-plugi...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/maven-jmeter-plugin-users?hl=en-GB.


luke.st...@gmail.com

unread,
May 16, 2012, 5:54:29 PM5/16/12
to maven-jmeter...@googlegroups.com
I'm talking about native libraries (the PATH), not jar dependencies (the classpath). I had already got as far as picking up my jar deps, now trying to resolve my java.lang.UnsatisfiedLinkError.

On Wednesday, 16 May 2012 20:21:51 UTC+10, Ardesco wrote:
> If you add them as dependencies to the plugin they will be added to the
> path, e.g.:
>
>
>

> <groupId>com.lazerycode.jmeter</groupId>
> <artifactId>jmeter-maven-plugin</artifactId>
> <version>1.4.1</version>
> <executions>
> <execution>
> <id>jmeter-tests</id>
>

luke.st...@gmail.com

unread,
May 16, 2012, 7:16:16 PM5/16/12
to maven-jmeter...@googlegroups.com

Mark Collin

unread,
May 17, 2012, 1:26:53 AM5/17/12
to maven-jmeter...@googlegroups.com

Currently we clear out the $PATH variable just before invoking JMeter, and let JMeter build it by itself.

 

See line 295 of https://github.com/Ronnie76er/jmeter-maven-plugin/blob/master/src/main/java/com/lazerycode/jmeter/JMeterAbstractMojo.java

 

(Short Link in case the long one above is broken by google groups)

 

How would you normally do this if you weren’t invoking JMeter through maven?

 

Are you looking for this?

 

Setting System Properties

 

    JMeter can set system properties, these are global environment properties accessible by all applications running in the same JVM (They are not accessible outside the JVM).

 

    To set system properties you will need to specify each property in your <<<pom.xml>>> in the config element <<propertiesSystem>>. (The example below shows a property called <<my.system.property>> being set).

    The properties are merged into the JMeter properties file "system.properties" and overwrite identical properties within the file.

 

+---+

<project>

    [...]

    <build>

        <pluginManagement>

            <plugins>

                <plugin>

                    <groupId>${project.groupId}</groupId>

                    <artifactId>${project.artifactId}</artifactId>

                    <version>${project.version}</version>

                    <executions>

                        <execution>

                            <id>jmeter-tests</id>

                            <phase>verify</phase>

                            <goals>

                                <goal>jmeter</goal>

                            </goals>

                        </execution>

                    </executions>

                    <configuration>

                        <propertiesSystem>

                            <my.system.property>my.system.property.value</my.system.property>

                        </propertiesSystem>

                    </configuration>

                </plugin>

            </plugins>

        </pluginManagement>

    </build>

   [...]

</project>

Reply all
Reply to author
Forward
0 new messages