I'm using Maven 3 and in my java project, the pom file contains one source location as follows.
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${JDK}</source>
<target>${JDK}</target>
<excludes>
<!--<exclude>**/**/api/notification/**/INotificationProfileManager.java</exclude> -->
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<version>1.3</version>
<archive>
<manifest>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Class-Path>./MubarsherTradeClasspath-1.0.jar</Class-Path>
<Specification-Vendor>Mubasher</Specification-Vendor>
<Implementation-Vendor>Mubasher</Implementation-Vendor>
<Sealed>false</Sealed>
</manifestEntries>
</archive>
</configuration>
</plugin>
After compiling, the generated files are located in .../generate/src/main/java/...
path. When Sonar analysis is done, it checks these generated classes which themselves have a ../src/main/java/...
path, so the analysis fails.
So I need to know how to define multiple source paths to analyze from sonar ?