Re: maven 2, clover and contexts
Done : http://jira.codehaus.org/browse/MCLOVER-64 And i will start to look how to code a mojo ^^ Vincent Massol a écrit : On Jan 21, 2007, at 1:25 AM, c_inconnu2 wrote: That works ! Documentation updated. Thanks for your help. Is there any plan to support statementContext in the plugin ? We need to support it but it's not done yet. Create a JIRA issue if it's not there already. I'll probably be able to spend some time on the plugin end of next week. I'd like to exclude all my loggers... BTW, I'll try to understand how that works and see if i can contribute Cool! Thanks -Vincent David DIDIER Vincent Massol a écrit : Hi David, I think the reason is because the contextFilter configuration element is a property of the report mojo and thus it needs to be defined in the reporting section and not in the build section. For example: reporting excludeDefaultstrue/excludeDefaults plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration !-- Verify that context filters work -- contextFilterstry/contextFilters /configuration /plugin /plugins /reporting Let me know if this works for you and I'll update the documentation. Thanks -Vincent On Jan 18, 2007, at 11:07 PM, c_inconnu2 wrote: Hi Vincent, Thanks for your answer. Indeed there is no reason that it should work : I was just wondering... But I tried to use contextFilters and I cannot manage to get it work either. Here is a part of my pom : reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId /plugin /plugins /reporting build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target showDeprecationtrue/showDeprecation /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration jdk1.5/jdk contextFilterstry/contextFilters /configuration executions execution phasepre-site/phase goals goalinstrument/goal /goals /execution /executions /plugin /plugins /build I tested with this : public static String f() { try { if(true){ Class.forName(AAA);} Class.forName(BBB); } catch (Exception e) { // TODO: handle exception } return f; } If I understand, the line Class.forName(BBB); should be reported as not tested ??? But it is in red in the report (statement not executed). And Class.forName(AAA); was executed Thanks for your help Vincent Massol a écrit : Hi David, Why are you assuming that statementContext would work? Just check the plugin documentation and you'll see that the correct tag name is contextFilters. Just check the documentation for more details and examples. Thanks -Vincent On Jan 17, 2007, at 11:46 PM, c_inconnu2 wrote: Hi, I am trying to configure Clover to use contextFilters with statementContext. Here is my pom.xml : reporting plugins ... plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration jdk1.5/jdk excludes exclude**/*AllTests.java/exclude exclude**/*Main.java/exclude exclude**/*Main$*.java/exclude exclude**/*Test.java/exclude exclude**/*Test$*.java/exclude /excludes statementContext name=log regexp=^logger\..* / !--statementContext name=iflog regexp=^if \(logger\.is.* /-- statementContext name=iflog regexp=if.?.?log.*\.isDebugEnabled.*} / !--contextFilterslog,iflog/contextFilters-- contextFilterstry/contextFilters /configuration /plugin ... plugins reporting as you can see, I tried many things. I looked the clover site, search mailing lists but nothing... I even looked into the plugin source code : it seems that it does not handle statementContext. But since
Re: maven 2, clover and contexts
Hi David, I think the reason is because the contextFilter configuration element is a property of the report mojo and thus it needs to be defined in the reporting section and not in the build section. For example: reporting excludeDefaultstrue/excludeDefaults plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration !-- Verify that context filters work -- contextFilterstry/contextFilters /configuration /plugin /plugins /reporting Let me know if this works for you and I'll update the documentation. Thanks -Vincent On Jan 18, 2007, at 11:07 PM, c_inconnu2 wrote: Hi Vincent, Thanks for your answer. Indeed there is no reason that it should work : I was just wondering... But I tried to use contextFilters and I cannot manage to get it work either. Here is a part of my pom : reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId /plugin /plugins /reporting build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target showDeprecationtrue/showDeprecation /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration jdk1.5/jdk contextFilterstry/contextFilters /configuration executions execution phasepre-site/phase goals goalinstrument/goal /goals /execution /executions /plugin /plugins /build I tested with this : public static String f() { try { if(true){ Class.forName(AAA);} Class.forName(BBB); } catch (Exception e) { // TODO: handle exception } return f; } If I understand, the line Class.forName(BBB); should be reported as not tested ??? But it is in red in the report (statement not executed). And Class.forName(AAA); was executed Thanks for your help Vincent Massol a écrit : Hi David, Why are you assuming that statementContext would work? Just check the plugin documentation and you'll see that the correct tag name is contextFilters. Just check the documentation for more details and examples. Thanks -Vincent On Jan 17, 2007, at 11:46 PM, c_inconnu2 wrote: Hi, I am trying to configure Clover to use contextFilters with statementContext. Here is my pom.xml : reporting plugins ... plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration jdk1.5/jdk excludes exclude**/*AllTests.java/exclude exclude**/*Main.java/exclude exclude**/*Main$*.java/exclude exclude**/*Test.java/exclude exclude**/*Test$*.java/exclude /excludes statementContext name=log regexp=^logger \..* / !--statementContext name=iflog regexp=^if \ (logger\.is.* /-- statementContext name=iflog regexp=if.?.? log.*\.isDebugEnabled.*} / !--contextFilterslog,iflog/contextFilters-- contextFilterstry/contextFilters /configuration /plugin ... plugins reporting as you can see, I tried many things. I looked the clover site, search mailing lists but nothing... I even looked into the plugin source code : it seems that it does not handle statementContext. But since even the try context does not work... Any help will be greatly appreciated, thanks David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven 2, clover and contexts
That works ! Thanks for your help. Is there any plan to support statementContext in the plugin ? I'd like to exclude all my loggers... BTW, I'll try to understand how that works and see if i can contribute David DIDIER Vincent Massol a écrit : Hi David, I think the reason is because the contextFilter configuration element is a property of the report mojo and thus it needs to be defined in the reporting section and not in the build section. For example: reporting excludeDefaultstrue/excludeDefaults plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration !-- Verify that context filters work -- contextFilterstry/contextFilters /configuration /plugin /plugins /reporting Let me know if this works for you and I'll update the documentation. Thanks -Vincent On Jan 18, 2007, at 11:07 PM, c_inconnu2 wrote: Hi Vincent, Thanks for your answer. Indeed there is no reason that it should work : I was just wondering... But I tried to use contextFilters and I cannot manage to get it work either. Here is a part of my pom : reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId /plugin /plugins /reporting build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target showDeprecationtrue/showDeprecation /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration jdk1.5/jdk contextFilterstry/contextFilters /configuration executions execution phasepre-site/phase goals goalinstrument/goal /goals /execution /executions /plugin /plugins /build I tested with this : public static String f() { try { if(true){ Class.forName(AAA);} Class.forName(BBB); } catch (Exception e) { // TODO: handle exception } return f; } If I understand, the line Class.forName(BBB); should be reported as not tested ??? But it is in red in the report (statement not executed). And Class.forName(AAA); was executed Thanks for your help Vincent Massol a écrit : Hi David, Why are you assuming that statementContext would work? Just check the plugin documentation and you'll see that the correct tag name is contextFilters. Just check the documentation for more details and examples. Thanks -Vincent On Jan 17, 2007, at 11:46 PM, c_inconnu2 wrote: Hi, I am trying to configure Clover to use contextFilters with statementContext. Here is my pom.xml : reporting plugins ... plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration jdk1.5/jdk excludes exclude**/*AllTests.java/exclude exclude**/*Main.java/exclude exclude**/*Main$*.java/exclude exclude**/*Test.java/exclude exclude**/*Test$*.java/exclude /excludes statementContext name=log regexp=^logger\..* / !--statementContext name=iflog regexp=^if \(logger\.is.* /-- statementContext name=iflog regexp=if.?.?log.*\.isDebugEnabled.*} / !--contextFilterslog,iflog/contextFilters-- contextFilterstry/contextFilters /configuration /plugin ... plugins reporting as you can see, I tried many things. I looked the clover site, search mailing lists but nothing... I even looked into the plugin source code : it seems that it does not handle statementContext. But since even the try context does not work... Any help will be greatly appreciated, thanks David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven 2, clover and contexts
On Jan 21, 2007, at 1:25 AM, c_inconnu2 wrote: That works ! Documentation updated. Thanks for your help. Is there any plan to support statementContext in the plugin ? We need to support it but it's not done yet. Create a JIRA issue if it's not there already. I'll probably be able to spend some time on the plugin end of next week. I'd like to exclude all my loggers... BTW, I'll try to understand how that works and see if i can contribute Cool! Thanks -Vincent David DIDIER Vincent Massol a écrit : Hi David, I think the reason is because the contextFilter configuration element is a property of the report mojo and thus it needs to be defined in the reporting section and not in the build section. For example: reporting excludeDefaultstrue/excludeDefaults plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration !-- Verify that context filters work -- contextFilterstry/contextFilters /configuration /plugin /plugins /reporting Let me know if this works for you and I'll update the documentation. Thanks -Vincent On Jan 18, 2007, at 11:07 PM, c_inconnu2 wrote: Hi Vincent, Thanks for your answer. Indeed there is no reason that it should work : I was just wondering... But I tried to use contextFilters and I cannot manage to get it work either. Here is a part of my pom : reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId /plugin /plugins /reporting build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target showDeprecationtrue/showDeprecation /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration jdk1.5/jdk contextFilterstry/contextFilters /configuration executions execution phasepre-site/phase goals goalinstrument/goal /goals /execution /executions /plugin /plugins /build I tested with this : public static String f() { try { if(true){ Class.forName(AAA);} Class.forName(BBB); } catch (Exception e) { // TODO: handle exception } return f; } If I understand, the line Class.forName(BBB); should be reported as not tested ??? But it is in red in the report (statement not executed). And Class.forName(AAA); was executed Thanks for your help Vincent Massol a écrit : Hi David, Why are you assuming that statementContext would work? Just check the plugin documentation and you'll see that the correct tag name is contextFilters. Just check the documentation for more details and examples. Thanks -Vincent On Jan 17, 2007, at 11:46 PM, c_inconnu2 wrote: Hi, I am trying to configure Clover to use contextFilters with statementContext. Here is my pom.xml : reporting plugins ... plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration jdk1.5/jdk excludes exclude**/*AllTests.java/exclude exclude**/*Main.java/exclude exclude**/*Main$*.java/exclude exclude**/*Test.java/exclude exclude**/*Test$*.java/exclude /excludes statementContext name=log regexp=^logger \..* / !--statementContext name=iflog regexp=^if \(logger\.is.* /-- statementContext name=iflog regexp=if.?.? log.*\.isDebugEnabled.*} / !--contextFilterslog,iflog/contextFilters-- contextFilterstry/contextFilters /configuration /plugin ... plugins reporting as you can see, I tried many things. I looked the clover site, search mailing lists but nothing... I even looked into the plugin source code : it seems that it does not handle statementContext. But since even the try context does not work... Any help will be greatly appreciated, thanks David
Re: maven 2, clover and contexts
Hi David, Why are you assuming that statementContext would work? Just check the plugin documentation and you'll see that the correct tag name is contextFilters. Just check the documentation for more details and examples. Thanks -Vincent On Jan 17, 2007, at 11:46 PM, c_inconnu2 wrote: Hi, I am trying to configure Clover to use contextFilters with statementContext. Here is my pom.xml : reporting plugins ... plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration jdk1.5/jdk excludes exclude**/*AllTests.java/exclude exclude**/*Main.java/exclude exclude**/*Main$*.java/exclude exclude**/*Test.java/exclude exclude**/*Test$*.java/exclude /excludes statementContext name=log regexp=^logger \..* / !--statementContext name=iflog regexp=^if \ (logger\.is.* /-- statementContext name=iflog regexp=if.?.? log.*\.isDebugEnabled.*} / !--contextFilterslog,iflog/contextFilters-- contextFilterstry/contextFilters /configuration /plugin ... plugins reporting as you can see, I tried many things. I looked the clover site, search mailing lists but nothing... I even looked into the plugin source code : it seems that it does not handle statementContext. But since even the try context does not work... Any help will be greatly appreciated, thanks David ___ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven 2, clover and contexts
Hi Vincent, Thanks for your answer. Indeed there is no reason that it should work : I was just wondering... But I tried to use contextFilters and I cannot manage to get it work either. Here is a part of my pom : reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId /plugin /plugins /reporting build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target showDeprecationtrue/showDeprecation /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration jdk1.5/jdk contextFilterstry/contextFilters /configuration executions execution phasepre-site/phase goals goalinstrument/goal /goals /execution /executions /plugin /plugins /build I tested with this : public static String f() { try { if(true){ Class.forName(AAA); } Class.forName(BBB); } catch (Exception e) { // TODO: handle exception } return f; } If I understand, the line Class.forName(BBB); should be reported as not tested ??? But it is in red in the report (statement not executed). And Class.forName(AAA); was executed Thanks for your help Vincent Massol a écrit : Hi David, Why are you assuming that statementContext would work? Just check the plugin documentation and you'll see that the correct tag name is contextFilters. Just check the documentation for more details and examples. Thanks -Vincent On Jan 17, 2007, at 11:46 PM, c_inconnu2 wrote: Hi, I am trying to configure Clover to use contextFilters with statementContext. Here is my pom.xml : reporting plugins ... plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration jdk1.5/jdk excludes exclude**/*AllTests.java/exclude exclude**/*Main.java/exclude exclude**/*Main$*.java/exclude exclude**/*Test.java/exclude exclude**/*Test$*.java/exclude /excludes statementContext name=log regexp=^logger\..* / !--statementContext name=iflog regexp=^if \(logger\.is.* /-- statementContext name=iflog regexp=if.?.?log.*\.isDebugEnabled.*} / !--contextFilterslog,iflog/contextFilters-- contextFilterstry/contextFilters /configuration /plugin ... plugins reporting as you can see, I tried many things. I looked the clover site, search mailing lists but nothing... I even looked into the plugin source code : it seems that it does not handle statementContext. But since even the try context does not work... Any help will be greatly appreciated, thanks David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]