Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

How do I resolve maven dependencies for building application on HDP stack?

avatar
New Member

Two ways to deal with this

  1. If you have a internal maven repository manger like Sonatype Nexus, one can setup a proxy pointing to http://repo.hortonworks.com/content/repositories/releases/ and internally add it to the nexus maven repository groups.
  2. If one doesn't have any type of maven repository manager they can directly use the public groups url "http://repo.hortonworks.com/content/groups/public/" in there maven settings.xml as a mirror
1 ACCEPTED SOLUTION

avatar

Example Maven Section:

<repositories>
    <repository>
        <releases>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
            <checksumPolicy>warn</checksumPolicy>
        </releases>
        <snapshots>
            <enabled>false</enabled>
            <updatePolicy>never</updatePolicy>
            <checksumPolicy>fail</checksumPolicy>
        </snapshots>
        <id>HDPReleases</id>
        <name>HDP Releases</name>
        <url>http://repo.hortonworks.com/content/repositories/releases/</url>
        <layout>default</layout>
    </repository>
...

View solution in original post

4 REPLIES 4

avatar

Example Maven Section:

<repositories>
    <repository>
        <releases>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
            <checksumPolicy>warn</checksumPolicy>
        </releases>
        <snapshots>
            <enabled>false</enabled>
            <updatePolicy>never</updatePolicy>
            <checksumPolicy>fail</checksumPolicy>
        </snapshots>
        <id>HDPReleases</id>
        <name>HDP Releases</name>
        <url>http://repo.hortonworks.com/content/repositories/releases/</url>
        <layout>default</layout>
    </repository>
...

avatar
New Member

If there is a reason for not touching the project's pom.xml one could fix their maven settings.xml to mirror http://repo.hortonworks.com/content/groups/public/ and direct all the maven requests

avatar
Expert Contributor

Thank you @gkesavan, here is the entry which worked for me:

   <mirror>
      <id>hw_central</id>
      <name>Hortonworks Mirror of Central</name>
      <url>http://repo.hortonworks.com/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>
   </mirror>

avatar
New Member

example on how to user mirror in maven settings.xml : https://maven.apache.org/guides/mini/guide-mirror-settings.html