'rules' for goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check are missing or invalid

5,707 views
Skip to first unread message

evg...@gmail.com

unread,
Oct 4, 2013, 8:18:20 AM10/4/13
to jac...@googlegroups.com
Hi all!

i am new to JaCoCo and faced with next problem:


When i run
mvn -X -e clean install jacoco:prepare-agent test jacoco:check jacoco:report

i got next error:
------------------------------------------------------------
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check (default-cli) on project ebook_parent: The parameters 'rules' for goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check are missing or invalid -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check (default-cli) on project ebook_parent: The parameters 'rules' for goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check are missing or invalid
------------------------------------------------------------

My config file is next:
------------------------------------------------------------
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
<classifier>runtime</classifier>
<version>0.6.3.201306030806</version>
<scope>test</scope>
</dependency>


<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.6.3.201306030806</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>0.80</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
------------------------------------------------------------


Could anyone help me?
Thanks in advance for any help or advice!

Eugene Dobrovolskyi

unread,
Oct 4, 2013, 8:47:01 AM10/4/13
to jac...@googlegroups.com
i have downgrade to version 0.6.2. downgrade config file to  


<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
</execution>


but i have the same problem ......... 

((((((( 

Marc R. Hoffmann

unread,
Oct 4, 2013, 9:50:51 AM10/4/13
to jac...@googlegroups.com
Hi Eugene,

can you please post the next couple of lines after the error log entry.
This should give the detailed reason.

Also note that there is an open issue with the check goal configuration
with Maven 2.x, it works only on Maven 3.x
(https://github.com/jacoco/jacoco/issues/129).

Best regards,
-marc

Eugene Dobrovolskyi

unread,
Oct 4, 2013, 10:10:16 AM10/4/13
to jac...@googlegroups.com
Hi Marc!

regarding maven version:

mvn --version
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_45, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/jdk1.6.0_45/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.5.0-23-generic", arch: "amd64", family: "unix"
==================================
error details:
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.6.2.201302030002:check (default-cli) on project ebook_parent: The parameters 'check' for goal org.jacoco:jacoco-maven-plugin:0.6.2.201302030002:check are missing or invalid -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jacoco:jacoco-maven-plugin:0.6.2.201302030002:check (default-cli) on project ebook_parent: The parameters 'check' for goal org.jacoco:jacoco-maven-plugin:0.6.2.201302030002:check are missing or invalid
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:221)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginParameterException: The parameters 'check' for goal org.jacoco:jacoco-maven-plugin:0.6.2.201302030002:check are missing or invalid
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:576)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:529)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException

Marc R. Hoffmann

unread,
Oct 4, 2013, 10:25:47 AM10/4/13
to jac...@googlegroups.com
Ok, for 6.2 this is obvious because the format changed. Can you please
post the full error message when you run your configuration with 0.6.3
along with the exctact same configuration you tried?

-marc

Eugene Dobrovolskyi

unread,
Oct 4, 2013, 10:56:27 AM10/4/13
to jac...@googlegroups.com
Marc, i have forgot to revert config file after i  tried to compile on the 6.2.

So full error message for 6.3 is next:
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check (default-cli) on project ebook_parent: The parameters 'rules' for goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check are missing or invalid -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check (default-cli) on project ebook_parent: The parameters 'rules' for goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check are missing or invalid
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:221)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginParameterException: The parameters 'rules' for goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check are missing or invalid

Marc R. Hoffmann

unread,
Oct 5, 2013, 1:19:51 PM10/5/13
to jac...@googlegroups.com
Hi Eugene,

can you please also try with Maven 3.0.5? This is the version that worked for me. I hope we do not rely on 3.0.5 functionality here.

Also there is an working configuration example included with JaCoCo download you might try: http://www.eclemma.org/jacoco/trunk/doc/examples/build/pom.xml

Cheers,
-marc
--
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 jacoco+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Eugene Dobrovolskyi

unread,
Oct 7, 2013, 4:50:25 AM10/7/13
to jac...@googlegroups.com
Hi !
i tried with 3.1.0 and 3.0.5 versions, but i have the same problem.
sections of jacoco configuration in my configuration file is copy from official documentation, but it doesn't work .....

Marc R. Hoffmann

unread,
Oct 7, 2013, 4:34:42 PM10/7/13
to jac...@googlegroups.com
Hi,

I just verified the example that ships with JaCoCo: It runs fine.

Can you please run the example build ./doc/examples/build/pom.xml "as is" on your end and see whether it works?

Cheers,
-marc

Eugene Dobrovolskyi

unread,
Oct 8, 2013, 2:45:12 AM10/8/13
to jac...@googlegroups.com
Hi !

it doesn't work :(


/jacoco-0.6.3.201306030806/doc/examples/build# mvn jacoco:check
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building JaCoCo Maven plug-in example 0.6.3.201306030806
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- jacoco-maven-plugin:0.6.3.201306030806:check (default-cli) @ org.jacoco.examples.maven ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.167s
[INFO] Finished at: Tue Oct 08 09:43:37 EEST 2013
[INFO] Final Memory: 5M/73M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check (default-cli) on project org.jacoco.examples.maven: The parameters 'rules' for goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check are missing or invalid -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException
root@ebookbuildlin3:/home/e.dobrovolsk/jacoco-0.6.3.201306030806/doc/examples/build#

Marc Hoffmann

unread,
Oct 8, 2013, 5:48:53 AM10/8/13
to jac...@googlegroups.com
Hi,

if I run "mvn jacoco:check" directly the configuration defined in the
execution is not considered. I think this is basically how Maven works.

However if you run maven with goals

mvn clean verify

the configuration from phase execution definition is correctly used:

[INFO] --- jacoco-maven-plugin:0.6.3.201306030806:check (check) @
org.jacoco.examples.maven ---
[INFO] All coverage checks have been met.

Best regards,
-marc
>> http://www.eclemma.org/jacoco/trunk/doc/examples/build/pom.xml [1]
>> [2]
>>>
>>>
>>> On Friday, October 4, 2013 4:50:51 PM UTC+3, Marc R. Hoffmann
>> wrote:
>>>
>>> Hi Eugene,
>>>
>>> can you please post the next couple of lines after the error log
>> entry.
>>> This should give the detailed reason.
>>>
>>> Also note that there is an open issue with the check goal
>> configuration
>>> with Maven 2.x, it works only on Maven 3.x
>>> (https://github.com/jacoco/jacoco/issues/129 [3]).
>> [4].
>
> --
> 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 jacoco+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out [4].
>
> --
> 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 jacoco+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out [4].
>
>
> Links:
> ------
> [1] http://www.eclemma.org/jacoco/trunk/doc/examples/build/pom.xml
> [2]
> http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException
> [3] https://github.com/jacoco/jacoco/issues/129
> [4] https://groups.google.com/groups/opt_out

Eugene Dobrovolskyi

unread,
Oct 10, 2013, 9:52:39 AM10/10/13
to jac...@googlegroups.com
Thank You!

now i understand my mistake and now all works fine. 

Mirko Friedenhagen

unread,
Oct 10, 2013, 12:12:27 PM10/10/13
to jac...@googlegroups.com
Marc,

which configurations are taken depends on the id of the execution, see
the Maven-Guide[0] and the corresponding proposal in the Wiki[2]
(which is out-of-date and bit different but clarifies the general idea
IMO). Basically to take effect the executions' IDs should be called
"default-GOALNAME". And there is a special ID "default-cli" which
takes precedence when you invoke goals directly from the command-line
but *not* during a phase run. This is what I always do[3]. I have put
jacoco's check goal as well as findbugs etc. in a Maven profile which
is activated by the existence of src/main/java, see [4].

So when you prefix all execution IDs in your pom [1] with "default-"
the direct invocation should pick up the settings as well *and* they
should be picked up during the corresponding phases nonetheless :-).

[0] http://maven.apache.org/guides/mini/guide-default-execution-ids.html
[1] http://www.eclemma.org/jacoco/trunk/doc/examples/build/pom.xml
[2] http://docs.codehaus.org/display/MAVENUSER/Default+Plugin+Execution+IDs
[3] https://github.com/1and1/foss-parent/blob/master/pom.xml#L786
[4] https://github.com/1and1/foss-parent/blob/master/pom.xml#L1138
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/
> For more options, visit https://groups.google.com/groups/opt_out.

Marc Hoffmann

unread,
Oct 10, 2013, 12:35:50 PM10/10/13
to jac...@googlegroups.com
Hi Mirko,

thanks a lot for clarifying this! I really need to improve my
understanding of Maven.

So do you propose that the "default-" prefix is best practice and we
should improve the examples shipped with JaCoCo? In this case, could you
provide a pull request for the example pom.xml and pom-offline.xml?

Many Thanks,
-marc

Mirko Friedenhagen

unread,
Oct 10, 2013, 1:11:37 PM10/10/13
to jac...@googlegroups.com

I will give it a try :-)

Regards Mirko
--
Sent from my mobile



--
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

For more options, visit https://groups.google.com/groups/opt_out.
--
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 jacoco+unsubscribe@googlegroups.com.

Mirko Friedenhagen

unread,
Oct 10, 2013, 2:54:41 PM10/10/13
to jac...@googlegroups.com
Done: https://github.com/jacoco/jacoco/pull/145
>>>>> Links:
>>>>> ------
>>>>> [1] http://www.eclemma.org/jacoco/trunk/doc/examples/build/pom.xml
>>>>> [2]
>>>>>
>>>>> http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException
>>>>> [3] https://github.com/jacoco/jacoco/issues/129
>>>>> [4] https://groups.google.com/groups/opt_out
>>>>
>>>>
>>>>
>>>> --
>>>> 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 jacoco+un...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>> --
>> 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 jacoco+un...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages