Unresolved plugin: 'org.apache.maven.plugins:maven-compiler-plugin:3.8.0' - maven

I tried to set up Maven projects under my IntelliJ IDE. However, when I try to update the pom.xml file, I am getting this error. I tried deleting the .m2 repository under Users, made the changes under Build Tools for Maven. Still, the issue doesn't seem to get resolved.

You can try
File -> Invalidate Caches -> Invalidate and Restart
so IntelliJ will try index again to the resources.

Related

Intellij Maven says Dependency not found but the same is working in eclipse

I wanted to use Intellij to code but the issue is it is not recognizing one dependency but the same does not happen in Eclipse. Attached is the error I am getting.
Maven error Intellij
I tried the following things but none of them worked.
Maven reload all projects
Invalidate Cache
Maven Settings checked Always update snapshots
Maven clean and Install
Can someone guide me on this with what is the exact issue? Because it does not show any such error in eclipse. Why Intellij has this issue?

Maven project builds but dependencies seem to be unavailable in IntelliJ IDEA

I have a multi-level Maven project that builds fine on the command-line using mvn clean install and builds in IntelliJ IDEA (2019.3) by manually running the parent project's clean and install phase. The Problems view shows nothing wrong. When I open files that have certain external libraries, they show as being unable to be resolved:
I'm usually able to browse external libraries' contents in the project browser. I've noticed that these external libraries IntelliJ can't find are listed but not browsable.
Other people working on our project with the same code base and same IntelliJ version don't seem to have this problem. I've tried:
"Reimport all Maven projects"
File -> Invalidate Caches/Restart
Completely deleting my ~/.m2/repository
Completely deleting my $PROJECT_ROOT/.idea directory and reimporting
Recloning and reimporting the project from scratch
None of the above seem to work.
The root case for this problem was not identified and is still under investigation, but what can help is removing the IDE settings and starting with the defaults.

Importing to IntelliJ - Error package org.springframework.boot does not exist

Dear Stackoverflow Community, I have the following problem with my spring boot starter application. I imported the starter project as a new maven project into IntelliJ. But IntelliJ does not find the dependencies I specified in the pom.
Image of my Application Class:
If I try to run the project I get the following error message.
Image of the Error Message:
I already tried everything from re-installing IntelliJ to re-importing the project or redownloading the dependencies. I simply dont know why IntelliJ doesn´t find the dependencies.
My pom.xml looks as following
Image of my pom.xml:
The first time I tried to edit the pom.xml it said to me "this file does not belong to the project". Maybe this might be one reason.
Running the whole thing with 'mvn install' or 'mvn clean verify' works.
Try this and then build: mvn -U idea:idea
Had the same problem. I have tried everything: invalidating cache, deleting the whole .m2 folder, changing settings, reloding the project, nothing helped.
The solution for me was to delete the .iml files which are IntelliJ module files used for keeping module configuration. After reopening the project it worked.
The idea was not mine, I found the hint here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/203365204--package-does-not-exist-error-despite-autocomplete-being-aware-of-them
Sometimes your workspace could get corrupted.
In my case, I tried to Reload the project and it worked
in my case changed JDK version in Maven importer from JDK 11 to my local JDK version 1.8
Here is how my IntelliJ settings for spring boot application looks like
Click open -> browse your workspace -> and select POM.xml file
Check this in your intelliJ settings
Do this too [Settings --> Maven --> Importing]
I just had the same issue. My solution was to remove all dependencies from the pom, reload via maven -> Reload All Maven Projects. Run mvn compile. Add dependencies back to the pom, maven -> Reload All Maven Projects. Run mvn compile.
Now the Intellij build works.
You need to change Maven's JDK for importing option from Project JDK to the Path variable for Java on your machine.
You can get to this by going to Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Importing. Scroll down to the bottom and look for JDK for importing:. Select from the list the path variable for JAVA.
For Windows users, JAVA_HOME should be an option in the drop-down list.
Follow these steps, your problem should be solved. You just need to add Spring-framework-starter-web and Spring-framework-starter-tester from your pom.xml file.
Got to generate(ALT+Insert)
Add dependencies
Search "springframwork"
Add...
Here is the link
In my case, adding the project as maven project helped .

Maven pom.xml plugin not found. Screenshot attached

screenshot
All the dependencies and plugins in my project were resolved when I was using my old computer. Today I had to switch to the new one, reinstall all the programs and clone the project from git again. Right now I'm kinda baffled on how to solve this issue.
I've tried reimporting the project, invalidating caches and restarting IntelliJ Idea, performing mvn clean install -U, mvn clean install.
Still.
There are a couple of possibilities for this to happen:
Do you by chance have a custom settings.xml (mostly found in ~/.m2 folder) file pointing to another maven repository than maven central?
Versions of the plugins are unavailable or wrong?
Internet connectivity :-)
My guess is that your "old" computer had a custom settings.xml file which is not present on your new computer (yet)...

Resource nexus-maven-repository-index.properties does not exist in IntelliJ

While experimenting with Grails 3 under IntelliJ I found the following warning:
Unindexed remote maven repositories found. Disable...
The following repositories used in your gradle projects were not indexed yet:
https://repo.grails.org/grails/core
If you want to use dependency completion for these repositories artifacts,
Open Repositories List, select required repositories and press "Update" button (show balloon)
If I am trying to resolve an issue, I get next error:
FileNotFoundException: Resource nexus-maven-repository-index.properties does not exist in IntelliJ
I would prefer to know, what does it mean? If repository is marked as "remote", then why the problem is absence of some (local?) file?
UPDATE
I think this is not related with Grails actually.
How to know more details on error, occurring in Indexed Maven Repositories Window in IntelliJ on Update button?
The popup message says
Resource nexus-maven-repository-index.properties does not exist in IntelliJ
If you're using your custom repository
AND it is Nexus 3.x
chances are high that you forgot to set up a Task to publish your maven repository indexes.
Log in via browser.
Go to Administration/System/Tasks/Create Task/Create Publish Maven indexes Task
Set it for an hourly publish. Done.
For me the solution was to delete the folder ~/.m2/repository. This made Maven to re-index everything correctly.
Failed trials, that may work for someone else:
Build, Execution, Deployment → Build Tools → Maven → Repositories : Selecting the repositories and click updates.
Build, Execution, Deployment → Build Tools → Maven: Giving more memory JVM
Delete folder ~/.IntelliJIdea2016.3/system/caches
You can try using grails/repo and grails/plugins instead of grails/core.
For example, in build.gradle:
repositories {
mavenLocal()
maven { url 'http://repo.grails.org/grails/repo' }
maven { url 'http://repo.grails.org/grails/plugins' }
}
I tested on IntelliJ Community 15 with Grails 3.0.9, JVM Version: 1.8.0_45, Apache Maven 3.3.9 and Gradle 2.3.
The same error occurs for Artifactory users. Solved with sanya's hint. Make sure the local repositories are included.
After that the repo works:
I've had faulty indexes after fresh install (from Snap ubuntu).
It has been solved by changing the MAVEN HOMe PATH
I've switched from "bundled" to "/usr/share/maven"
None of the solutions aforementioned solved my issue in my case

Resources