I have a spring-boot application for which i want to add the allure framework for order generation.
so we have an working spring boot app and i start to configure the pom.xml for the work with allure, namely, i add this in my pom:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
<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>
<property>
<name>allure.results.directory</name>
<value>${project.build.directory}/allure-results</value>
</property>
</systemProperties>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.9.9.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.11.2</version>
<configuration>
<reportVersion>2.10.0</reportVersion>
</configuration>
</plugin>
</plugins>
</build>
Its already correct worked in app without spring. But now after adding the configuration my spring-boot application starter crushed with error:
Caused by: java.lang.ClassNotFoundException: org.springframework.data.jpa.repository.support.SimpleJpaRepository$AjcClosure75
This rar include the full report which Aspectjweaver autogenered: https://drive.google.com/file/d/1soZMcNkDHvsFDkdPZoGLLgfrScoSZ_-O/view?usp=sharing
I localized the problem, it is in this lines:
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
If remove it app starts without any errors but allure ignored @Step annotations. How i can used spring-boot and allure anotations in one app?