allure-framework / allure1

Allure 1 isn't supported any more, please consider using Allure 2 https://github.com/allure-framework/allure2 instead
Apache License 2.0
710 stars 168 forks source link

Maven site lifecycle failing while generating allure report #710

Closed Harshaec021 closed 9 years ago

Harshaec021 commented 9 years ago

Hi,

I am trying to run the "mvn site" to generate allure reports but I am getting below error due to which I am not able to generate the reports.

Error Output


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
----------------

```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>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>
Harshaec021 commented 9 years ago

@baev Could you please help me out ?

volkovs commented 9 years ago

@Harshaec021 It seems that you use old version of maven.

https://github.com/allure-framework/allure-core/wiki/FAQ-and-Troubleshooting#user-content-cant-generate-report-locally

baev commented 9 years ago

@volkovs :+1:

tratseuskaya commented 7 years ago

Hi, I got the same problem. terminal log: [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Allure TestNG Example 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ FinalTask --- [INFO] Deleting /Users/daryatratseuskaya/IdeaProjects/FinalTask/target [INFO] [INFO] --- maven-site-plugin:3.3:site (default-site) @ FinalTask --- [INFO] configuring report plugin ru.yandex.qatools.allure:allure-maven-plugin:2.6 [WARNING] No project URL defined - decoration links will not be relativized! [INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin. [INFO] Skipped "Allure" report, file "allure-maven-plugin.html" already exists for the English version. [INFO] Skipped "Allure" report, file "allure-maven-plugin.html" already exists for the English version. [INFO] Generating "Allure" report --- allure-maven-plugin:2.6 [INFO] Generate Allure report (aggregate) with version 1.4.16 [INFO] Generate Allure report to /Users/daryatratseuskaya/IdeaProjects/FinalTask/target/target/allure-reports/ [ERROR] Input directory should be not absolute for aggregate goal. [WARNING] Allure report was skipped because there is no results directories found. [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ FinalTask --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ FinalTask --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 7 source files to /Users/daryatratseuskaya/IdeaProjects/FinalTask/target/classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ FinalTask --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /Users/daryatratseuskaya/IdeaProjects/FinalTask/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ FinalTask --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 7 source files to /Users/daryatratseuskaya/IdeaProjects/FinalTask/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ FinalTask --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.533 s [INFO] Finished at: 2017-08-01T18:35:33+03:00 [INFO] Final Memory: 38M/331M

pom.xml `<?xml version="1.0" encoding="UTF-8"?> <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">

4.0.0
<groupId>FinalTask</groupId>
<artifactId>FinalTask</artifactId>
<version>1.0-SNAPSHOT</version>

    <!--<parent>-->
        <!--<groupId>ru.yandex.qatools.allure</groupId>-->
        <!--<artifactId>allure-examples-parent</artifactId>-->
        <!--<version>2.0</version>-->
    <!--</parent>-->

    <properties>
        <java.version>1.8</java.version>
        <allure.version>1.4.16</allure.version>
        <aspectj.version>1.8.5</aspectj.version>

    </properties>

    <name>Allure TestNG Example</name>
    <description>Allure TestNG Example</description>

    <dependencies>
        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-testng</artifactId>
            <version>2.0-BETA16</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.21</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.11</version>
        </dependency>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.4.0</version>
        </dependency>
        <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.16.16</version>
        <scope>provided</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/ru.yandex.qatools.allure/allure-maven-plugin -->
        <dependency>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-maven-plugin</artifactId>
            <version>2.6</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
                <configuration>
                    <testFailureIgnore>true</testFailureIgnore>
                    <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>
        </plugins>
    </build>

    <reporting>
        <!--<excludeDefaults>true</excludeDefaults>-->
        <!--<plugins>-->
            <!--<plugin>-->
                <!--<groupId>io.qameta.allure</groupId>-->
                <!--<artifactId>allure-maven</artifactId>-->
                <!--<version>2.8</version>-->
            <!--</plugin>-->
        <!--</plugins>-->
    <!--</reporting>-->
<!--<reporting>-->
    <excludeDefaults>true</excludeDefaults>
    <plugins>
        <plugin>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-maven-plugin</artifactId>
            <version>2.6</version>
            <configuration>
                <resultsDirectory>${project.build.directory}/target/allure-reports/</resultsDirectory>
                <inputDirectories>${project.build.directory}/target/allure-reports/</inputDirectories>
                <reportDirectory>${project.build.directory}/target/allure-reports/</reportDirectory>
                <reportingOutputDirectory>${project.build.directory}/target/allure-reports/</reportingOutputDirectory>
                <!--<failReportIfEmpty>false</failReportIfEmpty>-->
            </configuration>
        </plugin>
    </plugins>
</reporting>

</project>

` could you please help?

Thank you in advance!

tratseuskaya commented 7 years ago

folder is generated after are added to plugin config

tratseuskaya commented 7 years ago

Guys, please, help, seems problem with directories and got: [WARNING] Results directory for module Allure TestNG Example not found. [WARNING] Allure report was skipped because there is no results directories found.

<reporting>
            <!--<excludeDefaults>true</excludeDefaults>-->
            <!--<plugins>-->
                <!--<plugin>-->
                    <!--<groupId>io.qameta.allure</groupId>-->
                    <!--<artifactId>allure-maven</artifactId>-->
                    <!--<version>2.8</version>-->
                <!--</plugin>-->
            <!--</plugins>-->
        <!--</reporting>-->
    <!--<reporting>-->
        <excludeDefaults>true</excludeDefaults>
        <plugins>
            <plugin>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-maven-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <properties>
                    <resultsDirectory>${project.build.directory}/target/allure-results/</resultsDirectory>
                    <!--<inputDirectories>${project.build.directory}/target/allure-reports/</inputDirectories>-->
                    <reportDirectory>${project.build.directory}/target/allure-reports/</reportDirectory>                 <reportingOutputDirectory>${project.build.directory}/target/site/</reportingOutputDirectory>
                    </properties>
                    <!--<failReportIfEmpty>false</failReportIfEmpty>-->
                </configuration>
            </plugin>
        </plugins>
            <!--<reportingOutputDirectory>${project.build.directory}/target/site</reportingOutputDirectory>-->
    </reporting>

screenshot