I am trying to setup my maven project on my linux Virtual Machine to run on Intellij IDEA. The VM has certain restrictions and runs on VPN and therefore, the maven central repository is blocked. The project runs fine on my local so what I did, since VPN blocks maven central, I copied the entire m2 folder from my local and put it on the virtual machine. The plugins, jars and dependencies are correctly displayed in m2 folder now. When I try to run the maven clean command "mvn clean install -o" for maven to clean install in offline mode, I get the below error -
BUILD FAILURE
[ERROR] Plugin .apache.maven.plugins:maven-clean-plugin:3.2.0 or one of its dependencies could not be resolved:
[ERROR] Cannot access central() in offline mode and the artifact .apache.maven.plugins:maven-clean-plugin:jar:3.2.0 has not been downloaded from it before. The following artifacts could not be resolved: .apache.maven.plugins:maven-clean-plugin:jar:3.2.0 (absent): Cannot access central () in offline mode and the artifact .apache.maven.plugins:maven-clean-plugin:jar:3.2.0 has not been downloaded from it before.
[ERROR] -> [Help 1] .apache.maven.plugin. Plugin Resolution Exception: Plugin .apache.maven.plugins:maven-clean-plugin:3.2.0 or one of its dependencies could not be resolved: Cannot access central () in offline mode and the artifact .apache.maven.plugins:maven-clean-plugin:jar:3.2.0 has not been downloaded from it before.
I know how maven works but I have never done all this work manually for setting up m2 folder. Any help would be appreciated. Thanks!