Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
nexus staging maven插件仅上载显式设置为不上载的工件_Maven_Sonatype_Maven Deploy Plugin - Fatal编程技术网

nexus staging maven插件仅上载显式设置为不上载的工件

nexus staging maven插件仅上载显式设置为不上载的工件,maven,sonatype,maven-deploy-plugin,Maven,Sonatype,Maven Deploy Plugin,我正在将我的项目部署到maven central,但遇到了nexus staging maven插件的这种奇怪行为 这是我的项目结构: spookystuff (want to release pom) |-spookystuff-core (want to release jar) |-spookystuff-example(DON'T want to release) |-spookystuff-integration(DON'T want to release) \-spookystuff

我正在将我的项目部署到maven central,但遇到了nexus staging maven插件的这种奇怪行为

这是我的项目结构:

spookystuff (want to release pom)
|-spookystuff-core (want to release jar)
|-spookystuff-example(DON'T want to release)
|-spookystuff-integration(DON'T want to release)
\-spookystuff-assembly(DON'T want to release)
为了实现这一点,我在父maven pom中设置了nexus staging maven插件:

        <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.6</version>
            <extensions>true</extensions>
            <configuration>
                <serverId>ossrh</serverId>
                <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
        </plugin>
我遇到了这种非常奇怪的行为,插件几乎完全颠倒了我的意图:它拒绝上传应该上传的内容,上传不应该上传的内容:

Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.jar
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.jar (12 KB at 31.1 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.pom
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.pom (5 KB at 22.1 KB/sec)
Downloading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/maven-metadata.xml
Downloaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/maven-metadata.xml (361 B at 2.6 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/maven-metadata.xml
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/maven-metadata.xml (361 B at 1.9 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.jar
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.jar (2 KB at 4.3 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.pom
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.pom (2 KB at 8.0 KB/sec)
Downloading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/maven-metadata.xml
Downloaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/maven-metadata.xml (364 B at 2.8 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/maven-metadata.xml
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/maven-metadata.xml (364 B at 1.6 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.jar
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.jar (259 KB at 474.5 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.pom
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.pom (5 KB at 24.1 KB/sec)
Downloading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/maven-metadata.xml
Downloaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/maven-metadata.xml (360 B at 2.9 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/maven-metadata.xml
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/maven-metadata.xml (360 B at 1.9 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.pom.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.pom.asc (473 B at 7.6 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1-javadoc.jar
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1-javadoc.jar (373 KB at 459.8 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.jar.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.jar.asc (473 B at 3.6 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.jar.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.jar.asc (473 B at 3.6 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.jar.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.jar.asc (473 B at 1.3 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1-javadoc.jar
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1-javadoc.jar (477 KB at 645.3 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.pom.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.pom.asc (473 B at 6.2 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.pom.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.pom.asc (473 B at 6.5 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1-javadoc.jar.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1-javadoc.jar.asc (473 B at 7.3 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1-javadoc.jar.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1-javadoc.jar.asc (473 B at 7.2 KB/sec)
[INFO]  * Bulk deploy of locally gathered snapshot artifacts finished.
为了让事情变得更可怕,我检查了sonatype nexus作为maven中央存储库浏览器,但找不到任何这些文件!唯一遗留下来的工件是我2天前上传的一个旧版本


有人能解释为什么我连续遇到3个奇怪的行为吗?

一个迟来的回复,但我想我会回答,因为这是我遇到类似问题时发现的第一篇帖子。我从一篇评论中得到了答案

我认为这个问题与我有关。您可以通过确保父pom配置中列出的最后一个模块是您确实希望发布的模块来解决此问题

不管怎么说,这也解决了一个非常类似的问题

mvn clean deploy -DskipTests=true -Dgpg.passphrase=******
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.jar
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.jar (12 KB at 31.1 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.pom
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.pom (5 KB at 22.1 KB/sec)
Downloading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/maven-metadata.xml
Downloaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/maven-metadata.xml (361 B at 2.6 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/maven-metadata.xml
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/maven-metadata.xml (361 B at 1.9 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.jar
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.jar (2 KB at 4.3 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.pom
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.pom (2 KB at 8.0 KB/sec)
Downloading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/maven-metadata.xml
Downloaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/maven-metadata.xml (364 B at 2.8 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/maven-metadata.xml
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/maven-metadata.xml (364 B at 1.6 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.jar
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.jar (259 KB at 474.5 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.pom
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.pom (5 KB at 24.1 KB/sec)
Downloading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/maven-metadata.xml
Downloaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/maven-metadata.xml (360 B at 2.9 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/maven-metadata.xml
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/maven-metadata.xml (360 B at 1.9 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.pom.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.pom.asc (473 B at 7.6 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1-javadoc.jar
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1-javadoc.jar (373 KB at 459.8 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.jar.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-integration/0.3.1.1/spookystuff-integration-0.3.1.1.jar.asc (473 B at 3.6 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.jar.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.jar.asc (473 B at 3.6 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.jar.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.jar.asc (473 B at 1.3 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1-javadoc.jar
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1-javadoc.jar (477 KB at 645.3 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.pom.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1.pom.asc (473 B at 6.2 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.pom.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1.pom.asc (473 B at 6.5 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1-javadoc.jar.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-example/0.3.1.1/spookystuff-example-0.3.1.1-javadoc.jar.asc (473 B at 7.3 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1-javadoc.jar.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/tribbloids/spookystuff/spookystuff-assembly/0.3.1.1/spookystuff-assembly-0.3.1.1-javadoc.jar.asc (473 B at 7.2 KB/sec)
[INFO]  * Bulk deploy of locally gathered snapshot artifacts finished.