首页 > 解决方案 > Maven nexus-staging-maven-plugin 未正确部署

问题描述

我正在尝试使用 Maven 部署插件进行部署,但部署没有使用正确的工件名称

[信息] 安装 C:\Users\user\git\artifact\artifact\target\myArtifact-0.0.10.15-SNAPSHOT.jar 到 C:\Users\user.m2\repository\com\my\pc\new\version\ artifactId-0.0.10.jar

编译阶段生成工件没有问题,但安装没有使用正确的名称并且还使用另一个 groupid。

上传也是同样的问题,但是没有完成,因为名称没有完成快照。

我的配置是

            <plugin>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>2.8.1</version>
            <executions>
                <execution>
                    <id>default-deploy</id>
                    <phase>deploy</phase>
                    <goals>
                        <goal>deploy</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <artifactId>${project.artifactId}</artifactId>
                <groupId>${project.groupId}</groupId>
                <file>${project.name}-${project.version}.${buildNumber}-SNAPSHOT.jar</file>
                <version>${project.version}.${buildNumber}</version>
                <generatePom>true</generatePom>
                <repositoryId>snapshot</repositoryId>
                <url>http://127.0.0.1:8081/nexus/content/repositories/snapshot/</url>
                <packaging>jar</packaging>
            </configuration>
        </plugin>

标签: javamavendeploymentnexus

解决方案


推荐阅读