I'm trying to generate an offline local maven repository folder for my project, which includes both remote dependencies, and a few dependencies to local projects.
When I run mvn install
in my project, Maven succeeds in resolving both remote and local dependencies. Now, in order to have all dependencies available offline, I want to have a local repository folder in my project. Using the command mvn dependency:go-offline -D"maven.repo.local"="./maven-local"
I try to achieve this. However, Maven manages to place all remote dependencies in the local folder, but not the local dependencies to my local projects (which have been installed already).
The error I get is:
Failed to execute goal on project genericgateway: Could not resolve dependencies for project org.my:ownproject:jar:1.0.1: The following artifacts could not be resolved: org.my:otherproject:jar:1.0.1: Could not find artifact org.my:otherproject:jar:1.0.1 in central (https://repo.maven.apache.org/maven2)
How can I tell Maven to also search in my local ~/.m2
repository for these projects?