mstorkson
mstorkson

Reputation: 1260

Solving issues with dependencies in a NetBeans Maven Project

I have a project in NetBeans that uses Maven to download additional dependencies I might need. Yesterday I started getting red underlines on imports that had already existed for months. I made a couple of mistakes that made the problem worse in trying to fix it, I misunderstood how "install local artifact" is used and I think ended up placing some JARs inside other packages.

The long story short of it is that now I have an indeterminate number of packages that have the correct name, but incorrect contents. I tried deleting the project cloning an earlier version, and switching to other branches of the project I have never touched, but the imports still appear to be messed up, so I can only conclude there is a local problem with my computer.

Is there any way to wipe out all the locally installed versions of these packages and re-download them fresh? Its to the point where trying to solve it one problem at a time would eat up multiple days, and since I have a saved copy of the correctly formatted pom.xml for my project, I'd rather just rebuild from there, but I have no idea how to do that, or even if it is possible.

Upvotes: 0

Views: 1219

Answers (1)

niekname
niekname

Reputation: 2616

You could try to delete all maven artifacts from your local maven repository: $USER_HOME/.m2 And then refresh the project so it will re-download all dependencies. You could also just delete those dependencies that are causing problems

Upvotes: 1

Related Questions