我想将“魅力”报告导出到特定目录。我创建了具有allure.properties
属性的allure.report.directory=target/allure-reports
文件,但是当我执行mvn allure:report
时,报告将保存在target\site\allure-maven-plugin
中。
这是我的pom.xml
中有意义的部分:
<properties>
<junit.version>5.5.2</junit.version>
<spring.version>5.2.1.RELEASE</spring.version>
<spring-boot.version>2.2.1.RELEASE</spring-boot.version>
<aspectj.version>1.9.4</aspectj.version>
<allure.version>2.13.0</allure.version>
<rest-assured.version>4.1.2</rest-assured.version>
</properties>
<dependencies>
<!-- tag::allure[] -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-junit5</artifactId>
<version>${allure.version}</version>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-rest-assured</artifactId>
<version>${allure.version}</version>
</dependency>
<!-- end::allure[] -->
</dependencies>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<systemProperties>
<property>
<name>junit.jupiter.extensions.autodetection.enabled</name>
<value>true</value>
</property>
</systemProperties>
<skipITs>${skipITs}</skipITs>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.10.0</version>
<configuration>
<propertiesFilePath>allure.properties</propertiesFilePath>
</configuration>
</plugin>
</plugins>
</build>