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. 構建