Maven plugins can not be found in IntelliJ

前端 未结 30 1078
暗喜
暗喜 2020-12-04 10:09

After updating IntelliJ from version 12 to 13, the following Maven-related plugins cannot be resolved:

org.apache.maven.plugins:maven-clean-plugin:2.4.1
org.a         


        
相关标签:
30条回答
  • 2020-12-04 10:21

    I could solve this problem by changing "Maven home directory" from "Bundled (Maven 3) to "/usr/local/Cellar/maven/3.2.5/libexec" in the maven settings of IntelliJ (14.1.2).

    0 讨论(0)
  • 2020-12-04 10:23

    The red with warnings maven-site-plugin resolved after the build site Lifecycle:

    My IntelliJ version is Community 2017.2.4

    0 讨论(0)
  • 2020-12-04 10:24

    For me it was as simple as giving the plugin a version:

    <version>3.3.0</version>
    

    The full plugin code sample is given below:

    <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>3.3.0</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <archive>
                <manifest>
                  <mainClass>Main</mainClass>
                </manifest>
              </archive>
              <descriptorRefs>
                <descriptorRef>jar-with-dependencies</descriptorRef>
              </descriptorRefs>
            </configuration>
          </execution>
        </executions>
      </plugin>
    
    0 讨论(0)
  • 2020-12-04 10:25

    I am using IntelliJ Ultimate 2018.2.6 and found out, that the feature Reimport All Maven Project does not use the JDK, which is set in the Settings: Build, Execution, Deployment | Build Tools | Maven | Runner. Instead it uses it's own JRE in IntelliJ_HOME/jre64/ by default. You can configure the JDK for the Importer in Build, Execution, Deployment | Build Tools | Maven | Importing.

    In my specific problem, an SSL certificate was missing in the JREs keystore. Unfortunately IDEA only logs this issue in it's own logfile. A little red box to inform about the RuntimeException had been really nice...

    0 讨论(0)
  • 2020-12-04 10:26

    Run a Force re-import from the maven tool window. If that does not work, Invalidate your caches (File > Invalidate caches) and restart. Wait for IDEA to re-index the project.

    0 讨论(0)
  • 2020-12-04 10:26

    I tried the other answers, but none of them solved this problem for me.

    The problem disappeared when I explicitly added the groupId like this:

    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-clean-plugin</artifactId>
            <version>3.1.0</version>
        </plugin>
    </plugins>
    

    Once the color of the version number changed from red to black and the problem disappeared from the Problems tab the groupId can be removed again from the problematic plugin, the error does not show up again and the version number even shows up as suggestion for version.

    0 讨论(0)
提交回复
热议问题