1

Maven dependency created as below:

<dependency>
  <groupId>group_id</groupId>
  <artifactId>artificat_id</artifactId>
  <version>2.5.0</version>
</dependency>

The related jar is stored under the path project_folder_test/modules/api/repo/com/common/2.5.0

After running the command mvn clean compile, getting the below error

Downloading: file:///Users/Automation/project_folder_test/modules/api/repo/com/common/2.5.0/common-2.5.0.pom
Downloading: https://repo.maven.apache.org/maven2/com/common/2.5.0/common-2.5.0.pom
[WARNING] The POM for group_id:artificat_id:jar:2.5.0 is missing, no dependency information available

please let me know, what went wrong in this.

Sarada Akurathi
  • 1,164
  • 7
  • 28
  • 56
  • 2
    Possible duplicate of [How to add local jar files in maven project?](https://stackoverflow.com/questions/4955635/how-to-add-local-jar-files-in-maven-project) – André Stannek Jul 18 '17 at 07:07

1 Answers1

1

Deploy you jar to a location file system :

mvn deploy:deploy-file -Durl=file:///path/to/yourproject/repo/ -Dfile=mylib-1.0.jar -DgroupId=com.example -DartifactId=mylib -Dpackaging=jar -Dversion=1.0

Add a repository section to your pom:

<repositories>
    <repository>
        <id>project.local</id>
        <name>project</name>
        <url>file:${project.basedir}/repo</url>
    </repository>
</repositories>

See https://devcenter.heroku.com/articles/local-maven-dependencies

Essex Boy
  • 7,565
  • 2
  • 21
  • 24