artifacts not resolved: org.jacoco:org.jacoco.build:jar:0.6.3.201306030806

5,774 views
Skip to first unread message

stev...@comcast.net

unread,
Dec 12, 2013, 11:38:35 AM12/12/13
to jac...@googlegroups.com
Hello

I'm new to jacoco Please forgive me if I don't articulate this post
correctly.

I'm trying to implement jacoco coverage reports in a multi-project
maven build and I am running into the following error when I run this
command:

mvn -e -s ./settings.xml -am clean package jacoco:check

[ERROR] Failed to execute goal
org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check (default-cli)
on project utdMaven: Execution default-cli of goal
org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check failed: Plugin
org.jacoco:jacoco-maven-plugin:0.6.3.201306030806 or one of its
dependencies could not be resolved: The following artifacts could not
be resolved: org.jacoco:org.jacoco.build:jar:0.6.3.201306030806,
org.ow2.asm:asm-all:jar:4.1,
org.apache.maven.reporting:maven-reporting-api:jar:2.1.0,
org.jacoco:org.jacoco.agent:jar:runtime:0.6.3.201306030806: The
repository system is offline but the artifact
org.jacoco:org.jacoco.build:jar:0.6.3.201306030806 is not available in
the local repository. -> [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 utdMaven: Execution default-cli of goal
org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:check failed: Plugin
org.jacoco:jacoco-maven-plugin:0.6.3.201306030806 or one of its
dependencies could not be resolved: The following artifacts could not
be resolved: org.jacoco:org.jacoco.build:jar:0.6.3.201306030806,
org.ow2.asm:asm-all:jar:4.1,
org.apache.maven.reporting:maven-reporting-api:jar:2.1.0,
org.jacoco:org.jacoco.agent:jar:runtime:0.6.3.201306030806: The
repository system is offline but the artifact
org.jacoco:org.jacoco.build:jar:0.6.3.201306030806 is not available in
the local repository.

The error seems to be asking me for the
org.jacoco:org.jacoco.build:jar artifact, but I can't seem to find it
anywhere in any maven repository. I have the agent, report, core and
plugin jars.


Below are the specifics of my environment:

Compiling under cygwin
Maven version 3.0.3
jacoco version :0.6.3.201306030806
Java version: jdk1.7.0_09

Parent pom file:
<!-- Begin jacoco -->
<plugin>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>${maven-reporting-impl.version}</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
<version>${jacoco.version}</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core</artifactId>
<version>${jacoco.version}</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.report</artifactId>
<version>${jacoco.version}</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>${maven-reporting-impl.version}</version>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.build</artifactId>
<version>${jacoco.version}</version>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.report</artifactId>
<version>${jacoco.version}</version>
</dependency>
</dependencies>
<configuration>
<destfile>${basedir}/target/coverage-reports/jacoco-unit.exec</destfile>
<datafile>${basedir}/target/coverage-reports/jacoco-unit.exec</datafile>
</configuration>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- End jacoco -->


Any help appreciated.

Thanks

Steve

Marc R. Hoffmann

unread,
Dec 12, 2013, 2:53:56 PM12/12/13
to jac...@googlegroups.com
@Mirko

Hi Mirko,

despite the fact that this user uses an offline repo, do we really have
a dependency on org.jacoco.build at runtime?

Cheers,
-marc
--
Marc Hoffmann
hoff...@mountainminds.com
_______________________________________________
Mountainminds GmbH & Co. KG

Nussbaumstr. 4 * 80336 Muenchen * Germany
Phone/Fax +49-700-68664637 * 0700-MTNMINDS

Registergericht Muenchen * HRA 80201
Mountainminds Verwaltungs GmbH
Registergericht Muenchen * HRB 143183
Geschaeftsfuehrer Marc Hoffmann

Marc R. Hoffmann

unread,
Dec 12, 2013, 2:55:30 PM12/12/13
to jac...@googlegroups.com
Hi Steve,

The problem is described by the follwing error message:

The repository system is offline but the artifact
org.jacoco:org.jacoco.build:jar:0.6.3.201306030806 is not available in
the local repository. -> [Help 1]

Make sure you have access to the maven repository when running the build
or your local repository contains all required artifacts.

Cheers,
-marc


On 12.12.13 17:38, stev...@comcast.net wrote:

stev...@comcast.net

unread,
Dec 12, 2013, 3:59:59 PM12/12/13
to jac...@googlegroups.com
Mark

Thanks for the response.

I've updated the version of jacoco to 6.4, downloaded core, ant,
plugin, agent, report jars and the build pom file from The Mavin
Central Repository(as pointed to by the jacoco site).

And, changed my settings.xml to use the online repository as
well. Here is what I get:


[INFO] Finished at: Thu Dec 12 15:51:14 EST 2013 [INFO] Final Memory:
16M/220M [INFO]
------------------------------------------------------------------------


[ERROR] Failed to execute goal

org.jacoco:jacoco-maven-plugin:0.6.4.201312101107:check (default-cli)


on project utdMaven: Execution default-cli of goal

org.jacoco:jacoco-maven-plugin:0.6.4.201312101107:check failed: Plugin
org.jacoco:jacoco-maven-plugin:0.6.4.201312101107 or one of its
dependencies could not be resolved: Could not find artifact
org.jacoco:org.jacoco.build:jar:0.6.4.201312101107 in central
(http://repo1.maven.org/maven2) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.jacoco:jacoco-maven-plugin:0.6.4.201312101107:check


(default-cli) on project utdMaven: Execution default-cli of goal

org.jacoco:jacoco-maven-plugin:0.6.4.201312101107:check failed: Plugin
org.jacoco:jacoco-maven-plugin:0.6.4.201312101107 or one of its
dependencies could not be resolved: Could not find artifact
org.jacoco:org.jacoco.build:jar:0.6.4.201312101107 in central
(http://repo1.maven.org/maven2) at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

Is there another repository I should point to perhaps?

Steve

Mirko Friedenhagen

unread,
Dec 12, 2013, 4:40:43 PM12/12/13
to jac...@googlegroups.com
Hello Stevem,

I do not understand why you include all the dependencies to the
declaration of jacoco-maven-plugin? Just declare the plugin and you
should be done. In your pom you explicitly declare a dependency on
org.jacoco.build (which by the way is no jar but only a POM).

Regards
Mirko
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/
> --
> 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.

stev...@comcast.net

unread,
Dec 13, 2013, 3:47:09 PM12/13/13
to jac...@googlegroups.com
Mirko

I've removed the other entries as you directed and ran with the
following command, once online for dependencies and once offline:

mvn -e -s ./settings_online.xml -pl web/project1,web/project2, web/project3 -am clean package jacoco:report

mvn -e -s ./settings.xml -pl web/project1,web/project2, web/project3 -am clean package jacoco:report

The build ends successfully, but I get the following message and no report:

[INFO] Skipping JaCoCo execution due to missing execution data file
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]

Does jacoco build differently under maven using cygwin or linux?

Here is my current pom:

<!-- Begin jacoco -->
<plugin>

<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>

<configuration>
<destfile>${basedir}/target/coverage-reports/jacoco-unit.exec</destfile>
<datafile>${basedir}/target/coverage-reports/jacoco-unit.exec</datafile>
</configuration>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- End jacoco -->

Mirko Friedenhagen

unread,
Dec 13, 2013, 4:46:20 PM12/13/13
to jac...@googlegroups.com

Stevem,

do you override argLine in surefire or failsafe? You need to write sth. like <argLine>${argLine} YOUROPTIONSHERE</argLine>, then.

Regards Mirko
--
Sent from my mobile

stev...@comcast.net

unread,
Dec 16, 2013, 9:08:43 AM12/16/13
to jac...@googlegroups.com
Mirko

Thanks for the help.

I don't override anything in surfire. After adding the following to surefire,
<argLine>${argLine} -Xmx512m</argLine> below:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire.version}</version>
<configuration>
<includes>
<include>**/*UnitTests.java</include>
</includes>
<argLine>${argLine} -Xmx512m</argLine>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>

And running: mvn -e -s ./settings.xml -pl web/project1,web/project2, web/project3 -am clean package jacoco:report

I get the following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test (default-test) on project utdCommon: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
[ERROR] Command wascmd.exe /X /C "C:\PROGRA~1\java\jdk1.7.0_09\jre\bin\java ${argLine} -Xmx512m -jar D:\utd_Integration\utdCommon\target\surefire\surefirebooter4207056631037684266.jar D:\utd_Integration\utdCommon\target\surefire\surefire2689491925358224144tmp D:\utd_Integration\utdCommon\target\surefire\surefire_03228513453124556442tmp"

It looks like argline is not blank. How do I get rid of that?


Steve

stev...@comcast.net

unread,
Dec 16, 2013, 10:08:59 AM12/16/13
to jac...@googlegroups.com
I got the argline working correctly. Now, I get the following error:

[INFO] --- jacoco-maven-plugin:0.6.4.201312101107:report (default-cli) @ utdJmsUtil ---
[INFO] Skipping JaCoCo execution due to missing execution data file




Mirko Friedenhagen

unread,
Dec 16, 2013, 3:18:45 PM12/16/13
to jac...@googlegroups.com
Stevem,

I have no clue what is going wrong. Do you still have the
configuration for dataFile and destFile in your outermost declaration?
This should be taken by default-cli as well. You might try the
execution ids to default-prepare-agent and default-report and remove
the phases when these goals should be run. Is your plugin declaration
in //project/build/pluginManagement/plugins or
//project/build/plugins?

stev...@comcast.net

unread,
Feb 20, 2014, 10:37:49 AM2/20/14
to jac...@googlegroups.com, stev...@comcast.net
Just wanted to thank everyone on this thread... I was able to resolve the problem.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages