Unable to use clover setup on generated classe

XMLWordPrintable

      Hi,

      I try to use clover2:setup to instrument a jar. This jar contains some generated classes produced by maven jaxb plugin.
      However those classes are generated in a lifecycle phase after the instrumentation phase, so they are skipped.

      I've attached a simple project to demonstrate the problem.

      If you try :

      mvn clean install  -Dmaven.test.skip -o
      
      [INFO] [clover2:instrumentInternal]
      
      ....
      
      [INFO] Clover all over. Instrumented 1 file (1 package).
      [INFO] 1 test method detected.
      [INFO] Elapsed time = 0,047 secs. (21,277 files/sec, 595,745 srclines/sec)
      ...
      [INFO] [jaxb2:generate {execution: default}]
      [INFO] Succesfully generated output to: D:\Developpement\checkout\cloverMPExported\jar1\target\clover\generated-sources\xjc
      ...
      

      The clover plugin is configured like that :

                  <plugin>
                      <groupId>com.atlassian.maven.plugins</groupId>
                      <artifactId>maven-clover2-plugin</artifactId>
      				<version>2.5.0</version>
                      <configuration>
                          <flushPolicy>threaded</flushPolicy>
                          <flushInterval>100</flushInterval>
                           <licenseLocation>${clover.licenseLocation}</licenseLocation>
                      </configuration>
                      <executions>
                          <execution>
                              <id>main</id>
                              <phase>verify</phase>
                              <goals>
                                  <goal>instrument</goal>
                                  <goal>aggregate</goal>
                                  <goal>check</goal>
                                  <goal>log</goal>
                              </goals>
                          </execution>
                          <execution>
                              <id>site</id>
                              <phase>pre-site</phase>
                              <goals>
                                  <goal>instrument</goal>
                                  <goal>aggregate</goal>
      
                                  <!-- We save a history point in order to have data to generate a historical report -->
                                  <goal>save-history</goal>
      
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
      

              Assignee:
              Nick
              Reporter:
              hugo lassiege
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h