Maven Ant Plugin in JMeter
程序员文章站
2022-07-13 21:37:22
...
I have post 2 essay in my blog:
[JMeter Ant build]: http://howtesting.blogspot.com/2013/07/jmeter-ant-build.html
[JMeter Maven Tutorial]: http://howtesting.blogspot.com/2013/07/jmeter-maven-tutorial-version-181.html
Because Document of JMeter is very poor, If you like to make pom.xml, you should read source code of JMeter to understand better to create script.
So I like to use External Ant Script from a Maven Build for a Project.
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>ant-script-ex</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<skipTests>false</skipTests>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>id.validate</id>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<exec
dir="D:/apache-jmeter/jmeter/extras"
executable="C:/apache-ant-1.7.1/bin/ant.bat"
failonerror="true">
<arg line="-Dtest=script run report" />
</exec>
</tasks>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.8.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-ant-tasks</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
</dependency>
</dependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
|
Command to run pom.xml
Mvn validate
|
HoaLe
推荐阅读
-
使用maven-compiler-plugin以及maven-shade-plugin完成maven项目打包
-
针对maven install 报错:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1 解决方案
-
maven项目-修复Plugin execution not covered by lifecycle configuration: org.codehaus.
-
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.8:add-test-source (execution: add-functional-so
-
maven与ant的区别
-
Maven与Ant比较
-
解决maven-dependency-plugin (goals "copy-dependencies","unpack") is not supported
-
解决maven-dependency-plugin (goals "copy-dependencies","unpack") is not supported
-
Maven Release Plugin Prepare a Release and create new branch
-
Maven Ant Plugin in JMeter