Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1212

CLMVN-136 com.cenqua.clover:clover:jar:3.0.2 can't be resolved error during compilation with Maven 3

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Medium
    • n/a
    • 3.0
    • Maven plugin
    • None
    • Severity 2 - Major

    Description

      Moved from: https://studio.plugins.atlassian.com/browse/CLMVN-136

      =====================================

      It affects version 3.0.2 (which isn't in the list of released versions).

      I'm compiling with Maven 3. I've added a dependency to plexus-resources:1.0-alpha-7 has requested to workaround CLMVN-135.

      However, my build is still failing with

      ERROR Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.0.2:instrumentInternal (default) on project easymock: Could not resolve the clover artifact ( com.cenqua.clover:clover:jar:3.0.2 ) in the localRepository: file:///D:/Programmation/maven/repository/: Could not find artifact com.cenqua.clover:clover:jar:3.0.2

      which is obviously there and was downloaded seconds before. I'm on Windows. And I'm so completely blocked to migrate to Maven 3 until this is solved.

      I'm providing the complete build log in attachment.

      ========

      Joost den Boer added a comment - 30/Nov/10 5:39 AM

      We're having the same problem when converting our projects to Maven 3.
      I read somewhere that the plugin dependency could be overridden with the pom, but we cannot get that working. No matter where we put the plugin dependency of plexus-resources:1.0-alpha-7, the build still breaks and when I run 'mvn dependency:resolve-plugins' it still shows 'plexus-resources:1.0-alpha-4' for the clover-plugin.
      This is pretty urgent for us. Please fix this issue of just release a 3.0.3 Clover plugin with dependency of plexus-resources:1.0-alpha-7.

      ========

      Nick Pellow added a comment - 01/Dec/10 9:14 PM

      I have bumped the version of plexus-resources to alpha7 and released a version 3.0.4 of the maven-clover2-plugin.
      This should be in maven central within 24 hours.

      ========

      still seeing the issue

      C:\clover>mvn -version
      Apache Maven 3.0.1 (r1038046; 2010-11-23 11:58:32+0100)
      Java version: 1.6.0_21
      Java home: C:\java\jdk1.6.0_21\jre
      Default locale: da_DK, platform encoding: Cp1252
      OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows"

      C:\clover>mvn clean -Dcoverage clover2:instrument clover2:aggregate clover2:clover
      INFO Scanning for projects...
      INFO
      INFO ------------------------------------------------------------------------
      INFO Building Test 0.7-SNAPSHOT
      INFO ------------------------------------------------------------------------
      INFO
      INFO — maven-clean-plugin:2.4.1:clean (default-clean) @ anyartifact —
      INFO Deleting C:\clover\target
      INFO
      INFO >>> maven-clover2-plugin:3.0.4:instrument (default-cli) @ anyartifact >>>
      INFO
      INFO — maven-clover2-plugin:3.0.4:instrumentInternal (default-cli) @ anyartifact —
      INFO Clover Version 3.0.2, built on April 13 2010 (build-790)
      INFO Loaded from: C:\Users\knielsen\.m2\repository\com\cenqua\clover\clover\3.0.2\clover-3.0.2.jar
      INFO Clover: Evaluation License registered to KN Consulting.
      INFO You have 28 day(s) before your license expires.
      INFO Creating new database at 'C:\clover\target\clover\clover.db'.
      INFO Processing files at 1.6 source level.
      INFO Clover all over. Instrumented 1 file (1 package).
      INFO Elapsed time = 0,073 secs. (13,699 files/sec, 123,288 srclines/sec)
      INFO
      INFO ------------------------------------------------------------------------
      INFO Skipping Test
      INFO This project has been banned from the build due to previous failures.
      INFO ------------------------------------------------------------------------
      INFO
      INFO ------------------------------------------------------------------------
      INFO Skipping Test
      INFO This project has been banned from the build due to previous failures.
      INFO ------------------------------------------------------------------------
      INFO ------------------------------------------------------------------------
      INFO BUILD FAILURE
      INFO ------------------------------------------------------------------------
      INFO Total time: 1.318s
      INFO Finished at: Thu Dec 09 00:28:40 CET 2010
      INFO Final Memory: 6M/153M
      INFO ------------------------------------------------------------------------
      ERROR Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.0.4:instrumentInternal (default-cli) on project anyartifact: Could not resolve the clover artifact ( com.cenqua.clover:clover:jar:3.0.2 ) in the localRepository: file:///C:/Users/knielsen/.m2/repository/: Could not find artifact com.cenqua.clover:clover:jar:3.0.2
      ERROR
      ERROR Try downloading the file manually from the project website.
      ERROR
      ERROR Then, install it using the command:
      ERROR mvn install:install-file -DgroupId=com.cenqua.clover -DartifactId=clover -Dversion=3.0.2 -Dpackaging=jar -Dfile=/path/to/file
      ERROR
      ERROR Alternatively, if you host your own repository you can deploy the file there:
      ERROR mvn deploy:deploy-file -DgroupId=com.cenqua.clover -DartifactId=clover -Dversion=3.0.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=url -DrepositoryId=id
      ERROR
      ERROR
      ERROR com.cenqua.clover:clover:jar:3.0.2
      ERROR
      ERROR from the specified remote repositories:
      ERROR (none)
      ERROR -> 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/MojoExecutionException

      ========

      Stefan Hansel added a comment - 16/Dec/10 10:00 AM

      Are there any news on this one?
      I'm just trying to convert our old ant builds to maven and directly fell into this issue.

      I also cannot find a version 3.0.4 on maven central, like Nick wrote on 1st Dec.

      http://repo1.maven.org/maven2/com/atlassian/maven/plugins/maven-clover2-plugin/

      ========

      Kasper Nielsen added a comment - 16/Dec/10 10:28 AM

      Look in the atlassian repo
      http://repository.atlassian.com/maven2/com/atlassian/maven/plugins/maven-clover2-plugin/
      Not sure why it isn't synced, maybe it is a manual process

      ========

      Stefan Hansel added a comment - 17/Dec/10 7:06 AM - edited

      Hi Kasper, thanks for the help, maven is now able to download 3.0.4.
      Unfortunately I'm running into the same problem now as you on 08.12.2010

      [ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.0.4:setup (default-cli) on project util_base_: Could not resolve the clover ar
      tifact ( com.cenqua.clover:clover:jar:3.0.2 ) in the localRepository: file:///C:/Dokumente%20und%20Einstellungen/hansel/.m2/repository/: Could not find artifact
      com.cenqua.clover:clover:jar:3.0.2

      I do have a file
      com/cenqua/clover/clover/3.0.2/clover-3.0.2.jar
      in my local repository though.

      ========

      Kasper Nielsen added a comment - 17/Dec/10 7:12 AM

      Hej Stefan,
      I'm still facing the problem.
      I have postponed upgrading to Maven 3 until Atlassian have fixed the bug

      ========

      David Buccola added a comment - 17/Dec/10 12:48 PM

      I am having this problem too and have some diagnostic information to contribute. I had two systems that had this problem. After I upgraded to 3.0.4 the problem went away on one of the systems. The other system, however, continued to get the error. I have discovered that the difference is the content of the local cache (~/.m2/repository). On the working system there is something in the local repository cache that makes things work. When I delete the repository cache and force the system to rebuild then the system that once worked begins to fail with 3.0.4.

      ========

      Chris Council added a comment - 17/Dec/10 3:08 PM

      We had the same issue. We found a workaround. The culprit seems to be this file:

      $LOCAL_REPOSITORY/com/cenqua/clover/clover/3.0.2/_maven.repositories

      I have no idea why this file causes problems, but removing it seems to fix things. Go figure.

      We tried with Maven 3.0, 3.0.1, on Windows, Linux, and Mac OS X... same problem on all OSes, same solution in all cases.

      ========

      Chris Council added a comment - 17/Dec/10 3:30 PM - edited

      One more thing - maven-clover2-plugin 3.0.4 is not in maven central at the moment, so we added http://repository.atlassian.com/maven2/ to our pluginRepositories. Perhaps this caused problems?

      ========

      Stefan Hansel added a comment - 29/Dec/10 10:13 AM

      Hi Chris, deleting the
      $LOCAL_REPOSITORY/com/cenqua/clover/clover/3.0.2/_maven.repositories
      file also solved the problems for me!

      Now I still have problems with the buildserver and all developer workstations, but as a start I can go on with my project to move from ant to maven.

      ========

      Nathan Wilhelmi added a comment - 04/Jan/11 2:05 PM

      We have bumped into this as well. None of the suggested fixes have worked for us.

      ========

      Marcin Kuthan added a comment - 21/Jan/11 4:55 AM

      Same error:
      Maven 3.0.1, 3.0.2.
      Plugin version 3.0.4

      Workaround with _maven.repositories file deletion works for me.

      ========

      Dmyrto added a comment - 07/Mar/11 12:35 PM

      Same error:
      Maven 3.0.2
      Plugin version 3.0.2, 3.0.4
      Workaround with _maven.repositories doesn't work for me. Any help would be appreciated.

      ========

      Dylan Hansen added a comment - 25/Mar/11 7:54 AM

      Do we have any timeline on a fix for this issue?

      ========

      jeff melching added a comment - 31/Mar/11 9:35 AM

      I have created the attached patch. Can one of the committers and a few others please try it out?

      ========

      Stefan Hansel added a comment - 01/Apr/11 7:32 AM

      jeff - could you upload the new jar as well. Then I could just deploy it on Nexus and do a test much easier.

      ========

      jeff melching added a comment - 01/Apr/11 8:56 AM

      attaching the snapshot version with the proposed patch.

      ========

      Stefan Hansel added a comment - 11/Apr/11 8:49 AM

      Hi Jeff,
      my maven skills are not very good - I was not able to upload the snapshot to our Nexus (this is not possible).
      So I 'hacked' the clover2.0.4.jar in my local repository (just replaced the class files), then deleted the com.cenqua files from my local repositories so that they'd be redownloaded.

      Now the _maven.repositories file exists again and even with the patched clover.jar I get the error message from the first post again.

      So either the patch/jar does not work or I made a mistake with my tries to get it working.

      =======

      jeff melching added a comment - 11/Apr/11 8:55 AM

      What you did won't work. You need to add a dependency to the 3.0.5-SNAPSHOT and upload the jar to your repo. The change i made has nothing to do with the _maven.repositories file. That file is an internal maven file and should exist.

      You need to do this:
      1) mvn deploy the jar with the pom to your repo
      2) add a dependency to it in your pom
      3) clean your local repo, ie. delete .m2/repository
      4) run your build

      =======

      Nick Pellow added a comment - 11/Apr/11 5:01 PM

      Hi Jeff,

      Thanks for the patch! I hope to try this out today and if it runs well, will go for a release.

      Do you know if the patch is backward compatible with Maven 2.x ?

      Cheers,
      Nick

      =======

      jeff melching added a comment - 11/Apr/11 6:26 PM

      I haven't tried it on a maven 2.x build, but I would think that it would work there too, since I didnt' do anything specific to maven 3.

      =======

      Nick Pellow added a comment - 12/Apr/11 9:00 PM

      Hi Jeff,

      I've applied your patch and deployed maven-clover2-plugin:3.0.5 to our public repo.
      https://maven.atlassian.com/content/groups/public/com/atlassian/maven/plugins/maven-clover2-plugin/3.0.5/

      I tested with both Maven2 and Maven3, and couldn't see any problems.

      Great work on getting that patch done.
      I have alos deployed 3.0.5 to our centralsync repository, so hopefully it arrives at maven central soon.

      Best Regards,
      Nick

      ======

      This appears to be back again in 3.1.0.

      [ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.1.0:instrumentInternal (default) on
      project myproject: Could not resolve the clover artifact ( com.cenqua.clover:clover:jar:3.1.0 ) in the
      localRepository: file:///home/abc/.m2/repository/: Could not find artifact com.cenqua.clover:clover:jar:3.1.0

      =======

      John Kilmer added a comment - 17/Jun/11 7:29 AM

      Reopening due to regression.

      =======

      EJ Ciramella added a comment - 29/Jul/11 7:00 AM

      I've seen this same issue with mvn 3.0.3 and every version of clover from 3.0.5 on through trunk (which is 3.1.1-SNAPSHOT currently).

      We've had to totally disable this so our builds can/will pass.

      I haven't taken a deep dive into the source code at this point, but when you run clover in conjunction with a "deploy" it fails, but when you use a goal that does everything but deploy, it works fine (so mvn verify works but mvn deploy fails). There's REALLY no sense in running a verify AND a deploy with every build...

      Why is it trying to download anything? Why isn't it able to resolve everything from the local repository - didn't it just build up the cloverized jar?

      Any targeted release this will be fixed in?

      Attachments

        Activity

          People

            mparfianowicz Marek Parfianowicz
            mparfianowicz Marek Parfianowicz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: