Issue Details (XML | Word | Printable)

Key: MPCLOVER-30
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Vincent Massol
Reporter: Eric Lapierre
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Clover Plugin

clover:on does not see updated maven.compile.src.set

Created: 18/Feb/05 03:50 PM   Updated: 31/May/05 07:35 AM   Resolved: 31/May/05 07:35 AM
Return to search
Component/s: None
Affects Version/s: 1.7
Fix Version/s: 1.10

Time Tracking:
Not Specified

File Attachments: 1. Text File plugin.jelly.patch (1 kB)
2. File project.xip (1 kB)



 Description  « Hide

In our environment, we do generate some source code, so when we
invoke clover:on, the code does not already exist, so the fileset does not contain our code.

So we are now calling clover:on whenever we generate some source code.
This is done after the maven.compile.src.set is modified. The problem is at the second invocation of clover:on, the clover:on goal does not see the new value of maven.compile.src.set.

It looks like ant:pathconvert, does not override a property if it is already set.



Eric Lapierre added a comment - 18/Feb/05 03:55 PM

It seems that resetting the property variable to null before invoking the ant:pathconvert solves the problem.


Vincent Massol added a comment - 19/Feb/05 04:17 PM

Hi Eric,

Thanks for your patch. I'd like to apply it but I would like to write a test for it to reproduce the pb and to have some regression test available. Do you think you could provide a minimal Maven project that reproduces the pb?

Thanks
-Vincent


Eric Lapierre added a comment - 21/Feb/05 09:04 AM

If you invoke maven clover:on jar:install,
I expect 2 files to be cloverized. The one from src/java and the one from src/generated


Vincent Massol added a comment - 21/May/05 01:06 PM

Thanks Eric. You should not call clover:on twice. This will lead to unexpected results as it's not a valid use case. You should always call clover:off after calling clover:on.

I'd suggest to add your generated source dir to the maven.compile.src.set ref first and then only call clover:on.


Eric Lapierre added a comment - 24/May/05 08:55 AM

I am using clover with the multiproject plugin.

If I add the generate directory maven.compile.src.set before calling clover:on, I get a compile error for the subprojects that don't have the generate the directory:

Unable to obtain goal [multiproject:install-callback] – /home/ericlap/.maven/cache/maven-java-plugin-1.5/plugin.jelly:63:48: <ant:javac> srcdir "/vobs/oam_platform/base_datamgmt/persistence/target/generate" does not exist!
Total time: 29 seconds

I tried running clover:off before rerunning clover:on without any success. Once I have run clover:on once on a subproject, the fileset is fixed.


Vincent Massol added a comment - 31/May/05 07:35 AM

Applied thanks. I have applied it in clover:off rather than clover:on because clover:off must be called before calling clover:on again. Let me know if it works for you.