Question

I have set up the Sonatype Nexus for repository caching.

com.googlecode.htmleasy is not being resolved by maven. Getting error

Failure to find com.googlecode.htmleasy:htmleasy:jar:0.7 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 -> [Help 1]

htmleasy is one artifact which is sitting inside google code based maven repo.

 <repository>
      <id>htmleasy</id>
      <url>http://htmleasy-maven.googlecode.com/svn/trunk/</url>
   </repository>

But What should I do so that when I refer following artifact based on above repo

<dependency>
      <groupId>com.googlecode.htmleasy</groupId>
      <artifactId>htmleasy</artifactId>
      <version>0.7</version>
   </dependency>

gets resolved by my maven ?

My maven settings xml looks like as follows,

<?xml version="1.0" encoding="UTF-8"?>
<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>nexus</id>
      <mirrorOf>*</mirrorOf>
      <url>http://localhost:8081/nexus/content/groups/public</url>
    </mirror>
  </mirrors>
  <proxies></proxies>
  <servers></servers>
  <pluginGroups></pluginGroups>
  <profiles>
    <profile>
      <id>nexus</id>
      <!--Enable snapshots for the built in central repo to direct -->
      <!--all requests to nexus via the mirror -->
      <repositories>
        <repository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>nexus</activeProfile>
  </activeProfiles>
</settings>
Was it helpful?

Solution

Add a new proxy repository and do not forget to add it to your 'public' repository group.

(If you still get "resolution will no be reattempted" error from maven, try calling maven with '-U'.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top