How to solve maven 2.6 resource plugin dependency?

前端 未结 11 1729
無奈伤痛
無奈伤痛 2020-11-29 07:16

ERROR:

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to         


        
相关标签:
11条回答
  • 2020-11-29 07:57
    This issue is happening due to change of protocol from http to https for central repository. please refer following link for more details. https://support.sonatype.com/hc/en-us/articles/360041287334-Central-501-HTTPS-Required 
    
    In order to fix the problem, copy following into your pom.ml file. This will set the repository url to use https.
    
    <repositories>
            <repository>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <id>central</id>
                <name>Central Repository</name>
                <url>https://repo.maven.apache.org/maven2</url>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <releases>
                    <updatePolicy>never</updatePolicy>
                </releases>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <id>central</id>
                <name>Central Repository</name>
                <url>https://repo.maven.apache.org/maven2</url>
            </pluginRepository>
        </pluginRepositories>
    
    0 讨论(0)
  • 2020-11-29 07:58

    Seems your settings.xml file is missing your .m2 (local maven repo) folder.

    When using eclipse navigate to Window -> Preferences -> Maven -> User Settings -> Browse to your settings.xml and click apply.

    Then do maven Update Project.

    enter image description here

    0 讨论(0)
  • 2020-11-29 08:03

    I have faced the same issue. Try declaring missing plugin in the conf/settings.xml.

    <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-resources-plugin</artifactId>
              <version>2.6</version>
            </plugin>           
          </plugins>
        </pluginManagement>   
    </build>
    
    0 讨论(0)
  • 2020-11-29 08:06

    If a download fails for some reason Maven will not try to download it within a certain time frame (it leaves a file with a timestamp).

    To fix this you can either

    • Clear (parts of) your .m2 repo
    • Run maven with -U to force an update
    0 讨论(0)
  • 2020-11-29 08:08

    Step 1 : Check the proxy configured in eclipse is correct or not ? (Window->Preferences->General->Network Connections).

    Step 2 : Right Click on Project-> Go to Maven -> Update the project

    Step 3: Run as Maven Install.

    ==== By Following these steps, i am able to solve this error.

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