• Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • jacoco-plugin
    • None

      Migrated from GitHub Issue #52; original description appears below, verbatim:

      Currently the JaCoCo Jenkins plugin has 5 UI fields to set JaCoCo properties: exec files, class files, source files, inclusions. and exclusions. This causes an issue for us because it does not permit the use of dynamically generated inclusion/exclusion files and has overhead of maintaining job settings. It would be nice if there was an option to import properties from a file.

          [JENKINS-32719] Ability to load properties from a file

          I'm using the latest (2.1.0) JaCoCo plugin on Jenkins.

          I include around 40 classes to be covered by unit-tests in Maven's pom.xml:

                      <plugin>
                          <groupId>org.jacoco</groupId>
                          <artifactId>jacoco-maven-plugin</artifactId>
                          <version>0.7.7.201606060606</version>
                          <executions>
                              <execution>
                                  <id>pre-unit-tests</id>
                                  <goals>
                                      <goal>prepare-agent</goal>
                                  </goals>
                              </execution>
                              <execution>
                                  <id>post-unit-tests</id>
                                  <phase>test</phase>
                                  <goals>
                                      <goal>report</goal>
                                  </goals>
                                  <configuration>
                                      <includes>
                                          <include>com/company1/Class1.class</include>
                                          <include>com/company2/Class2.class</include>
                                          ...
                                          <include>com/companyN/ClassN.class</include>
                                      </includes>
                                  </configuration>
                              </execution>
                          </executions>
                      </plugin>
          

          The same I have to do on job settings page to set up JoCoCo Jenkins plugin and get the same code coverage. As a result I get a long line containing all the 40 classes names separated by commas. It would be easier to maintain job settings by specifying an external file containing inclusions/exclusions.

          Nikolay Driuchatyi added a comment - I'm using the latest (2.1.0) JaCoCo plugin on Jenkins. I include around 40 classes to be covered by unit-tests in Maven's pom.xml: <plugin> <groupId> org.jacoco </groupId> <artifactId> jacoco-maven-plugin </artifactId> <version> 0.7.7.201606060606 </version> <executions> <execution> <id> pre-unit-tests </id> <goals> <goal> prepare-agent </goal> </goals> </execution> <execution> <id> post-unit-tests </id> <phase> test </phase> <goals> <goal> report </goal> </goals> <configuration> <includes> <include> com/company1/Class1.class </include> <include> com/company2/Class2.class </include> ... <include> com/companyN/ClassN.class </include> </includes> </configuration> </execution> </executions> </plugin> The same I have to do on job settings page to set up JoCoCo Jenkins plugin and get the same code coverage. As a result I get a long line containing all the 40 classes names separated by commas. It would be easier to maintain job settings by specifying an external file containing inclusions/exclusions.

            Unassigned Unassigned
            csimons Christopher Simons
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: