jenkins无法在pom.xml中找到java测试类

时间:2016-05-13 15:55:49

标签: maven selenium-webdriver jenkins pom.xml

下面是我用于链接到测试java文件的pom.xml代码。我正在给jenkins这条pom.xml路径使用,但jenkins'控制台输出仍显示:

  

无法加载主类

<build>
    <directory>C:/Users/etuslik/IdeaProjects/gmail-webui-test/target</directory>
    <outputDirectory>C:/Users/etuslik/IdeaProjects/gmail-webui-test/classes</outputDirectory>
    <sourceDirectory>C:/Users/etuslik/IdeaProjects/gmail-webui-test/src/main/java</sourceDirectory>
    <!-- TODO: MNG-3731 maven-plugin-tools-api < 2.4.4 expect this to be relative... -->
    <testSourceDirectory>C:/Users/etuslik/IdeaProjects/gmail-webui-test/src/test/java</testSourceDirectory>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.4.3</version>
            <configuration>
                <includes>
                    <include>C:/Users/etuslik/IdeaProjects/gmail-webui-test/Test/java</include>
                </includes>
            </configuration>

1 个答案:

答案 0 :(得分:0)

您的实施是错误的。 1.包含任何特定的java文件

  <includes>
        <include>Sample.java</include>
  </includes>

2。包括包

  <includes>
        <include>my.package.*, my.package2.*</include>
  </includes>