Class ConfigureJMeterMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="configure",
          defaultPhase=COMPILE)
    public class ConfigureJMeterMojo
    extends AbstractJMeterMojo
    Goal that configures Apache JMeter bundle.
    This goal is also called by other goals.
    This goal runs within Lifecycle phase LifecyclePhase.COMPILE.
    • Field Detail

      • downloadExtensionDependencies

        @Parameter(defaultValue="true")
        protected boolean downloadExtensionDependencies
        Download all dependencies of files you want to add to lib/ext and copy them to lib/ext too
        <downloadExtensionDependencies>   <true> <downloadExtensionDependencies>
      • jmeterExtensions

        @Parameter
        protected List<String> jmeterExtensions
        A list of artifacts that should be copied into the lib/ext directory e.g.
        <jmeterExtensions>   <artifact>kg.apc:jmeter-plugins:1.3.1</artifact> <jmeterExtensions>
      • downloadJMeterDependencies

        @Parameter(defaultValue="true")
        protected boolean downloadJMeterDependencies
        Download all transitive dependencies of the JMeter artifacts.
        <downloadJMeterDependencies>   <false> <downloadJMeterDependencies>
      • downloadOptionalDependencies

        @Parameter(defaultValue="false")
        protected boolean downloadOptionalDependencies
        Download all optional transitive dependencies of artifacts.
        <downloadOptionalDependencies>   <true> <downloadOptionalDependencies>
      • downloadLibraryDependencies

        @Parameter(defaultValue="true")
        protected boolean downloadLibraryDependencies
        Download all dependencies of files you want to add to lib/junit and copy them to lib/junit too
        <downloadLibraryDependencies>   <true> <downloadLibraryDependencies>
      • junitLibraries

        @Parameter
        protected List<String> junitLibraries
        A list of artifacts that should be copied into the lib/junit directory e.g.
        <junitLibraries>   <artifact>com.foo.project.junit:junit-test:1.0.0</artifact> <junitLibraries>
      • testPlanLibraries

        @Parameter
        protected List<String> testPlanLibraries
        A list of artifacts that are used by the test like JMS activemq. In a Non Maven JMeter configuration, these libraries would be copied into the lib/ directory The maven plugin will copy those in lib/ folder of the built jmeter configuration e.g.
        <testPlanLibraries>   <artifact>org.apache.activemq:activemq-client:5.15.2</artifact> <junitLibraries>
      • propertiesJMeter

        @Parameter
        protected Map<String,​String> propertiesJMeter
        Absolute path to JMeter custom (test dependent) properties file.
      • propertiesSaveService

        @Parameter
        protected Map<String,​String> propertiesSaveService
        JMeter Properties that are merged with precedence into default JMeter file in saveservice.properties
      • propertiesReportGenerator

        @Parameter
        protected Map<String,​String> propertiesReportGenerator
        JMeter Properties that are merged with precedence into default JMeter file in reportgenerator.properties
      • propertiesUpgrade

        @Parameter
        protected Map<String,​String> propertiesUpgrade
        JMeter Properties that are merged with precedence into default JMeter file in upgrade.properties
      • propertiesUser

        @Parameter
        protected Map<String,​String> propertiesUser
        JMeter Properties that are merged with precedence into default JMeter file in user.properties user.properties takes precedence over jmeter.properties
      • propertiesGlobal

        @Parameter
        protected Map<String,​String> propertiesGlobal
        JMeter Global Properties that override those given in jmeterProps.
        This sets local and remote properties (JMeter's definition of global properties is actually remote properties) and overrides any local/remote properties already set
      • propertiesSystem

        @Parameter
        protected Map<String,​String> propertiesSystem
        (Java) System properties set for the test run. Properties are merged with precedence into default JMeter file system.properties
      • propertiesFilesDirectory

        @Parameter(defaultValue="${basedir}/src/test/jmeter")
        protected File propertiesFilesDirectory
        Path under which .properties files are stored. Defaults to ${basedir}/src/test/jmeter
      • propertiesReplacedByCustomFiles

        @Parameter(defaultValue="true")
        protected boolean propertiesReplacedByCustomFiles
        Replace the default JMeter properties with any custom properties files supplied. (If set to false any custom properties files will be merged with the default JMeter properties files, custom properties will overwrite default ones)
      • resultsFileFormat

        @Parameter(defaultValue="csv")
        protected String resultsFileFormat
        Set the format of the results generated by JMeter Valid values are: xml, csv (CSV set by default).
      • resultsOutputIsCSVFormat

        protected boolean resultsOutputIsCSVFormat
      • jmeterConfigArtifact

        protected org.eclipse.aether.artifact.Artifact jmeterConfigArtifact
      • customPropertiesDirectory

        protected Path customPropertiesDirectory
      • jmeterDirectoryPath

        protected Path jmeterDirectoryPath
      • binDirectory

        protected Path binDirectory
      • libDirectory

        protected Path libDirectory
      • libExtDirectory

        protected Path libExtDirectory
      • libJUnitDirectory

        protected Path libJUnitDirectory
    • Constructor Detail

      • ConfigureJMeterMojo

        public ConfigureJMeterMojo()
    • Method Detail

      • doExecute

        public void doExecute()
                       throws org.apache.maven.plugin.MojoExecutionException
        Configure a local instance of JMeter
        Specified by:
        doExecute in class AbstractJMeterMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException - Exception
      • setJMeterResultFileFormat

        protected void setJMeterResultFileFormat()
      • setDefaultPluginProperties

        public void setDefaultPluginProperties​(String userDirectory)