'How to provide Nexus path in Maven pom.xml
I am using maven for my project and need to provide a Nexus path after providing GroupId, ArtifactId and Version.
<dependency>
<groupId>com.org.abc</groupId>
<artifactId>myartifactid</artifactId>
<version>myversion</version>
</dependency>
<dependency>
<groupId>com.org.def</groupId>
<artifactId>myartifactid</artifactId>
<version>myversion</version>
</dependency>
<dependency>
<groupId>com.org.ghi</groupId>
<artifactId>myartifactid</artifactId>
<version>myversion</version>
</dependency>
My Nexus path - https://nexus/content/repositories/
Artifact present in path - https:/mynexusdomain/nexus/content/repositories/snapshots/com/org/abc/myartifactid/MySnapshotVersion/plugins/MyRequiredJars
Settings.xml:
<?xml version="1.0" encoding="utf-8"?>
<settings xmlns="http://maven.apache.org/settings/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>D:/Maven_repo</localRepository>
<mirrors>
<mirror>
<id>nexus</id>
<name>Nexus</name>
<url>http://NexusDomain/nexus/content/repositories/myrepo/myrepo1/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
Here, as per the pom file, I can mention the groupid (com.org.abc), artifactid (myartifactid). Is there any possible ways to mention the path after artifactid in nexus url ie., to take artifact inside that particular folder ?
Any inputs would be really appreciated. Thank you !
Solution 1:[1]
No, you don't use folders inside Nexus. Only groupId, artifactId, version. If you need to load other JARs, load them with their own respective groupId, artifactId, version.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | J Fabian Meier |
