Не находится директория для allure-results (allure-maven-plugin)

Добрый день.
Пытаюсь сделать отчет allure (java+junit+allure-maven-plugin)
mvn site выдает следующее

[INFO] — maven-site-plugin:3.3:site (default-site) @ test —
[INFO] configuring report plugin ru.yandex.qatools.allure:allure-maven-plugin:2.3
Downloading: https://repo.maven.apache.org/maven2/ru/yandex/qatools/allure/allure-maven-plugin/2.3/allure-maven-plugin-2.3.pom
4/10 KB 8/10 KB 10/10 KB Downloaded: https://repo.maven.apache.org/maven2/ru/yandex/qatools/allure/allure-maven-plugin/2.3/allure-maven-plugin-2.3.pom (10 KB at 5.9 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/ru/yandex/qatools/allure/allure-maven-plugin/2.3/allure-maven-plugin-2.3.jar
4/24 KB 8/24 KB 12/24 KB 16/24 KB 20/24 KB 24/24 KB 24/24 KB Downloaded: https://repo.maven.apache.org/maven2/ru/yandex/qatools/allure/allure-maven-plugin/2.3/allure-maven-plugin-2.3.jar (24 KB at 89.9 KB/sec)
[INFO] Relativizing decoration links with respect to project URL: http://maven.apache.org
[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.3
[INFO] Generate Allure report (report) with version RELEASE
[INFO] Generate Allure report to D:\Study\Java\Mars_workspase\test-master\test-master\target\site/allure-maven-plugin
[ERROR] Directory D:\Study\Java\Mars_workspase\test-master\test-master\target\allure-results not found.
[WARNING] Allure report was skipped because there is no results directories found.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

Подскажите, пожалуйста, как мне решить эту проблему?

pom.xml

  <plugin>
	    <groupId>ru.yandex.qatools.allure</groupId>
	    <artifactId>allure-maven-plugin</artifactId>
	    <version>2.3</version>
	    <configuration>
	        <resultsDirectory>allure-results</resultsDirectory>
	         <reportDirectory>allure-report</reportDirectory>
	    </configuration>
	</plugin>

...
 <reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-maven-plugin</artifactId>
<version>2.3</version>

В мене ідентична проблема в мульти модульному проекті…

мой вариант указанной секции:

<reporting>
    <excludeDefaults>true</excludeDefaults>
    <plugins>
      <plugin>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-maven-plugin</artifactId>
        <configuration>
          <resultsDirectory>allure-results</resultsDirectory>
        </configuration>
        <version>2.4</version>
      </plugin>
    </plugins>
  </reporting>

<reporting> <excludeDefaults>true</excludeDefaults> <plugins> <plugin> <groupId>ru.yandex.qatools.allure</groupId> <artifactId>allure-maven-plugin</artifactId> <version>${allure.plugin.version}</version> <configuration> <resultsPattern>target\xml-test-report</resultsPattern> <outputDirectory>target\graph-test-report</outputDirectory> </configuration> </plugin> </plugins> </reporting>

Спасибо, что откликнулись :slight_smile:
В обоих случаях:
https:[ERROR] Input directory should be not absolute for aggregate goal.
[WARNING] Allure report was skipped because there is no results directories foun
d.

Я сейчас возможно сморожу, но вы не обижайтесь, я ж из лучших побуждений. Вот вы делаете mvn site, как результат there is no results directories found. Но где прогон тестов, результаты которых нужно обработать? То есть, надо бы, как по-мне, mvn test site сделать, чтобы были какие-то результаты, которые можно перерабатывать в отчет.

Да, я делаю mvn clean test site (clean при изменениях)
В логе

T E S T S

Running testsum.my.ru.test.MathTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.878 sec

Results :

Tests run: 4, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] — maven-site-plugin:3.3:site (default-site) @ testMathOperation —
[INFO] configuring report plugin ru.yandex.qatools.allure:allure-maven-plugin:2.
5
[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 ski
n.
[INFO] Skipped “Allure” report, file “allure-maven-plugin.html” already exists f
or the English version.
[INFO] Skipped “Allure” report, file “allure-maven-plugin.html” already exists f
or the English version.
[INFO] Generating “Allure” report — allure-maven-plugin:2.5
[INFO] Generate Allure report (aggregate) with version RELEASE
[INFO] Generate Allure report to D:\Jukki\GitHub\test-master2\test-master\target
\site/allure-maven-plugin
[ERROR] Input directory should be not absolute for aggregate goal.
[WARNING] Allure report was skipped because there is no results directories foun
d.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.569 s
[INFO] Finished at: 2016-01-31T01:27:10+03:00
[INFO] Final Memory: 25M/274M
[INFO] ------------------------------------------------------------------------

В моем понимании, несколько странно, что для команды site BUILD SUCCESS при наличии ошибки

Генерация репорта относится к post-build actions, так что наверное данная ошибка не рассматривается в контексте билда.

<reporting>
		<excludeDefaults>true</excludeDefaults>
		<plugins>
			<plugin>
				<groupId>ru.yandex.qatools.allure</groupId>
				<artifactId>allure-maven-plugin</artifactId>
				<version>${allure.plugin.version}</version>
				<configuration>
					<resultsDirectory>${allure.xml.dir}</resultsDirectory> 
					<reportDirectory>${project.build.directory}/graph-test-report</reportDirectory>
					<properties>
       					<allure.issues.tracker.pattern>https://issues.corp.twilio.com/browse/%s</allure.issues.tracker.pattern>
  					</properties>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

Коллеги, кто сталкивался со следующей проблемой Allure 2.0:
[WARNING] The POM for ru.yandex.qatools.allure:allure-bundle:jar:2.0-BETA6 is missing, no dependency information available

POM-ник брал из доки Allure (Allure Framework):

<?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">
    <modelVersion>4.0.0</modelVersion>

    <groupId>allure20impl</groupId>
    <artifactId>allure20impl</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <compiler.plugin.version>3.6.0</compiler.plugin.version>
        <java.version>1.8</java.version>
        <surefire.plugin.version>2.19.1</surefire.plugin.version>
        <allure.version>2.0-BETA6</allure.version>
        <aspectj.version>1.8.10</aspectj.version>
        <allure.results.directory>
            ${project.build.directory}/allure-results
        </allure.results.directory>
        <tms>
            https://github.com/allure-framework/allure-docs/issues/{}
        </tms>
        <issues.tracker>
            https://github.com/allure-framework/allure-docs/issues/{}
        </issues.tracker>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-testng</artifactId>
            <version>${allure.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${compiler.plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire.plugin.version}</version>
                <configuration>
                    <properties>
                        <property>
                            <name>usedefaultlisteners</name>
                            <value>false</value>
                        </property>
                    </properties>
                    <systemProperties>
                        <property>
                            <name>allure.results.directory</name>
                            <value>${allure.results.directory}</value>
                        </property>
                        <property>
                            <name>allure.link.issue.pattern</name>
                            <value>${issues.tracker}</value>
                        </property>
                        <property>
                            <name>allure.link.tms.pattern</name>
                            <value>${tms}</value>
                        </property>
                    </systemProperties>
                    <suiteXmlFiles>
                        <suiteXmlFile>
                            src/test/resources/testng.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>
        </plugins>
    </build>

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

Пробовал менять <allure.version>2.0-BETA6</allure.version> на RELEASE/LATEST, получил:

[ERROR] Input directory should be not absolute for aggregate goal.
[WARNING] Allure report was skipped because there is no results directories found.

Старый плагин уберите из зависимостей. Для новой версии он еще не написан. Генерировать репорт надо через command-line.

1 лайк

Спасибо, взлетело без проблем!