Maven offline - problem with mvn-plugins

前端 未结 6 1882
滥情空心
滥情空心 2021-01-12 06:49

I\'m using maven in my project and I need to run the build in a non-internet-access machine.

When I test my project build everything is working, bu

6条回答
  •  清酒与你
    2021-01-12 07:33

    It should suffice to run a mvn clean install on your code. The next time, when you run it in an offline mode you can use the following options:

    mvn -Dmaven.repo.local=..\repository –o clean install
    

    -o tells Maven not to try to update its dependencies over the network and with -Dmaven.repo.local you provide the path of the repository which contains all the required dependencies. Alternatively, you can add the path of the repository in your settings.xml in the localRepository tag and add an true. You can configure the same in your Maven Eclipse configurations.

提交回复
热议问题