I am writing a package (PACK-A) that is consumed by another (PACK-B). For local development I want to use a local jar that is produced from PACK-A and use it in PACK-B.
The workflow would be
- cd
PACK-A;mvn clean; mvn package - cd
PACK-B;mvn clean; mvn package(but pulls in the localPACK-Ajar file)
I thought the way to do it was through the <repositories /> tag in the pom.xml file so my POM.xml file looks like this (lots taken out for brevity):
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.team</groupId>
<artifactId>PACK-B</artifactId>
<version>1.0.0</version>
<dependencies>
<groupId>com.company.team</groupId>
<artifactId>service-name</artifactId>
<version>0.3.0-master+17</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>service-name</id>
<url>file:///Users/username/Projects/service-name/target</url>
</repository>
</repositories>
</project>
file:///Users/username/Projects/service-name/target is the directory that compiles (mvn package) the service.jar.
It isn't picking it up and I've confirmed it using a decompiler. How do I get maven to use my local jar in the service that I compiled? Or is my <url> directory written out incorrectly?
Also, I've confirmed, via the decompiler, that the service does compile with my changes. It just isn't picked up by my consumer.