How to solve maven 2.6 resource plugin dependency?

2019-01-07 22:25发布

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 read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6

Solutions Tried:

Updated project: not able to download from REPO of maven.

Tried putting perticular jar in that folder of .m2 repo.

Can provide references if you want.

10条回答
虎瘦雄心在
2楼-- · 2019-01-07 22:41

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

查看更多
手持菜刀,她持情操
3楼-- · 2019-01-07 22:50

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.

查看更多
▲ chillily
4楼-- · 2019-01-07 22:50

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>
查看更多
Luminary・发光体
5楼-- · 2019-01-07 22:51

Tried everything. I deleted m2e and installed m2e version 2.7.0. Then deleted the .m2 directory and force updated maven. It worked!

查看更多
虎瘦雄心在
6楼-- · 2019-01-07 22:52

On windows:

  1. Remove folder from C:\Users\USER.m2
  2. Close and open the project or force a change on file: pom.xml for saving :)
查看更多
何必那么认真
7楼-- · 2019-01-07 22:53

This fixed the same issue for me: My eclipse is installed in /usr/local/bin/eclipse

1) Changed permission for eclipse from root to owner: sudo chown -R $USER eclipse

2) Right click on project/Maven right click on Update Maven select Force update maven project

查看更多
登录 后发表回答