Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/367.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中生成TestNG xslt报告_Java_Xml_Maven_Xslt_Selenium - Fatal编程技术网

Java 无法在maven中生成TestNG xslt报告

Java 无法在maven中生成TestNG xslt报告,java,xml,maven,xslt,selenium,Java,Xml,Maven,Xslt,Selenium,我无法在项目中生成TestNG xslt报告。我已经按照stackoverflow中提到/建议的建议和指南搜索并配置了我的pom.xml。请查看pom.xml并告诉我哪里错了 <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

我无法在项目中生成TestNG xslt报告。我已经按照stackoverflow中提到/建议的建议和指南搜索并配置了我的pom.xml。请查看pom.xml并告诉我哪里错了

<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>Recruitment</groupId>
<artifactId>Recruitment</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Recruitment</name>
<url>http://maven.apache.org</url>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>jexcelapi</groupId>
        <artifactId>jxl</artifactId>
        <version>2.4.2</version>
    </dependency>
    <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.4</version>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.38.0</version>
    </dependency>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.3.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.google.inject</groupId>
        <artifactId>guice</artifactId>
        <version>3.0</version>
        <scope>test</scope>
    </dependency>
</dependencies>
<build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.14.1</version>
            <configuration>
                <!-- Suite testng xml file to consider for test execution -->
                <suiteXmlFiles>
                    <suiteXmlFile>testng.xml</suiteXmlFile>
                </suiteXmlFiles>
                <!-- Setting properties for test execution -->
                <properties>
                    <!-- Setting ReportNG listeners -->
                    <property>
                        <name>listener</name>
                        <value>org.uncommons.reportng.HTMLReporter,
                            org.uncommons.reportng.JUnitXMLReporter</value>
                    </property>
                </properties>
            </configuration>
        </plugin>
    </plugins>
</build>

<reporting>
    <plugins>
        <!-- TestNG-xslt related configuration. -->
        <plugin>
            <groupId>org.reportyng</groupId>
            <artifactId>reporty-ng</artifactId>
            <version>1.2</version>
            <configuration>
                <!-- Output directory for the testng xslt report -->
                <outputDir>/target/testng-xslt-report</outputDir>
                <sortTestCaseLinks>true</sortTestCaseLinks>
                <testDetailsFilter>FAIL,SKIP,PASS,CONF,BY_CLASS</testDetailsFilter>
                <showRuntimeTotals>true</showRuntimeTotals>
            </configuration>
        </plugin>
    </plugins>
</reporting>

为什么要使用不同的源文件夹?您是否尝试过最新版本的maven surefire插件2.16@khmarbaise我已经更新了提到的插件,并将src位置更改为/src/target/,但仍然无法生成报告。你能从零开始一步一步地指导环境Maven-2、Windows7、EclipseJuno吗。