|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Clover ContextFiltersI'm trying to figure out if there's anything special I need to do in order to enable context filters in Sonar->Clover?
I have the following configuration in my POM: <profiles> <profile> <!-- This profile adds Clover test coverage reporting. Because of a conflict between Atlassian and Maven, the clover process is excessively long and at times, buggy. We'll disable it until the bugs are resolved --> <id>clover</id> <activation> <property> <name>runClover</name> <value>true</value> </property> </activation> <build> <plugins> <plugin> <groupId> com.atlassian.maven.plugins </groupId> <artifactId> maven-clover2-plugin </artifactId> <version>${clover.version}</version> <dependencies> <dependency> <groupId> com.fidelity.shares </groupId> <artifactId> shares-build </artifactId> <version>${shares.version}</version> </dependency> </dependencies> <configuration> <statementContexts> <Log>^(log|LOG)\..*</Log> <IfLog>^if \((log|LOG)\.is.*</IfLog> <IfThisLog>^if \(this\.log\.is.*</IfThisLog> <ThisLog>^this\.log\..*</ThisLog> </statementContexts> <methodContexts> <ToSymbol>(.* )?public String toSymbol\(\).*</ToSymbol> <FromSymbol><![CDATA[(.* )?public static final [a-zA-Z0-9]* fromSymbol\((final )?String symbol\).*]]></FromSymbol> </methodContexts> <failOnViolation>false</failOnViolation> <licenseLocation> com/fidelity/shares/build/clover.license </licenseLocation> <jdk>1.5</jdk> <targetPercentage>${clover.targetPercentage}</targetPercentage> </configuration> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <groupId> com.atlassian.maven.plugins </groupId> <artifactId> maven-clover2-plugin </artifactId> <version>${clover.version}</version> <configuration> <contextFilters>property,constructor,Log,IfLog,IfThisLog,ThisLog,ToSymbol,FromSymbol</contextFilters> <generateXml>true</generateXml> <generateHtml>true</generateHtml> <reportDescriptor>${clover.config.file}</reportDescriptor> <generateHistorical>true</generateHistorical> <historyDir>${clover.historyDir}</historyDir> </configuration> </plugin> </plugins> </reporting> </profile> </profiles> When I run mvn -DrunClover=true clean clover2:instrument clover2:clover, my clover configuration is found, a clover report is generated and I see that my contextFilters are respected (setters and getters, etc are ignored). However, when I run: mvn -DrunClover=true clean install sonar:sonar, I'm noticing that sonar does recognize my license file, but it doesn't seem to use my contextFilter settings. Is there something I need to do specifically to get this to work? Thanks! |
|
|
Re: Clover ContextFiltersHi Leo, Could you please send the content of the file target/sonar/sonar-pom.xml which is generated once the Maven Sonar plugin has been launched (mvn -DrunClover=true clean install sonar:sonar) ? Thanks Freddy On Fri, Oct 16, 2009 at 8:26 PM, leojhartiv <leo.hart@...> wrote:
|
|
|
Re: Clover ContextFiltersHere it is. Thanks!
sonar-pom.xml |
|
|
Re: Clover ContextFiltersHi Leo,
Moving the <contextFilters> node from the <reporting> section to the <build><plugins><plugin> section in the Clover <profile> should fix your issue. Hope it helps, Freddy On Sun, Oct 18, 2009 at 8:55 PM, leojhartiv <leo.hart@...> wrote:
|
|
|
Re: Clover ContextFiltersThat did the trick! Thanks!
|
| Free embeddable forum powered by Nabble | Forum Help |