Есть отличная удаленная работа для php+codeception+jenkins+allure+docker спецов. 100% remote! Присоединиться к проекту

[Resolved] Проблема с генерацией отчётов Allure

allure
Теги: #<Tag:0x00007f7b70b33b00>

(Roman Zuev) #1

INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:44 min
[INFO] Finished at: 2015-07-02T17:54:22+07:00
[INFO] Final Memory: 52M/319M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project vis-web-testing: Error during page generation: Error rendering Maven report: Can’t generate allure report data: ru.yandex.qatools.clay.AetherException: Can’t resolve given artifact ru.yandex.qatools.allure:allure-report-data:jar:2.2: Failure to find ru.yandex.qatools.allure:allure-report-data:jar:2.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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

Помогите разобраться в чём проблема?

Pom.xml

<?xml version="1.0" encoding="UTF-8"?>


4.0.0

<groupId>com.ats</groupId>
<artifactId>vis-web-testing</artifactId>
<version>0.0.1</version>

<properties>
    <allure.version>2.2</allure.version>
    <aspectj.version>1.7.3</aspectj.version>
    <encoding>UTF-8</encoding>
</properties>

<dependencies>

    <!-- Testing framework -->
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>RELEASE</version>
    </dependency>

    <!-- Assumptions for TestNG -->
    <dependency>
        <groupId>nl.javadude.assumeng</groupId>
        <artifactId>assumeng</artifactId>
        <version>RELEASE</version>
        <exclusions>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <!-- Matchers -->
    <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.cthul</groupId>
        <artifactId>cthul-matchers</artifactId>
        <version>RELEASE</version>
    </dependency>
    <dependency>
        <groupId>ru.yandex.qatools.matchers</groupId>
        <artifactId>webdriver-matchers</artifactId>
        <version>RELEASE</version>
    </dependency>
    <dependency>
        <groupId>ru.yandex.qatools.matchers</groupId>
        <artifactId>matcher-decorators</artifactId>
        <version>RELEASE</version>
    </dependency>
    <dependency>
        <groupId>ru.yandex.qatools.matchers</groupId>
        <artifactId>collection-matchers</artifactId>
        <version>RELEASE</version>
    </dependency>

    <!-- DI -->
    <dependency>
        <groupId>com.google.inject</groupId>
        <artifactId>guice</artifactId>
        <version>3.0</version>
    </dependency>

    <!-- Reporting -->
    <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-testng-adaptor</artifactId>
        <version>1.3.9</version>
    </dependency>
    <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-java-annotations</artifactId>
        <version>1.4.10</version>
    </dependency>
    <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-java-aspects</artifactId>
        <version>1.4.11</version>
    </dependency>
    <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-report-data</artifactId>
        <version>1.4.14</version>
    </dependency>

    <!-- WebDriver -->
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.46.0</version>
    </dependency>

    <!-- Barancev's WebDriver factory -->
    <dependency>
        <groupId>ru.stqa.selenium</groupId>
        <artifactId>webdriver-factory</artifactId>
        <version>RELEASE</version>
    </dependency>

    <!-- Aspects weaving -->
    <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjrt</artifactId>
        <version>${aspectj.version}</version>
    </dependency>

    <!-- Page object pattern enhancement -->

    <dependency>
        <groupId>ru.yandex.qatools.htmlelements</groupId>
        <artifactId>htmlelements-java</artifactId>
        <version>1.13</version>
    </dependency>
    <!-- Apache poi for docx-->
    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi</artifactId>
        <version>3.9</version>
    </dependency>
    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>3.9</version>
    </dependency>
    <dependency>
        <groupId>org.docx4j</groupId>
        <artifactId>docx4j</artifactId>
        <version>2.8.1</version>
    </dependency>

