coverage.xml or cobertura.ser is not getting generated in all modules folder

36 views
Skip to first unread message

Bubunia Patra

unread,
Mar 6, 2017, 10:08:00 AM3/6/17
to mojohaus-dev
Hi ,

We have multiple modules. m1, m2, and each have pom.xml and sonar-properties files. There is a pom.xml at the /root/bubunia folder as well which is parent pom.xml.
/root/bubunia/pom.xml
/root/bubunia/m1/pom.xml + /root/bubunia/m1/sonar.properties + src
/root/bubunia/m2/pom.xml + /root/bubunia/m2/sonar.properties + src

The problem is after running "mvn clean install pmd:pmd -DfailIfNoTests=false cobertura:cobertura -Pjenkins" the m1 or m2/report/coverage.xml is not getting generated in all modules folder(m1/m2) not the cobertura.ser(in /root/bubunia/m1/target/cobertura/cobertura.ser as example). Can anyone please help ? I tried using 2.7 version as well but failed to get the cobertura.ser and coverage.xml in all the modules folder m1/m2 etc. 

pom.xml snippet at /root/bubunia/pom.xml

<profiles>
                 <!-- Jenkins by default defines a property BUILD_NUMBER which is used to enable the profile. -->
                <profile>
                    <id>jenkins</id>
                    <activation>
                        <property>
                            <name>env.BUILD_NUMBER</name>
                        </property>
                    </activation>
                    <build>
                        <pluginManagement>
                            <plugins>
                                <plugin>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>cobertura-maven-plugin</artifactId>
                                    <version>2.6</version>
                                    <configuration>
                                        <outputDirectory>{project.modules}/report/cobertura/</outputDirectory>
                                        <formats>
                                            <format>html</format>
                                            <format>xml</format>
                                        </formats>
                                        <aggregate>true</aggregate>
                                        <instrumentation>
                                                <!--<ignores>
                                                  <ignore>com.example.boringcode.*</ignore>
                                                </ignores>-->
                                                <excludes>
                                                  <exclude>**/generated/*</exclude>
                                                  <exclude>**/entities/*</exclude>
                                                  <exclude>**/fmt/*</exclude>
                                                  <exclude>**/exceptions/*</exclude>
                                                  <exclude>**/constants/*</exclude>
                                                </excludes>
                                      </instrumentation>
                                    </configuration>
                                  </plugin>
                            </plugins>
                        </pluginManagement>
                    </build>
                </profile>
</profiles>
Reply all
Reply to author
Forward
0 new messages