低调大师

您现在的位置是: 首页 > Maven setting.xml配置

文章详情

Maven setting.xml配置

低调大师 2017-12-1 19:6 259已围观 收藏 加入我们
Maven setting.xml配置

1.本地仓库地址

    <localRepository>Z:/Maven/MavenRepository</localRepository>

2.私有库认证

    <servers>

        <server>

            <id>nexus-releases</id>

            <username>admin</username>

            <password>xjroot</password>

        </server>

        <server>

            <id>nexus-snapshots</id>

            <username>admin</username>

            <password>xjroot</password>

        </server>

    </servers>

3.私有库地址配置

    <profiles>

        <profile>

            <id>dev</id>

            <activation>

                <activeByDefault>false</activeByDefault>

                <jdk>1.7</jdk>

            </activation>

            <repositories>

                <!-- 私有库地址-->

                <repository>

                    <id>nexus</id>

                    <url>http://192.168.1.50:8081/nexus/content/groups/public/</url>

                    <releases>

                        <enabled>true</enabled>

                    </releases>

                    <snapshots>

                        <enabled>true</enabled>

                    </snapshots>

                </repository>

            </repositories>      

            <pluginRepositories>

            <!--插件库地址-->

            <pluginRepository>

                <id>nexus</id>

                <url>http://192.168.1.50:8081/nexus/content/groups/public/</url>

                <releases>

                    <enabled>true</enabled>

                </releases>

                <snapshots>

                    <enabled>true</enabled>

                </snapshots>

                </pluginRepository>

            </pluginRepositories>

        </profile>

    </profiles>

4.激活profile

    <activeProfiles>

        <activeProfile>dev</activeProfile>

    </activeProfiles>

5.强制指定镜像到指定Maven库

    <mirrors>

        <mirror>

            <id>OSChina</id>

            <name>OSChina</name>

            <url>http://maven.oschina.net/content/groups/public/</url>

            <mirrorOf>*</mirrorOf>

        </mirror>

    </mirrors>


收藏 (0)

如果您喜欢本网站,或者本文章对您有些许帮助,那么可以打赏。

打赏多少您说了算,谢谢您对低调大师的支持!!!

支付宝扫一扫

个人博客,个人博客网站,低调大师,许军

微信扫一扫

个人博客,个人博客网站,低调大师,许军

文章评论

共有0条评论来说两句吧...