0

By default, the maven plugin is integrated with the latest Eclipse IDE versions (eg., Mars). However, on creating a Maven project it simply throws the following error:

Note: it doesn't undergo any proxy setup

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-resources-plugin:jar:2.6 in http://localhost:8081/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-resources-plugin:jar:2.6 in http://localhost:8081/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced

enter image description here enter image description here

Tool used:

Eclipse Java EE IDE for Web Developers.
Version: Mars Release (4.5.0)
Prashanth Sams
  • 19,677
  • 20
  • 102
  • 125
  • possible duplicate: http://stackoverflow.com/questions/12533885/could-not-calculate-build-plan-plugin-org-apache-maven-pluginsmaven-resources – soorapadman Sep 15 '15 at 06:05
  • yea I understand but its not a proxy issue. just now noticed the problem and added mirrors in the xml file; I think I have given the explicit answer for this question; hope it will help a lot of users :) – Prashanth Sams Sep 15 '15 at 06:12

2 Answers2

0

The following xml file did trick for me., to do so..

1| Create an xml file (settings.xml) in the following location, C:\Users\username\.m2\settings.xml

2| Copy and paste the below xml snippet that contains multiple mirror tags in it.

3| Save the xml file.

<settings xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <mirrors>
        <mirror>
            <id>ibiblio.org</id>
            <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- United States, North Carolina -->
        </mirror>
        <mirror>
            <id>lsu.edu</id>
            <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- United States, Louisiana -->
        </mirror>
        <mirror>
            <id>sateh.com</id>
            <url>http://maven.sateh.com/repository</url>
            <mirrorOf>central</mirrorOf>
            <!-- The Netherlands, Amsterdam -->
        </mirror>
        <mirror>
            <id>dotsrc.org</id>
            <url>http://mirrors.dotsrc.org/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- Denmark -->
        </mirror>
        <mirror>
            <id>sunsite.dk</id>
            <url>http://mirrors.sunsite.dk/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- Denmark -->
        </mirror>
        <mirror>
            <id>skynet.be</id>
            <url>http://maven2.mirrors.skynet.be/pub/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- Belgium -->
        </mirror>
        <mirror>
            <id>cica.es</id>
            <url>http://ftp.cica.es/mirrors/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- Spain, Sevilla -->
        </mirror>
        <mirror>
            <id>redv.com</id>
            <url>http://mirrors.redv.com/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- Shanghai, China -->
        </mirror>

        <!-- these just point to ibiblio.org -->
        <mirror>
            <id>ibiblio.net</id>
            <url>http://www.ibiblio.net/pub/packages/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- United States, North Carolina -->
        </mirror>
        <mirror>
            <id>ggi-project.org</id>
            <url>http://ftp.ggi-project.org/pub/packages/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- The Netherlands, Amsterdam -->
        </mirror>
    </mirrors>
    <profiles>
        <profile>
            <id>alwaysActiveProfile</id>
            <repositories>
                <repository>
                    <id>central</id>
                    <url>http://repo1.maven.org/maven2/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>alwaysActiveProfile</activeProfile>
    </activeProfiles>
</settings>

4| Go to, Eclipse > Window > Preferences > Maven > User Settings

5| Check User Settings location

enter image description here

Prashanth Sams
  • 19,677
  • 20
  • 102
  • 125
0

it was disturbing me too but someone gave me this solution and it worked

make sure you are online

  • Right-click your project -Click on Maven

-Update project

-Force update snapshots/ Releases

-Ok

Insookwa
  • 89
  • 1
  • 5