Question

Why it could be that IDEA is creating maven snapshot dependencies with a path like: (the first time only for 4 out of ~10 dependencies)

C:\Users\<user>\.m2\repository\com\foo\bar\some\1.6.0-SNAPSHOT\some-1.6.0-20130708-101124-145.jar

I fixed them by hand in the .ipr file just to see, what will happen. I wrote:

C:\Users\<user>\.m2\repository\com\foo\bar\some\1.6.0-SNAPSHOT\some-1.6.0-SNAPSHOT.jar

and after opening IDEA, the references in java code worked fine, but under Maven Projects the dependencies were marked red. After clicking on Reimport All Maven Projects the wrong dependencies came back - now not only the 4, but almost all snapshots I am referencing.

I have looked in the pom.xml files, the version in the dependencies is always 1.6.0-SNAPSHOT.

Était-ce utile?

La solution 2

Build your project using maven

 mvn clean install

now all the dependencies downloaded to your local Maven repository.(you can define it.)

Then all the dependencies are in one location. Go to module(project) properties in IntelliJ IDEA by right click on that project. set your local repository as maven repository. Then re import dependencies. Now you solved that issue. If you have more issues leave a comment here

Autres conseils

File/Settings.../Maven/Allways update snapshots

This did it for me + hope that can help (even me in the future).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top