簡體   English   中英

Maven站點生命周期在生成吸引力報告時失敗

[英]Maven site lifecycle failing while generating allure report

我正在嘗試運行“ mvn網站”以生成吸引人的報告,但由於出現錯誤,因此我無法生成報告,因此我遇到了以下問題。

提前致謝。


SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building AllureWebDriverMvnProj 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-site-plugin:3.0:site (default-site) @ AllureWebDriverMvnProj ---
[INFO] configuring report plugin ru.yandex.qatools.allure:allure-maven-plugin:2.4
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.198s
[INFO] Finished at: Sat Nov 21 13:54:00 IST 2015
[INFO] Final Memory: 17M/160M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:site (default-site) on project AllureWebDriverMvnProj: failed to get report for ru.yandex.qatools.allure:allure-maven-plugin: Unable to load the mojo 'report' (or one of its required components) from the plugin 'ru.yandex.qatools.allure:allure-maven-plugin:2.4': com.google.inject.ProvisionException: Guice provision errors:
[ERROR] 
[ERROR] 1) No implementation for org.eclipse.aether.RepositorySystem was bound.
[ERROR] while locating ru.yandex.qatools.allure.report.AllureReportMojo
[ERROR] at ClassRealm[plugin>ru.yandex.qatools.allure:allure-maven-plugin:2.4, parent: ClassRealm[plugin>org.apache.maven.plugins:maven-site-plugin:3.0, parent: sun.misc.Launcher$AppClassLoader@70dea4e]]
[ERROR] while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value=ru.yandex.qatools.allure:allure-maven-plugin:2.4:report)
[ERROR] 
[ERROR] 1 error
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: ru.yandex.qatools.allure:allure-maven-plugin:2.4:report
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Picked up _JAVA_OPTIONS: -Xmx512M

Pom.xml文件

下面是pom.xml,其中引用了allure插件,我正在使用allure testng適配器。

<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.mycomp</groupId>
    <artifactId>AllureWebDriverMvnProj</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>
    <properties>
        <allure.version>1.5.0-RC1</allure.version>
        <aspectj.version>1.8.7</aspectj.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.9.9</version>
        </dependency>
        <dependency>
            <groupId>ru.stqa.selenium</groupId>
            <artifactId>webdriver-factory</artifactId>
            <version>1.1.46</version>
        </dependency>
        <dependency>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-testng-adaptor</artifactId>
            <version>${allure.version}</version>
        </dependency>
    </dependencies>
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <configuration>
                            <filesets>
                                <fileset>
                                    <directory>${basedir}/target/site</directory>
                                    <directory>${basedir}/target/allure-results</directory>
                                </fileset>
                            </filesets>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
                <configuration>
                    <suiteXmlFiles>
                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                        <suiteXmlFile>src/test/resources/testng_demo.xml</suiteXmlFile>
                    </suiteXmlFiles>
                    <argLine>
                        -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                    </argLine>

                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.2.11.v20150529</version>
                <configuration>
                    <configuration>
                        <webAppSourceDirectory>../AllureWebDriverMvnProj/target/site/allure-maven-plugin/</webAppSourceDirectory>
                        <stopKey>stop</stopKey>
                        <stopPort>1234</stopPort>
                    </configuration>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <excludeDefaults>true</excludeDefaults>
        <plugins>
            <plugin>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-maven-plugin</artifactId>
                <version>2.4</version>
            </plugin>
        </plugins>
    </reporting>
    <!-- profiles -->
    <profiles>
        <!-- browsers -->
        <profile>
            <id>firefox</id>
            <properties>
                <capabilities>/firefox.capabilities</capabilities>
            </properties>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile>
            <id>chrome</id>
            <properties>
                <capabilities>/chrome.capabilities</capabilities>
            </properties>
        </profile>
        <profile>
            <id>ie</id>
            <properties>
                <capabilities>/ie.capabilities</capabilities>
            </properties>
        </profile>
        <profile>
            <id>safari</id>
            <properties>
                <capabilities>/safari.capabilities</capabilities>
            </properties>
        </profile>
        <profile>
            <id>phantomjs</id>
            <properties>
                <capabilities>/phantomjs.capabilities</capabilities>
            </properties>
        </profile>
        <profile>
            <id>opera</id>
            <properties>
                <capabilities>/opera.capabilities</capabilities>
            </properties>
        </profile>
        <profile>
            <id>htmlunit</id>
            <properties>
                <capabilities>/htmlunit.capabilities</capabilities>
            </properties>
        </profile>
        <!-- environments -->
        <profile>
            <id>localhost</id>
            <properties>
                <site.url>http://localhost/</site.url>
            </properties>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile>
            <id>devhost</id>
            <properties>
                <site.url>http://devhost/</site.url>
            </properties>
        </profile>
        <profile>
            <id>testhost</id>
            <properties>
                <site.url>http://testhost/</site.url>
            </properties>
        </profile>
        <profile>
            <id>prodhost</id>
            <properties>
                <site.url>http://prodhost.com/</site.url>
            </properties>
        </profile>
        <!-- grid -->
        <profile>
            <id>nogrid</id>
            <properties>
                <grid.url></grid.url>
            </properties>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile>
            <id>grid</id>
            <properties>
                <grid.url>http://localhost:4444/wd/hub/</grid.url>
            </properties>
        </profile>
    </profiles>
</project>

找到解決方案...使用偏好選項卡在Eclipse中手動安裝Maven。 首選項-> Maven->安裝->手動將Maven主目錄標記為“ Embedded”。這解決了我的問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM