Menu

This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced

When we build a maven project, we might encounter a very common Maven cached error, due to that our build is getting failed. This is caused by Maven’s default update policy. With respect to fixing this error, er have to run the "mvn install" command in forcefully update mode.


To bypass this default restriction, you can do the following:
  •     add the -U flag to the maven install command, or
  •    configure your Maven clients’ settings.xml file with the following value <updatePolicy>always</updatePolicy>. Below is the sample settings.xml file.
<settings xmlns="https://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="https://maven.apache.org/SETTINGS/1.0.0
                      https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
 <!-- ====================================================== -->
 <!-- A D O B E   P U B L I C   P R O F I L E                -->
 <!-- ====================================================== -->
     <profile>
         <id>adobe-public</id>
         <activation>
             <activeByDefault>true</activeByDefault>
         </activation>
         <properties>
             <releaseRepository-Id>adobe-public-releases</releaseRepository-Id>
             <releaseRepository-Name>Adobe Public Releases</releaseRepository-Name>
             <releaseRepository-URL>https://repo.adobe.com/nexus/content/groups/public</releaseRepository-URL>
         </properties>
         <repositories>
             <repository>
                 <id>adobe-public-releases</id>
                 <name>Adobe Public Repository</name>
                 <url>https://repo.adobe.com/nexus/content/groups/public</url>
                 <releases>
                     <enabled>true</enabled>
                     <updatePolicy>never</updatePolicy>
                 </releases>
                 <snapshots>
                     <enabled>false</enabled>
                 </snapshots>
             </repository>
         </repositories>
         <pluginRepositories>
             <pluginRepository>
                 <id>adobe-public-releases</id>
                 <name>Adobe Public Repository</name>
                 <url>https://repo.adobe.com/nexus/content/groups/public</url>
                 <releases>
                     <enabled>true</enabled>
                     <updatePolicy>always</updatePolicy>
                 </releases>
                 <snapshots>
                     <enabled>false</enabled>
                 </snapshots>
             </pluginRepository>
         </pluginRepositories>
     </profile>
</profiles>
 <activeProfiles>
     <activeProfile>adobe-public</activeProfile>
 </activeProfiles>
</settings>

19 comments:

  1. Great Info, Thanks For Sharing , keep it up we are here to learn more

    Great! I like to share it with all my friends and hope they will also like this information.
    Informatica Training In Hyderabad
    Informatica Online Training
    Informatica Training
    Informatica Training Online

    ReplyDelete
  2. Great Info, Thanks For Sharing , keep it up we are here to learn more

    Great! I like to share it with all my friends and hope they will also like this information.
    Tableau Training In Hyderabad
    Tableau Online Training
    Tableau Training
    Tableau Training In Ameerpet
    Tableau Training Online

    ReplyDelete
  3. cannot find setting.xml file

    ReplyDelete
    Replies
    1. For windows user. Settings.xml file location C >> Users > username > .m2 > settings.xml

      Or the easiest way to find the file, do a command mvn -X // this will provide you all maven details.

      Delete
  4. Nice Article!

    Thanks for sharing with us 🙂

    React Training in Hyderabad

    ReplyDelete