1

Windows Tomcat に Nexus 2.7.1 をインストールし、稼働させました。「maven deploy」コマンドを使用して SNAPSHOT jar を Nexus スナップショット リポジトリにデプロイしようとしていますが、次のエラーが発生します。Maven バージョン 3.0.5 を使用。ガイドしてください。

[エラー] プロジェクト release-plugin-rnd で目標 org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) を実行できませんでした: アーティファクトをデプロイできませんでした: アーティファクト com.s tudy を転送できませんでした:release-plugin-rnd:jar:1.3-20140218.193240-1 スナップショットから/へ ( http://my-nexus-server.com:9090/nexus/content/repositories/snapshots ): ファイルの転送に失敗しました: http:/ /my-nexus-server.com:9090/nexus/content/repos itories /snapshots/com/study/release-plugin-rnd/1.3-SNAPSHOT/release-plugin-rnd-1.3-20140218.193240-1.jar. *リターン コード: 401、ReasonPhrase: Unauthorized。-> [ヘルプ 1] *

私のsettings.xmlとpom.xmlは以下に記載されています。

settings.xml

<settings>
    <mirrors>
        <mirror>
            <id>Nexus</id>
            <name>Nexus Public Mirror</name>
            <url>http://localhost:9090/nexus/content/groups/public</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
    </mirrors>
    <servers>
        <server>
            <id>nexus-server</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
    </servers>
</settings>

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.study</groupId>
    <artifactId>release-plugin-rnd</artifactId>
    <version>1.3-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>release-plugin-rnd</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <scm>
        <connection>scm:svn:https://my-svn-server/svn/maven-rnd/release-plugin-rnd/trunk</connection>
        <developerConnection>scm:svn:https://my-svn-server/svn/maven-rnd/release-plugin-rnd/trunk</developerConnection>
        <url>https://my-svn-server/svn/maven-rnd/release-plugin-rnd/trunk</url>
    </scm> 

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <tagBase>https://my-svn-server/svn/maven-rnd/release-plugin-rnd/tags</tagBase>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.7</version>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <snapshotRepository>
            <id>snapshots</id>
            <name>Internal Snapshots</name>
            <url>http://my-nexus-server:9090/nexus/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>releases</id>
            <name>Internal Releases</name>
            <url>http://my-nexus-server:9090/nexus/content/repositories/releases</url>
        </repository>
    </distributionManagement>

</project>
4

1 に答える 1