maven missing artifact

22,607

Solution 1

This usually happens when changing from one maven configuration to another. In my case, I was switching from direct connection to maven central to using nexus as a mirror.

Deleting maven-metadata*.xml and _*.repositories inside local \Users\YourUser\.m2 folder did the trick for me.

Hope this helps!

Solution 2

In IntelliJ: -go to File -settings -on search box top left type 'maven'. -click on maven option -see if work offline box is checked. if yes then uncheck it

In Eclipse: -click on the small dropdown arrow on the green Run icon. -click on run configurations and select you maven build config -see if 'offline' box is checked. if yes then uncheck it

If you did this and still getting same issue then I would go with @Faliorn solution

Solution 3

I faced with this problem when tried make install with Intellij IDEA Maven plugin. But when I made install with local Maven installation, problem was gone. If you have same problem try to install new Maven and run mvn install

Share:
22,607
bob-cac
Author by

bob-cac

Updated on July 05, 2022

Comments

  • bob-cac
    bob-cac about 2 years

    I have a maven project which until yesterday was being build normally. Now whenever i try to build using m2e it fails to build because it could not resolve dependencies, but these dependencies are not missing and they are found in my local repository. I know that this question has been asked before but none of the answers solved my problem. I have tried many things:

    • deleting the cache.
    • closing the project and reopening it.
    • doing a clean install of the project.

    Yet no result. So is there more systematic procedure to solve this problem?

    Edit log:

    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building itunit-workflow 1.0.2-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [WARNING] The POM for org.activiti:activiti-bpmn-converter:jar:5.13 is missing, no dependency information available
    [WARNING] The POM for org.springframework:spring-beans:jar:3.1.2.RELEASE is missing, no dependency information available
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 7.279s
    [INFO] Finished at: Mon Dec 16 18:30:10 GMT+02:00 2013
    [INFO] Final Memory: 5M/76M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal on project itunit-workflow: Could not resolve dependencies for project org.itunit.itunit:itunit-workflow:ejb:1.0.2-SNAPSHOT: The following artifacts could not be resolved: org.activiti:activiti-bpmn-converter:jar:5.13, org.springframework:spring-beans:jar:3.1.2.RELEASE: Cannot access central (http://repo.maven.apache.org/maven2) in offline mode and the artifact org.activiti:activiti-bpmn-converter:jar:5.13 has not been downloaded from it before. -> [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/DependencyResolutionException
    
  • Kumar S
    Kumar S over 9 years
    Deleting maven-metadata*.xml and _*.repositories worked for me. Thanks. Another thought is, it is not a bad idea to clean up .m2 folder when we switch one maven configuration to another.
  • Frans
    Frans over 7 years
    Just removing _*.repositories did the trick for me already, didn't need to remove maven-metadata*.xml
  • Frans
    Frans over 7 years
    BTW @bob-cac, this should be the accepted answer, IMHO.
  • krock
    krock over 6 years
    That was it. I have profiles set up for different maven repos, so when I was running in offline mode -o, I still had to run with the right repo profile on.
  • LexSav
    LexSav about 3 years
    Indeed, disabled "Work offline" option and it worked. Why I had this option enabled in the first place, that's a question... Thanks
  • Bashir Saidi Wamula
    Bashir Saidi Wamula over 2 years
    The solution worked for me. "Work offline" option was checked it then worked when I unchecked, reimported all the maven to the project and I restarted IntelliJ