Reputation: 49
Is it possible to add remote repository jar file (https://repo.ah/lib/abc.jar) in maven pom.xml as dependency in java project. if so, can you please share example.
Upvotes: 3
Views: 3455
Reputation: 35853
In the comments you mentioned that the URL is an Artifactory.
So just add the Artifactory as <repository>
to your settings.xml
and then you can use the jar in your application.
Upvotes: 0
Reputation: 4994
No, it's not possible to add a complete repository as a dependency. This doesn't make sense, because a repository can contain ten thousands of artifacts.
If your project requires artifacts which are not hosted in the standard remote repository, you can specify this via the <repositories>
tag in your pom.xml
.
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
<repository>
<id>vaadin-snapshots</id>
<url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
More Informations:
Introduction to Repositories
Setting up Multiple Repositories
Upvotes: 2