私はmavenに慣れていません。しかし、私はそれが一般的なビルドフレームワークであることを知っています。だから私は、以下のpom.xmlを作成して、コマンドラインでのテストを実行したい「MVN ATF:ITEST」:与えられたpomによって "mvn atf:itest"によってtest.shを実行したい
<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>
任意の提案を?
ありがとうございます!
「https://sanchitbahal.wordpress.com/2011/09/19/maven-exec-plugin-vs-maven-antrun-plugin-for-running-command-line-tool/」を参照してください。ただし、完全なpom.xmlとプラグインでコマンドを実行するコマンドは提供されていません。 – johnklee