linux - Building projects with Maven offline without using M2 repo but using system jars -


I need a project in the open source operating system, using Maven completely offline nix environment To mean under the dependency available in the system i.e. (probably / usr / share / + some other places?). Maven should not have any reliance on the Internet.

Is there any way to achieve this? Creating M2 repos in the system is not a viable solution. The point is that the file system is readable only we can work on a temporary folder (eg / TMP), write with but maintaining a repo at a temporary location is a bad design , Isn't it? By saying this another way, to use the new package, the existing package should be used in the Maven Project system, if available. If the package is not present, then it should be installed separately (through the package manager), and should not copy it in M2 repo.

Is there a known way to do this?

Thanks for the help!

PS: Please note that I am not asking about this option to take it offline!

You can create your own "mirror" repository (mirror of true Maven repository on / Tmp) And Maven can ask to be used instead of a remote repository.

Example:



Comments