您的位置:首页 > 编程语言 > Java开发

配置私服

2016-04-02 17:07 411 查看
1.先下载私服

windows-x86-32这里是因为我的jdk是32位的,所以我选择的是32位的

D:\nexus-2.11.0-02\bin\jsw\windows-x86-32打击install-nexus.bat

2.打开私服

D:\nexus-2.11.0-02\bin\jsw\windows-x86-32点击start-nexus.bat

如果上面两个没有访问权限,就用管理员的方式打开

3.配置私服

<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
 

     <localRepository>D:/MavenRepository</localRepository>

    <pluginGroups>

    </pluginGroups>

    <proxies>

    </proxies>

    <!-- 配 上传的账号和密码 -->

    <servers>

        <server>

            <id>nexus-releases</id>

            <username>admin</username>

            <password>admin123</password>

        </server>

        <server>

            <id>nexus-snapshots</id>

            <username>admin</username>

            <password>admin123</password>

        </server>

    </servers>

    <!-- 配私服镜像 , 使用所有要下载的包也通过私服下载-->

    <mirrors>

        <mirror>

            <id>nexus</id>

            <mirrorOf>*</mirrorOf>

            <!-- <url>http://218.196.14.220:8081/nexus/content/groups/public</url> -->

            <!-- <url>http://localhost:8081/nexus/content/groups/public</url>

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

            <url>http://218.196.14.220:8081/nexus/content/groups/public/</url>-->

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

        </mirror>

    </mirrors>

    <profiles>

        <profile>

            <id>central</id>

            <repositories>

                <repository>

                    <id>central</id>

                    <url>http://central</url>

                    <releases>

                        <enabled>true</enabled>

                    </releases>

                    <snapshots>

                        <enabled>true</enabled>

                    </snapshots>

                </repository>

            </repositories>

            <pluginRepositories>

                <pluginRepository>

                    <id>central</id>

                    <url>http://central</url>

                    <releases>

                        <enabled>true</enabled>

                    </releases>

                    <snapshots>

                        <enabled>true</enabled>

                    </snapshots>

                </pluginRepository>

            </pluginRepositories>

        </profile>

        <profile>

            <id>jdk1.7</id>

            <activation>

                <activeByDefault>true</activeByDefault>

                <jdk>1.7</jdk>

            </activation>

            <properties>

                <maven.compiler.source>1.7</maven.compiler.source>

                <maven.compiler.target>1.7</maven.compiler.target>

                <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>

            </properties>

        </profile>

    </profiles>

    <activeProfiles>

        <activeProfile>central</activeProfile>

    </activeProfiles>

</settings>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  32位 jdk maven nexus 管理