内网环境使用idea给springboot项目打包

1.复制现在正在使用的maven仓库

注:最好直接压缩复制到内网电脑,因为有一些插件是需要下载的

2.复制maven的仓库到内网环境 

目录: D:/repository

3.maven仓库配置

1> 设置本地maven仓库地址

  <localRepository>D:/repository</localRepository>

2> 设置本地镜像

<mirror>
            <id>central</id>
            <name>central</name>
            <!-- 将镜像地址设置为本地maven地址 -->
            <url>file://D:/repository</url>
            <mirrorOf>*</mirrorOf>
        </mirror>

4.pom仓库设置

<distributionManagement>
        <!-- Temporary until we have a need to publish to a remote release repository -->
        <snapshotRepository>
            <id>central</id>
            <name>central</name>
            <url>file://D:/repository</url>
        </snapshotRepository>
    </distributionManagement>

猜你喜欢

转载自blog.csdn.net/weixin_40455437/article/details/117198693
今日推荐