Maven: Could Not find Artifact when trying to include a project in another one using dependencies

We Are Going To Discuss About Maven: Could Not find Artifact when trying to include a project in another one using dependencies. So lets Start this Java Article.

Maven: Could Not find Artifact when trying to include a project in another one using dependencies

  1. Maven: Could Not find Artifact when trying to include a project in another one using dependencies

    Do a mvn clean install.
    This will clean whatever created from the previous build, then build your project and add the jars to your local maven repository (.m2\repository)

  2. Maven: Could Not find Artifact when trying to include a project in another one using dependencies

    Do a mvn clean install.
    This will clean whatever created from the previous build, then build your project and add the jars to your local maven repository (.m2\repository)

Solution 1

Do a mvn clean install.
This will clean whatever created from the previous build, then build your project and add the jars to your local maven repository (.m2\repository)

Original Author Jobin Of This Content

Solution 2

I also faced the same problem……………….Issue got resolved
Do a maven clean and install of the child project and then try

maven clean and install of parent project.

For reference watch these videos
https://www.youtube.com/watch?v=2aNC1EAnpqo
https://www.youtube.com/watch?v=EMfd2FwKKHY

Original Author Krithika Of This Content

Solution 3

I was facing the same issue, I had a parent project that would fail on the Clean Install of a dependent project.

I tried all of the above solutions to no avail, running clean install both in eclipse and from command line.

I was able to solve by navigating to the Child Project and Running the following

  1. Cleaning the project mvn clean
  2. Setting as eclipse project mvn eclipse:eclipse (this forced download of missing jars)
  3. Follow by clean install of Child project mvn clean install -U
  4. Finally clean install on parent project mvn clean install -DskipTests -P(if necessary a profile here) -U

This helped when maven was not downloading jar’s properly listed in the pom.xml, I was not able to find why clean install with Update Snapshots/etc. did not download the missing jars.

Original Author J.Leupp Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment