Package com.lazerycode.jmeter.mojo
Class ConfigureJMeterMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.lazerycode.jmeter.mojo.AbstractJMeterMojo
-
- com.lazerycode.jmeter.mojo.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 phaseLifecyclePhase.COMPILE
.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<RepositoryConfiguration>
additionalRepositories
protected Path
binDirectory
protected Path
customPropertiesDirectory
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>protected boolean
downloadJMeterDependencies
Download all transitive dependencies of the JMeter artifacts.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>protected boolean
downloadOptionalDependencies
Download all optional transitive dependencies of artifacts.protected org.eclipse.aether.artifact.Artifact
jmeterConfigArtifact
protected Path
jmeterDirectoryPath
protected List<String>
jmeterExtensions
A list of artifacts that should be copied into the lib/ext directory e.g.protected List<String>
junitLibraries
A list of artifacts that should be copied into the lib/junit directory e.g.protected Path
libDirectory
protected Path
libExtDirectory
protected Path
libJUnitDirectory
protected File
propertiesFilesDirectory
Path under which .properties files are stored.protected Map<String,String>
propertiesGlobal
JMeter Global Properties that override those given in jmeterProps.protected Map<String,String>
propertiesJMeter
Absolute path to JMeter custom (test dependent) properties file.protected boolean
propertiesReplacedByCustomFiles
Replace the default JMeter properties with any custom properties files supplied.protected Map<String,String>
propertiesReportGenerator
JMeter Properties that are merged with precedence into default JMeter file in reportgenerator.propertiesprotected Map<String,String>
propertiesSaveService
JMeter Properties that are merged with precedence into default JMeter file in saveservice.propertiesprotected Map<String,String>
propertiesSystem
(Java) System properties set for the test run.protected Map<String,String>
propertiesUpgrade
JMeter Properties that are merged with precedence into default JMeter file in upgrade.propertiesprotected Map<String,String>
propertiesUser
JMeter Properties that are merged with precedence into default JMeter file in user.properties user.properties takes precedence over jmeter.propertiesprotected String
resultsFileFormat
Set the format of the results generated by JMeter Valid values are: xml, csv (CSV set by default).protected boolean
resultsOutputIsCSVFormat
protected List<String>
testPlanLibraries
A list of artifacts that are used by the test like JMS activemq.-
Fields inherited from class com.lazerycode.jmeter.mojo.AbstractJMeterMojo
appendResultsTimestamp, confFilesDirectory, customPropertiesFiles, DEFAULT_CONFIG_EXECUTION_ID, doNotFailBuildIfJVMIsKilled, generateReports, JMETER_ARTIFACT_NAME, JMETER_ARTIFACT_PREFIX, JMETER_CONFIG_ARTIFACT_NAME, jMeterProcessJVMSettings, JORPHAN_ARTIFACT_NAME, LINE_SEPARATOR, logsDirectory, mojoExecution, overrideRootLogLevel, postTestPauseInSeconds, projectBuildDirectory, proxyConfig, remoteConfig, reportDirectory, resultsDirectory, resultsFileNameDateFormat, selectedConfiguration, session, settings, skipTests, suppressJMeterOutput, testConfig, testConfigFile, testFilesBuildDirectory, testFilesDirectory, testFilesExcluded, testFilesIncluded, testResultsTimestamp, useMavenProxy
-
-
Constructor Summary
Constructors Constructor Description ConfigureJMeterMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doExecute()
Configure a local instance of JMetervoid
setDefaultPluginProperties(String userDirectory)
protected void
setJMeterResultFileFormat()
-
Methods inherited from class com.lazerycode.jmeter.mojo.AbstractJMeterMojo
computeJMeterArgumentsArray, execute, loadMavenProxy
-
-
-
-
Field Detail
-
additionalRepositories
@Parameter protected List<RepositoryConfiguration> additionalRepositories
-
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
-
-
Method Detail
-
doExecute
public void doExecute() throws org.apache.maven.plugin.MojoExecutionException
Configure a local instance of JMeter- Specified by:
doExecute
in classAbstractJMeterMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
- Exception
-
setJMeterResultFileFormat
protected void setJMeterResultFileFormat()
-
setDefaultPluginProperties
public void setDefaultPluginProperties(String userDirectory)
-
-