1

I am new to maven. The pom file associated with a spring-boot project that I am working on right now looks like below:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>


<groupId>com.my.app</groupId>
<artifactId>myapp</artifactId>
<version>0.0.1-SNAPSHOT</version>

<properties>
    <maven.compiler.target>11</maven.compiler.target>
    <maven.compiler.source>11</maven.compiler.source>
    <java.version>11</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>com.my.app</groupId>
        <artifactId>our-commons</artifactId>
        <version>0.0.3-SNAPSHOT</version>
     </dependency>
        ...
 </dependencies>

Now the problem I am facing is as follows: I have checked in the our-commons package in local and did some changes. Now before pushing the changes, I would like to verify with myapp. But unfortunately, myapp is always pulling our-commons from remote only. So I am unable to verify if my changes are working fine.

In this context, I have gone through the following posts:

  1. How do I force Maven to use my local repository rather than going out to remote repos to retrieve artifacts?
  2. Maven not using local repository

But still, I am clueless regarding how to achieve this.

Could anyone please help here? Thanks.

Joy
  • 4,197
  • 14
  • 61
  • 131

0 Answers0