Adding a maven transitive exclude temporarily might also do it, if you're running into it from transitive chain of dependencies."Īnother thing that might help is to use a "newer version" of maven than the bundled 3.0.5. Somehow after that point IntelliJ "remembers" its old working dependencies. If this is also your problem, "urrent work around: if you do not actually need to use classes from that jar in your own code (for instance a transitive maven dependency only), you can actually get away with commenting it out from the pom (temporarily), maven project reload, and then uncomment it. It seems in this case I was dealing with a jar that didn't have an associated pom file (in our maven nexus repo, and also my local repository). In my instance it said "Problems: No versions available for XXX" or "Failed to read descriptor for artifact org.xy.z" ref: You can actually see the real failure by mousing over the project name itself. If the dependencies are all underlined in red, "Houston, we have a problem". Then expand one of your maven projects and its dependencies. You can tell if this is the case by opening the maven projects tool window (View menu -> Tool Windows -> Maven Projects). The cause was that sometimes IntelliJ "doesn't parse maven dependencies right" and if it can't parse one of them right, it gives up on all of them, apparently. Ran into this again, with IntelliJ 15 this time, which has no "use maven3 to import" option available anymore. Ref: (which may have a few other ideas too) Fix IntelliJ 15+ The Import Maven Projects automatically setting has been moved to Build, Execution, Deployment > Build Tools > Maven > Importing in your IntelliJ preferences.įile -> Settings -> maven -> importing and uncheck "use maven3 to import project" Re-import the project into IntelliJ and pay attention when it asks you to enable auto-import.Run mvn clean install from the command line.idea folders (there should be one per module) Close your project window (and IntelliJ) and remove all *.iml files and all.If that doesn't help, then I would suggest to make a full clean-up and start again: You can enable such feature going to File > Settings > Maven > Importing, there is a checkbox that says "Import Maven projects automatically". That means that if you make any changes to your POM those changes will be loaded automatically. When importing Maven projects into IntelliJ an information box usually comes up asking you if you want to configure Auto-Import for Maven projects. IntelliJ should download and add all your dependencies to the project's classpath automatically as long as your POM is compliant and all the dependencies are available.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |