【发布时间】:2017-06-21 11:19:32
【问题描述】:
我不熟悉maven。但是,我知道它是一个流行的构建框架。所以我在下面创建了一个 pom.xml 并希望使用命令行“mvn atf:itest”执行测试:
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>john.test</groupId>
<artifactId>Maventest</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Maventest</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>atf</groupId>
<artifactId>itest</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>ITest</id>
<phase>Testing</phase>
<goals>
<goal>itest</goal>
</goals>
<configuration>
<executable>${basedir}/scripts/test.py</executable>
<arguments>
<argument>-s</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
有什么建议吗?
【问题讨论】:
-
我只是指“sanchitbahal.wordpress.com/2011/09/19/…”。但是,它没有提供完整的 pom.xml 和在插件中执行命令的命令。