私服上传与下载

资源上传与下载

maven|--|settings.xml

<settings>
    <servers>
        <server>
            <id>私服中的服务器id名称</id>
            <username>admin</username>
            <password>admin</password>
        </server>
    </servers>
    <mirrors>
        <!--私服的访问路径-->
        <mirror>
            <id>mirrorId</id>
            <mirrorOf>repositoryId</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://my.repository.com/repo/path</url>
        </mirror>
    </mirrors>
</settings>
<project>
    <!--配置当前工程保存在私服中的具体位置-->
    <distributionManagement>
        <repository>
            <id>repositoryId</id>
            <url>http://localhost:8081/repository/maven-release</url>
        </repository>
        <snapshotRepository>
            <id>repositoryId</id>
            <url>http://localhost:8081/repository/maven-snapshot</url>
        </snapshotRepository>
    </distributionManagement>
</project>