1.搭建个Jenkins 环境
2.再Jenkins中安装maven 插件
3.Jenkins上新建选取构建maven项目,配置如下,其余均可默认
4.pom.xml文件如下:
<pluginRepositories>
<pluginRepository>
<id> smartbear- sweden-plugin -repository</ id>
<url> http://www.soapui.org/repository/maven2/</url >
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId> com.smartbear.soapui</groupId >
<artifactId> soapui-pro- maven-plugin </artifactId>
<!-- 根据实际情况填写版本号 -->
<version> 5.1.1</version >
<configuration>
</configuration>
<dependencies>
<dependency>
<groupId> org.reflections</groupId >
<artifactId> reflections</artifactId >
<version> 0.9.9-RC1</version >
</dependency>
<dependency>
<groupId> org.apache.poi</groupId >
<artifactId> poi-ooxml</ artifactId>
<version> 3.10-FINAL</version >
</dependency>
</dependencies>
<executions>
<execution>
<phase> test</phase >
<goals>
<goal> test</goal >
</goals>
<configuration>
<!--填写需要执行的脚本路径 -->
<projectFile> F:\soapUI\REST-Project-1-soapui-project.xml </projectFile>
<projectProperties>
<value> message=API TEST</value>
</projectProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</pre><pre name="code" class="html">
5. 构建
如果构建从maven中心下载插件很慢的话,可以自己搭建个maven 私服