maven - surefire plugin does not work with jacoco plugin -


i want make test coverage in project. created profile: pom xml profile is:

    <profile>         <id>test-coverage</id>         <build>             <plugins>                 <plugin>                     <groupid>org.apache.maven.plugins</groupid>                     <artifactid>maven-surefire-plugin</artifactid>                     <version>${maven.surefire.plugin.version}</version>                     <configuration combine.self="override">                         <redirecttestoutputtofile>true</redirecttestoutputtofile>                         <testfailureignore>true</testfailureignore>                         <argline>                             -xms128m -xmx1g -xx:maxpermsize=128m                         </argline>                             <groups>com.project.test.annotation.quicktest</groups>                      </configuration>                 </plugin>                 <plugin>                     <groupid>org.jacoco</groupid>                     <artifactid>jacoco-maven-plugin</artifactid>                     <version>0.7.1.201405082137</version>                     <executions>                         <execution>                             <goals>                                 <goal>prepare-agent</goal>                             </goals>                         </execution>                         <execution>                             <id>report</id>                             <phase>prepare-package</phase>                             <goals>                                 <goal>report</goal>                             </goals>                         </execution>                     </executions>                 </plugin>              </plugins>         </build>      </profile> 

i running these commands: mvn clean install -dfailifnotests=false -p test-coverage mvn sonar:sonar

and couldnt test coverage, missing? sonar version: 4.3

the main issue encounter definition of argline property of surefire maven plugin should set property , not in configuration of plugin. because when so, jacoco maven plugin can't set argline configure agent.

so argline should define property in pom.

see http://docs.sonarqube.org/display/sonar/jacoco+plugin more details.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -