Source code is
@ExcludeFromCodeCoverage
public void testABC(){
int a =1;
int b = 1;
System.out.println("a=" + a);
}
Maven is :
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${sonar.jacoco.reportPath}</destFile>
<append>true</append>
</configuration>
</execution>
</executions>
</plugin>
Build Failure is :
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project pushservice-rest: Compilation failure
[ERROR] /PushData.java:[812,6] cannot find symbol
[ERROR] symbol: class ExcludeFromCodeCoverage
[ERROR] location: class xxx.PushData
[ERROR]
Thanks,
IR