Behavior that you observe is not specific to jacoco-maven-plugin , it is 
how Maven works - see 
https://maven.apache.org/guides/mini/guide-default-execution-ids.html

mvn jacoco:check

uses execution id "default-cli", while your pom.xml defines configuration 
in execution with id "jacoco-check" bound to phase "verify".

So either use this phase:

mvn verify

Or provide configuration outside of "executions" block (i.e. in 
"<plugin><configuration>") so that it will be inherited in all executions.

Or explicitly specify execution id  "jacoco-check":

mvn jacoco:check@jacoco-check


On Saturday, August 3, 2019 at 6:47:32 PM UTC+2, tuk wrote:
>
> My jacoco plugin configuration in a pom likes below
>
> <plugin>
>             <groupId>org.jacoco</groupId>
>             <artifactId>jacoco-maven-plugin</artifactId>
>             <version>0.7.5.201505241946</version>
>               <executions>
>                 <execution>
>                   <id>pre-unit-test</id>
>                   <goals>
>                       <goal>prepare-agent</goal>
>                   </goals>
>                   <configuration>
>                     <destFile>${jacoco.ut.execution.data.file}</destFile>
>                   </configuration>
>                 </execution>
>                 <execution>
>                   <id>merge-execs</id>
>                   <phase>pre-site</phase>
>                   <inherited>false</inherited>
>                   <goals>
>                       <goal>merge</goal>
>                   </goals>
>                   <configuration>
>                    <fileSets>
>                      <fileSet>
>                        <directory>${basedir}</directory>
>                        <includes>
>                          <include>**/target/*.exec</include>
>                        </includes>
>                      </fileSet>
>                    </fileSets>
>                     <destFile>${jacoco.ut.merged.exec}</destFile>
>                   </configuration>
>                 </execution>
>                   <execution>
>                       <id>jacoco-check</id>
>                       <phase>verify</phase>
>                       <goals>
>                           <goal>check</goal>
>                       </goals>
>                       <configuration>
>                           <rules>
>                               <rule>
>                                   <element>BUNDLE</element>
>                                   <limits>
>                                       <limit>
>                                           <counter>LINE</counter>
>                                           <value>COVEREDRATIO</value>
>                                           <minimum>0.80</minimum>
>                                       </limit>
>                                   </limits>
>                               </rule>
>                           </rules>
>                           <dataFile>${jacoco.ut.merged.exec}</dataFile>
>                       </configuration>
>                   </execution>
>              </executions>
>          </plugin>
>
>
> But when I am running mvn jacoco:check it is failing with the below error
>
>
> [ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.7.
> 5.201505241946:check (default-cli) on project main: The parameters 'rules' 
> for goal org.jacoco:jacoco-maven-plugin:0.7.5.201505241946:check are 
> missing or invalid -> [Help 1]
>
> Can someone let me know what is going wrong?
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/ea607005-504f-4d80-9385-aa2d47acbdb3%40googlegroups.com.

Reply via email to