</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
                <encoding>UTF-8</encoding>
            </configuration>
        </plugin>
        <!--Without surefire plugin TestNG tests will run in one Suite with name "Common Suite" -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.16</version>
            <configuration>
                <groups>new</groups>
                <testFailureIgnore>true</testFailureIgnore>
                <systemPropertyVariables>
                    <webdriver.chrome.driver>src/test/resources/chromedriver.exe</webdriver.chrome.driver>
                </systemPropertyVariables>
                <argLine>
                    -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                </argLine>
                <systemProperties>
                    <property>
                        <name>aj.weaving.verbose</name>
                        <value>true</value>
                    </property>
                </systemProperties>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                    <version>${aspectj.version}</version>
                </dependency>
            </dependencies>
        </plugin>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>aspectj-maven-plugin</artifactId>
            <version>1.5</version>
            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal><!-- to weave all your main classes -->
                        <goal>test-compile</goal><!-- to weave all your test classes -->
                    </goals>
                </execution>
            </executions>
            <configuration>
                <sources>
                    <source>
                        <basedir>src</basedir>
                        <includes>
                            <include>**/*.java</include>
                        </includes>
                    </source>
                </sources>
                <complianceLevel>1.7</complianceLevel>
                <outxml>false</outxml>
                <verbose>true</verbose>
                <showWeaveInfo>true</showWeaveInfo>
            </configuration>
        </plugin>

        <!-- Jetty plugin to run Allure web interface -->
        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>8.1.15.v20140411</version>
            <configuration>
                <stopKey>stopjetty</stopKey>
                <stopPort>8079</stopPort>
                <webAppSourceDirectory>${project.build.directory}/site/allure-maven-plugin</webAppSourceDirectory>
            </configuration>
        </plugin>
    </plugins>
</build>

<!-- Allure Maven Plugin -->
<reporting>
    <excludeDefaults>true</excludeDefaults>
    <outputDirectory>${project.build.directory}/site</outputDirectory>
    <plugins>
        <plugin>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-maven-plugin</artifactId>
            <version>${allure.version}</version>
        </plugin>
</plugins>
</reporting>

(Maksim Smolyakov) #2

Последняя версия - 1.4.14 http://search.maven.org/#search|ga|1|allure-report-data


(Roman Zuev) #3

@msmolyakov

<reporting>
    <excludeDefaults>true</excludeDefaults>
    <outputDirectory>${project.build.directory}/site</outputDirectory>
    <plugins>
        <plugin>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-maven-plugin</artifactId>
            <version>${allure.version}</version>
        </plugin>
        <plugin>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-report-data</artifactId>
            <version>1.4.14</version>
        </plugin>
</plugins>
</reporting>

Ну добавляю в Pom.xml в секцию reporting такую запись и всё равно ошибка

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project vis-web-testing: failed to get report for ru.yandex.qatools.allure:allure-report-data: Failed to parse plugin descriptor for ru.yandex.qatools.allure:allure-report-data:1.4.14 (C:\Users\user.m2\repository\ru\yandex\qatools\allure\allure-report-data\1.4.14\allure-report-data-1.4.14.jar): No plugin descriptor found at META-INF/maven/plugin.xml -> [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


(Maksim Smolyakov) #4

Решение в одной из недавних тем:


(Roman Zuev) #5

@msmolyakov Так я же локально пытаюсь тесты запустить, а не через тимсити.


(Roman Zuev) #6

Проблема решилась, добавлением конфигурации в allure-maven

        <plugin>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-maven-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <resultsPattern>${project.build.directory}/allure-results</resultsPattern>
                <reportVersion>1.3.9</reportVersion>
            </configuration>

(Mechanicum Gerz) #7

не кто не сталкивался с тем что IDEA почему-то выделяет строку и требует NameSpace Prefix, что нужно указать, подскажите пожалуйста

<reporting>
    <excludeDefaults>true</excludeDefaults>
    <plugins>
        <plugin>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-maven-plugin</artifactId>
            <version>${allure.plugin.version}</version>
            <configuration>
                <allureresultsdirectory>${project.build.directory}/allure-results</allureresultsdirectory>
            </configuration>
        </plugin>
    </plugins>
</reporting>

(Ayarema) #8

Привет. У меня таже проблема. Попробовал твой вариант - заработало. Единственное, чтобы уйти от ошибки синтаксиса в идейке, прописал вместо тега allureresultsdirectory тег resultsDirectory.

Ошибки синтаксиса нет и проект билдается успешно.


(Julian Kolodzey) #9

В моем случае при выполнении mvn clean test site выдает ERROR вот с такой портянкой:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project yandex: Error during page generation: Error rendering Maven report: Cou
ld not generate the report: Can't resolve one or more given artifacts [org.jvnet.jaxb2_commons:jaxb2-basics-runtime:jar:0.9.3, commons-beanutils:commons-beanutils-core:jar:1.8.3, o
rg.slf4j:slf4j-api:jar:1.7.10, org.pegdown:pegdown:jar:1.4.2, ru.yandex.qatools.allure:allure-model:jar:1.4.14, ru.yandex.qatools.allure:allure-bundle:jar:1.4.14, com.google.inject
:guice:jar:3.0, com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.3.0, org.parboiled:parboiled-core:jar:1.1.6, log4j:log4j:jar:1.2.17, ru.yandex.qatools.allure:all
ure-report-face:war:1.4.14, org.ow2.asm:asm-util:jar:4.1, org.codehaus.groovy:groovy:jar:indy:2.4.3, org.slf4j:slf4j-log4j12:jar:1.7.10, org.ow2.asm:asm-tree:jar:4.1, ru.yandex.qat
ools.allure:allure-commons:jar:1.4.14, org.modelmapper:modelmapper:jar:0.7.3, ru.yandex.qatools.properties:properties-loader:jar:1.5, com.fasterxml.jackson.core:jackson-core:jar:2.
3.0, ru.yandex.qatools.allure:allure-report-data:jar:1.4.14, com.fasterxml.jackson.core:jackson-databind:jar:2.3.0, org.parboiled:parboiled-java:jar:1.1.6, com.google.guava:guava:j
ar:18.0, commons-logging:commons-logging:jar:1.1.1, aopalliance:aopalliance:jar:1.0, commons-io:commons-io:jar:2.4, ru.yandex.qatools.allure:allure-report-plugin-api:jar:1.4.14, ja
vax.inject:javax.inject:jar:1, org.ow2.asm:asm:jar:4.1, org.ow2.asm:asm-analysis:jar:4.1, com.fasterxml.jackson.core:jackson-annotations:jar:2.3.0]: Failure to find ru.yandex.qatoo
ls.allure:allure-bundle:jar:1.4.14 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of centr
al has elapsed or updates are forced -> [Help 1]

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">
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <allure.version>1.4.14</allure.version>
        <aspectj.version>1.7.4</aspectj.version>
    </properties>
    <modelVersion>4.0.0</modelVersion>
    <groupId>sbt</groupId>
    <artifactId>yandex</artifactId>
    <version>1.0-SNAPSHOT</version>
    <build>
        <testSourceDirectory>${basedir}/src/main/java/sbt/yandex</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <argLine>
                        -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                    </argLine>
                    <properties>
                        <property>
                            <name>listener</name>
                            <value>ru.yandex.qatools.allure.junit.AllureRunListener</value>
                        </property>
                    </properties>
                    <dependencies>
                        <dependency>
                            <groupId>org.aspectj</groupId>
                            <artifactId>aspectjweaver</artifactId>
                            <version>${aspectj.version}</version>
                        </dependency>
                    </dependencies>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <excludeDefaults>true</excludeDefaults>
        <plugins>
            <plugin>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-maven-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <resultsDirectory>${project.build.directory}/allure-results</resultsDirectory>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>2.53.0</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
        </dependency>
        <dependency>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-junit-adaptor</artifactId>
            <version>${allure.version}</version>
        </dependency>
    </dependencies>
</project>

Вроде, все по мурзилке прописал…
Может, jdk8?..

st

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project yandex: Error during pa
ge generation
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error during page generation
        at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:143)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 20 more