如何分区Nexus存储库?

时间:2015-10-07 07:20:58

标签: nexus partition

如上所述here我创建了具有足够权限的用户来下载/上传工件,但他们也需要只读访问另一个分区。所以我遵循了相同的程序,只是将第三个分区添加(读取)到用户的角色。但是,当maven尝试从第三个分区下载工件时,在构建期间获得了未授权错误。

有什么建议吗?

<?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">

    <servers>
        <server>
            <id>local-release-repo</id>
            <username>team1</username>
            <password>pass1</password>
        </server>
        <server>
            <id>local-snapshot-repo</id>
            <username>team1</username>
            <password>pass1</password>
        </server>
    </servers>

    <profiles>
        <profile>
            <id>local-repos</id>
                <properties>
                    <deployment.releaseRepo.name>Release Repository</deployment.releaseRepo.name>
                    <deployment.releaseRepo.url>http://192.168.33.10:9090/nexus/content/repositories/releases/</deployment.releaseRepo.url>

                    <deployment.snapshotRepo.name>Snapshot Repository</deployment.snapshotRepo.name>
                    <deployment.snapshotRepo.url>http://192.168.33.10:9090/nexus/content/repositories/snapshots</deployment.snapshotRepo.url>
                </properties>

                <repositories>
                    <repository>
                        <id>local-release-repo</id>
                        <url>http://192.168.33.10:9090/nexus/content/repositories/releases/</url>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                    </repository>
                    <repository>
                        <id>local-snapshot-repo</id>
                        <url>http://192.168.33.10:9090/nexus/content/repositories/snapshots</url>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                        <releases>
                            <enabled>false</enabled>
                        </releases>
                    </repository>
                </repositories>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>local-repos</activeProfile>
    </activeProfiles>
</settings>

0 个答案:

没有答案