java后端集群化专题

持续集成1-maven私服nexus

2018-01-29  本文已影响29人  江江的大猪
application-port=8081 # 默认8081端口
application-host=0.0.0.0 # 默认任意ip都可以访问
nexus-webapp=${bundleBasedir}/nexus # 工程目录是nexus-2.14.5-02-bundle/nexus-2.14.5-02/nexus,基本不改
nexus-webapp-context-path=/nexus # url为ip:port/nexus

# Nexus section
nexus-work=${bundleBasedir}/../sonatype-work/nexus 
runtime=${bundleBasedir}/nexus/WEB-INF

# orientdb buffer size in megabytes
storage.diskCache.bufferSize=4096
    <localRepository>/Users/laifuzhi/.m2/repository</localRepository>
    <servers>
        <server>
            <id>snapshots</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
        <server>
            <id>releases</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
    </servers>

    <profiles>
        <profile>
            <id>MyNexus</id>
            <repositories>
                <repository>
                    <id>MyNexus</id>
                    <url>http://127.0.0.1:8081/nexus/content/groups/public</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>MyNexus</id>
                    <url>http://127.0.0.1:8081/nexus/content/groups/public</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>

    <activeProfiles>
        <activeProfile>MyNexus</activeProfile>
    </activeProfiles>

需要注意的是setting.xml中server里的id,和pom中repository里的id必须一致

<distributionManagement>
    <repository>
        <id>releases</id>
        <name>MyReleases</name>
        <url>http://127.0.0.1:8081/nexus/content/repositories/releases/</url>
    </repository>
    <snapshotRepository>
        <id>snapshots</id>
        <name>MySnapshots</name>
        <url>http://127.0.0.1:8081/nexus/content/repositories/snapshots/</url>
        <uniqueVersion>false</uniqueVersion>
    </snapshotRepository>
</distributionManagement>
肥肥小浣熊
上一篇下一篇

猜你喜欢

热点阅读