Wouter
Wouter

Reputation: 125

Adding a dependency to maven (link is with a port)

I'm having a problem adding a dependency to my maven project. The link to the .jar is here -> http://maven.etherfirma.com:8081/nexus/content/repositories/public/com/github/jHipchat/0.0.1/

I already tried this:

        <dependency>
        <groupId>com.maven.etherfirma</groupId>
        <artifactId>nexus-content-repositories-public-com-github-jHipchat</artifactId>
        <version>LATEST</version>
        <scope>compile</scope>
    </dependency>

But that didnt work at all.

I hope someone can help me

Thanks in advance!

Upvotes: 0

Views: 79

Answers (2)

MariuszS
MariuszS

Reputation: 31577

Read about Using the Internal Repository.

Using the internal repository is quite simple. Simply make a change to add a repositories element

Add local repository to pom.xml

<repositories>
  <repository>
    <id>etherfirma</id>
    <url>http://maven.etherfirma.com:8081/nexus/content/repositories/public</url>
  </repository>
</repositories>

And correct your dependency

<dependency>
    <groupId>com.github</groupId>
    <artifactId>jHipchat</artifactId>
    <version>LATEST</version>
    <scope>compile</scope>
</dependency>

Coordinates of your artifact jHipchat are available in jHipchat-0.0.1.pom

Upvotes: 2

Joachim Rohde
Joachim Rohde

Reputation: 6045

You need to add a new repository, like this:

<project>
  ...
  <repositories>
    <repository>
      <id>etherfirma</id>
      <url>http://maven.etherfirma.com:8081/nexus/content/repositories/public</url>
    </repository>
  </repositories>
  ...
</project>

And your dependency should look like this:

<dependency>
    <groupId>com.github</groupId>
    <artifactId>jHipchat</artifactId>
    <version>0.0.1</version>
    <scope>compile</scope>
</dependency>

Upvotes: 0

Related Questions