[BUILD-90] Separate parent poms for builds using clover and those witout Created: 26/Jan/12  Updated: 28/Jun/12  Resolved: 28/Jun/12

Status: Closed
Project: Build
Component/s: Poms
Affects Version/s: None
Fix Version/s: POMs 24

Type: Improvement Priority: Neutral
Reporter: Jan Haderka Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File clover-skip-tentative.patch    
Issue Links:
duplicate
duplicates BUILD-58 site-deploy on ce && ee bundle does n... Closed
supersession
is superseded by BUILD-110 Add a way to completely skip Clover Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

Currently using the skip option in clover you can only skip instrumentation, but tests are still executed twice. Ideally some builds (e.g. bundles) would not have clover plugin configured at all to avoid double execution of tests and speed up the build. The only options I see for doing it is either split of parent pom into two or use of different profiles.



 Comments   
Comment by Daniel Lipp [ 03/Feb/12 ]

Looks like the second execution of tests comes from reporting for clover.
We already skip creation of clover db's in the build section:

  <build>
    <plugins>
      <plugin>
        <groupId>com.atlassian.maven.plugins</groupId>
        <artifactId>maven-clover2-plugin</artifactId>
        <configuration >
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>

When it comes to reporting clover doesn't find data and decides to run instrumentation+tests now.
I tried to skip clover in reporting with

  <reporting>
    <plugins>
      <plugin>
        <groupId>com.atlassian.maven.plugins</groupId>
        <artifactId>maven-clover2-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

but this did not work.

Comment by Magnolia International [ 27/Feb/12 ]

Separate poms is not an option - we'd need to maintain N*2 poms for this (N currently being at 5). Rather, I'd rather have an option to skip Clover entirely. Unfortunately, as pointed out by Daniel above, and confirmed by me, this doesn't seem to work: tests are not executed a second time, but the build is still forked, the compile goals are re-executed (even if nothing gets recompiled), and the jar:jar and other assembly goals are also re-executed.
See attached patch to try this out again.
I've opened a support issue with Atlassian (CLV-5796), so hopefully they'll come up with a solution or a fix ...

Comment by Magnolia International [ 27/Feb/12 ]

Linking with BUILD-58 which reports essentially the same problem.

Comment by Magnolia International [ 11/Apr/12 ]

I just got some feedback on the support issue I reported a while ago with Atlassian (CLV-5796), and they proposed a solution that seems to make sense. Not sure why we haven't done it like that in the past. Essentially, the whole clover configuration is moved into a specific profile, and the key is that that profile is activated via a property (and a certain value). Remains to be seen if this works when said property is defined in the pom.

Comment by Magnolia International [ 28/Jun/12 ]

Please see BUILD-110 for summary and proposed solution.

Generated at Sun Feb 11 23:38:39 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.