Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 运行maven+;来自命令行的eclipse_Java_Maven_Command Line - Fatal编程技术网

Java 运行maven+;来自命令行的eclipse

Java 运行maven+;来自命令行的eclipse,java,maven,command-line,Java,Maven,Command Line,我已经用下面的pom.xml在eclipse中创建了一个maven项目 <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"> <

我已经用下面的pom.xml在eclipse中创建了一个maven项目

<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>com.omniture.selenium</groupId>
<artifactId>Omniture</artifactId>
<version>0.0.1-SNAPSHOT</version>

<dependencies>

    <dependency>
        <groupId>org.jbehave.web</groupId>
        <artifactId>jbehave-web-selenium</artifactId>
        <version>3.5.5</version>
    </dependency>

    <dependency>
        <groupId>org.jbehave</groupId>
        <artifactId>jbehave-core</artifactId>
        <version>3.8</version>
    </dependency>

    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>2.0.11</version>
    </dependency>
    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact</artifactId>
        <version>2.0.11</version>
    </dependency>
    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-project</artifactId>
        <version>2.0.11</version>
    </dependency>

    <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-archiver</artifactId>
        <version>1.2</version>
    </dependency>

</dependencies>
mvn测试-Dtest=

如果你想运行一个给定的测试类,上面的代码可以帮你完成。但是,正如前面提到的,当您调用包目标时,maven将自动运行测试,将上面的命令呈现给向导的黑暗角落,凡人不必涉足。

运行
package
不是在进行构建之前自动运行JUnit测试吗?我是这方面的新手。:)所以,请指导我运行这个软件包。我告诉你们,当你们运行这个软件包时,maven会自动为你们运行单元测试。我没有更多的指导了。谢谢你的时间:)我也应该投票支持它。。。
/Users/support/Documents/Omniture/src/test/java/com/testOmnitureSelenium
mvn test -Dtest=<testclass>