美文网首页
4.maven使用nexus仓库

4.maven使用nexus仓库

作者: NULL_c106 | 来源:发表于2017-04-15 14:09 被阅读0次
image.png

默认账户名:admin
密码:admin123

登录nexus可以发现nexus默认生成了一些仓库,可以直接使用

image.png
大家可以根据官方文档自行修改
https://books.sonatype.com/nexus-book/3.3/reference/maven.html#maven-sect-single-group
我下面提供一个能修改完毕的配置文件
<?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:\Program Files\maven\repository</localRepository>


    <pluginGroups>

    </pluginGroups>


    <proxies>

    </proxies>
    <!--配置nexus仓库认证信息-->
    <servers>
        <server>
            <id>nexus</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
    </servers>
    <mirrors>
        <mirror>
            <id>nexus</id>
            <mirrorOf>*</mirrorOf>
            <url>http://localhost:8081/repository/maven-public/</url>
        </mirror>
    </mirrors>

    <profiles>
        <!--  maven 默认使用的 jdk 版本-->
        <profile>
            <id>nexus</id>
            <!--使用代理中央存储库-->
            <repositories>
                <repository>
                    <id>oss2</id>
                    <url>http://127.0.0.1:8081/repository/maven-public/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>oss2</id>
                    <url>http://127.0.0.1:8081/repository/maven-public/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
            <distributionManagement>
                <repository>
                    <id>nexus</id>
                    <name>Releases</name>
                    <url>http://localhost:8081/repository/maven-releases</url>
                </repository>
                <snapshotRepository>
                    <id>nexus</id>
                    <name>Snapshot</name>
                    <url>http://localhost:8081/repository/maven-snapshots</url>
                </snapshotRepository>
            </distributionManagement>
            <activation>
                <jdk>1.7</jdk>
                <activeByDefault>true</activeByDefault>
            </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>

    <!--激活Nexus仓库配置  -->
    <activeProfiles>
        <activeProfile>nexus</activeProfile>
    </activeProfiles>
</settings>

相关文章

  • maven学习笔记

    1.maven环境配置2.配置maven3.maven私服 nexus3 配置4.maven使用nexus仓库5....

  • 4.maven使用nexus仓库

    默认账户名:admin密码:admin123 登录nexus可以发现nexus默认生成了一些仓库,可以直接使用

  • 使用nexus搭建maven私库

    什么是nexus? nexus是一个maven仓库管理器,使用nexus可以快速便捷的搭建自己的maven私有仓库...

  • nexus的安装

    Nexus介绍 Nexus 是Maven仓库管理器,如果你使用Maven,你可以从Maven中央仓库 下载所需要的...

  • maven

    仓库地址 : 1、http://www.sonatype.org/nexus/ 私服nexus工具使用 2、htt...

  • MAVEN中央仓库地址大全

    Maven 中央仓库地址: 1、私服nexus工具使用 http://www.sonatype.org/nexus...

  • Kubernetes部署Nexus3

    Kubernetes部署Nexus3 重点参考kubernetes集群:nexus搭建docker私有仓库及使用 ...

  • maven中央仓库大全

    Maven 中央仓库地址: 1、私服nexus工具使用 http://www.sonatype.org/nexus...

  • Maven私服Nexus安装与使用

    Nexus介绍 Nexus是Maven仓库管理器,如果你使用Maven,你可以从Maven中央仓库下载所需要的构件...

  • InteliJ上传Java项目到Maven仓库

    前期准备 安装JDK环境。用Nexus新建Release或Snapshot maven仓库。 参考《使用Nexus...

网友评论

      本文标题:4.maven使用nexus仓库

      本文链接:https://www.haomeiwen.com/subject/krbnattx.html