The instructions say to add the environment.xml to the Allure results directory (https://github.com/allure-framework/allure-core/wiki/Environment) but this folder gets deleted on mvn clean so the files gets deleted with it. Is there a way to generate this file on every build?
Thanks.
Just put in in your src/main/resources/
and copy to your results directory via maven resources plugin on mvn test
or mvn site
:
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-allure-environment</id>
<phase>pre-site</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/allure-results</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>environment.xml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With