Details
-
Type:
Task
-
Status: Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Labels:
Description
I've successfully deployed a SNAPSHOT version at:
https://oss.sonatype.org/content/repositories/snapshots/com/github/dearaison/unique-file-name-generator/1.0.0-SNAPSHOT/
using this command:
mvn clean deploy
But when I try deploying a release version by using this command:
mvn clean deploy -P release
I got this Error message from Maven:
"C:\Program Files\Java\jdk-14.0.1\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\IdeaProjects\unique-file-name-generator "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2019.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2019.2\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2019.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2019.2\lib\idea_rt.jar=57159:C:\Program Files\JetBrains\IntelliJ IDEA 2019.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2019.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.2\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version2020.1.1 clean deploy -P release [INFO] Scanning for projects... [INFO] Inspecting build with total of 1 modules... [INFO] Installing Nexus Staging features: [INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin [INFO] [INFO] ----------< com.github.dearaison:unique-file-name-generator >----------- [INFO] Building Unique File Name Generator 1.0.0 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ unique-file-name-generator --- [INFO] Deleting D:\IdeaProjects\unique-file-name-generator\target [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-maven) @ unique-file-name-generator --- [INFO] [INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (default) @ unique-file-name-generator --- [INFO] argLine set to -javaagent:C:\\Users\\baotr\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.5\\org.jacoco.agent-0.8.5-runtime.jar=destfile=D:\\IdeaProjects\\unique-file-name-generator\\target\\jacoco.exec [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ unique-file-name-generator --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ unique-file-name-generator --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to D:\IdeaProjects\unique-file-name-generator\target\classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ unique-file-name-generator --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory D:\IdeaProjects\unique-file-name-generator\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ unique-file-name-generator --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to D:\IdeaProjects\unique-file-name-generator\target\test-classes [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ unique-file-name-generator --- [INFO] Surefire report directory: D:\IdeaProjects\unique-file-name-generator\target\surefire-reports------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.github.dearaison.filenamegenerator.FileNameGeneratorTest Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.256 secResults :Tests run: 9, Failures: 0, Errors: 0, Skipped: 0[INFO] [INFO] --- jacoco-maven-plugin:0.8.5:report (report) @ unique-file-name-generator --- [INFO] Loading execution data file D:\IdeaProjects\unique-file-name-generator\target\jacoco.exec [INFO] Analyzed bundle 'Unique File Name Generator' with 1 classes [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ unique-file-name-generator --- [INFO] Building jar: D:\IdeaProjects\unique-file-name-generator\target\unique-file-name-generator-1.0.0.jar [INFO] [INFO] --- maven-source-plugin:3.2.1:jar-no-fork (attach-sources) @ unique-file-name-generator --- [INFO] Building jar: D:\IdeaProjects\unique-file-name-generator\target\unique-file-name-generator-1.0.0-sources.jar [INFO] [INFO] --- maven-javadoc-plugin:3.2.0:jar (attach-javadocs) @ unique-file-name-generator --- [ERROR] Error fetching link: D:\IdeaProjects\unique-file-name-generator\target\javadoc-bundle-options. Ignored it. [INFO] No previous run data found, generating javadoc. [INFO] Loading source files for package com.github.dearaison.filenamegenerator... Constructing Javadoc information... Standard Doclet version 14.0.1 Building tree for all the packages and classes... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\com\github\dearaison\filenamegenerator\FileNameGenerator.html... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\com\github\dearaison\filenamegenerator\package-summary.html... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\com\github\dearaison\filenamegenerator\package-tree.html... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\constant-values.html... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\com\github\dearaison\filenamegenerator\class-use\FileNameGenerator.html... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\com\github\dearaison\filenamegenerator\package-use.html... Building index for all the packages and classes... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\overview-tree.html... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\deprecated-list.html... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\index-all.html... Building index for all classes... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\allclasses-index.html... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\allpackages-index.html... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\system-properties.html... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\index.html... Generating D:\IdeaProjects\unique-file-name-generator\target\apidocs\help-doc.html... [INFO] Building jar: D:\IdeaProjects\unique-file-name-generator\target\unique-file-name-generator-1.0.0-javadoc.jar [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ unique-file-name-generator --- [INFO] Installing D:\IdeaProjects\unique-file-name-generator\target\unique-file-name-generator-1.0.0.jar to C:\Users\baotr\.m2\repository\com\github\dearaison\unique-file-name-generator\1.0.0\unique-file-name-generator-1.0.0.jar [INFO] Installing D:\IdeaProjects\unique-file-name-generator\pom.xml to C:\Users\baotr\.m2\repository\com\github\dearaison\unique-file-name-generator\1.0.0\unique-file-name-generator-1.0.0.pom [INFO] Installing D:\IdeaProjects\unique-file-name-generator\target\unique-file-name-generator-1.0.0-sources.jar to C:\Users\baotr\.m2\repository\com\github\dearaison\unique-file-name-generator\1.0.0\unique-file-name-generator-1.0.0-sources.jar [INFO] Installing D:\IdeaProjects\unique-file-name-generator\target\unique-file-name-generator-1.0.0-javadoc.jar to C:\Users\baotr\.m2\repository\com\github\dearaison\unique-file-name-generator\1.0.0\unique-file-name-generator-1.0.0-javadoc.jar [INFO] [INFO] --- nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) @ unique-file-name-generator --- [INFO] Performing local staging (local stagingDirectory="D:\IdeaProjects\unique-file-name-generator\target\nexus-staging\staging")... [INFO] + Using server credentials "ossrh" from Maven settings. WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/C:/Users/baotr/.m2/repository/com/thoughtworks/xstream/xstream/1.4.7/xstream-1.4.7.jar) to field java.util.TreeMap.comparator WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] * Connected to Nexus at https://oss.sonatype.org:443/, is version 2.14.18-01 and edition "Professional" [INFO] * Using staging profile ID "2eca0c6dc5fe9" (matched by Nexus). [INFO] Installing D:\IdeaProjects\unique-file-name-generator\target\unique-file-name-generator-1.0.0.jar to D:\IdeaProjects\unique-file-name-generator\target\nexus-staging\staging\2eca0c6dc5fe9\com\github\dearaison\unique-file-name-generator\1.0.0\unique-file-name-generator-1.0.0.jar [INFO] Installing D:\IdeaProjects\unique-file-name-generator\pom.xml to D:\IdeaProjects\unique-file-name-generator\target\nexus-staging\staging\2eca0c6dc5fe9\com\github\dearaison\unique-file-name-generator\1.0.0\unique-file-name-generator-1.0.0.pom [INFO] Installing D:\IdeaProjects\unique-file-name-generator\target\unique-file-name-generator-1.0.0-sources.jar to D:\IdeaProjects\unique-file-name-generator\target\nexus-staging\staging\2eca0c6dc5fe9\com\github\dearaison\unique-file-name-generator\1.0.0\unique-file-name-generator-1.0.0-sources.jar [INFO] Installing D:\IdeaProjects\unique-file-name-generator\target\unique-file-name-generator-1.0.0-javadoc.jar to D:\IdeaProjects\unique-file-name-generator\target\nexus-staging\staging\2eca0c6dc5fe9\com\github\dearaison\unique-file-name-generator\1.0.0\unique-file-name-generator-1.0.0-javadoc.jar [INFO] Performing remote staging... [INFO] [INFO] * Remote staging into staging profile ID "2eca0c6dc5fe9" [INFO] * Created staging repository with ID "comgithubdearaison-1005". [INFO] * Staging repository at https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubdearaison-1005 [INFO] * Uploading locally staged artifacts to profile com.github.dearaison Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubdearaison-1005/com/github/dearaison/unique-file-name-generator/1.0.0/unique-file-name-generator-1.0.0-sources.jar Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubdearaison-1005/com/github/dearaison/unique-file-name-generator/1.0.0/unique-file-name-generator-1.0.0-sources.jar (4.4 kB at 417 B/s) Downloading from ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubdearaison-1005/com/github/dearaison/unique-file-name-generator/maven-metadata.xml Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubdearaison-1005/com/github/dearaison/unique-file-name-generator/maven-metadata.xml Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubdearaison-1005/com/github/dearaison/unique-file-name-generator/maven-metadata.xml (326 B at 147 B/s) Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubdearaison-1005/com/github/dearaison/unique-file-name-generator/1.0.0/unique-file-name-generator-1.0.0.jar Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubdearaison-1005/com/github/dearaison/unique-file-name-generator/1.0.0/unique-file-name-generator-1.0.0.jar (4.9 kB at 3.3 kB/s) Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubdearaison-1005/com/github/dearaison/unique-file-name-generator/1.0.0/unique-file-name-generator-1.0.0.pom Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubdearaison-1005/com/github/dearaison/unique-file-name-generator/1.0.0/unique-file-name-generator-1.0.0.pom (7.4 kB at 5.0 kB/s) Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubdearaison-1005/com/github/dearaison/unique-file-name-generator/1.0.0/unique-file-name-generator-1.0.0-javadoc.jar Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubdearaison-1005/com/github/dearaison/unique-file-name-generator/1.0.0/unique-file-name-generator-1.0.0-javadoc.jar (396 kB at 54 kB/s) [INFO] * Upload of locally staged artifacts finished. [INFO] * Closing staging repository with ID "comgithubdearaison-1005".Waiting for operation to complete... ............[ERROR] Rule failure while trying to close staging repository with ID "comgithubdearaison-1005". [ERROR] [ERROR] Nexus Staging Rules Failure Report [ERROR] ================================== [ERROR] [ERROR] Repository "comgithubdearaison-1005" failures [ERROR] Rule "signature-staging" failures [ERROR] * Missing Signature: '/com/github/dearaison/unique-file-name-generator/1.0.0/unique-file-name-generator-1.0.0.jar.asc' does not exist for 'unique-file-name-generator-1.0.0.jar'. [ERROR] * Missing Signature: '/com/github/dearaison/unique-file-name-generator/1.0.0/unique-file-name-generator-1.0.0-javadoc.jar.asc' does not exist for 'unique-file-name-generator-1.0.0-javadoc.jar'. [ERROR] * Missing Signature: '/com/github/dearaison/unique-file-name-generator/1.0.0/unique-file-name-generator-1.0.0-sources.jar.asc' does not exist for 'unique-file-name-generator-1.0.0-sources.jar'. [ERROR] * Missing Signature: '/com/github/dearaison/unique-file-name-generator/1.0.0/unique-file-name-generator-1.0.0.pom.asc' does not exist for 'unique-file-name-generator-1.0.0.pom'. [ERROR] [ERROR] [ERROR] Cleaning up local stage directory after a Rule failure during close of staging repositories: [comgithubdearaison-1005] [ERROR] * Deleting context 2eca0c6dc5fe9.properties [ERROR] Cleaning up remote stage repositories after a Rule failure during close of staging repositories: [comgithubdearaison-1005] [ERROR] * Dropping failed staging repository with ID "comgithubdearaison-1005" (Rule failure during close of staging repositories: [comgithubdearaison-1005]).Waiting for operation to complete... .....[ERROR] Remote staging finished with a failure: Staging rules failure! [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 02:48 min [INFO] Finished at: 2020-05-29T00:37:05+07:00 [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "release" could not be activated because it does not exist. [ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project unique-file-name-generator: Remote staging failed: Staging rules failure! -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
This is my POM:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" 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.github.dearaison</groupId> <artifactId>unique-file-name-generator</artifactId> <version>1.0.0</version> <packaging>jar</packaging> <name>Unique File Name Generator</name> <description>A simple library to generate a unique file name when saving a file in Java.</description> <url>https://github.com/DEARaison/unique-file-name-generator</url> <licenses> <license> <name>GNU General Public License, Version 3.0</name> <url>https://www.gnu.org/licenses/gpl-3.0.txt</url> </license> </licenses> <developers> <developer> <name>DEA Raison</name> <email>mrbaotruongit@gmail.com</email> <organization>com.github.dearaison</organization> <organizationUrl>https://github.com/DEARaison</organizationUrl> </developer> </developers> <scm> <connection>scm:git:git://github.com/DEARaison/unique-file-name-generator.git</connection> <developerConnection>scm:git:ssh://github.com:DEARaison/unique-file-name-generator.git</developerConnection> <url>http://github.com/DEARaison/unique-file-name-generator/tree/master</url> </scm> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>14</maven.compiler.source> <maven.compiler.target>14</maven.compiler.target> </properties> <dependencies> <!-- https://mvnrepository.com/artifact/junit/junit --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.13</version> <scope>test</scope> </dependency> </dependencies> <build> <sourceDirectory>src/main/java</sourceDirectory> <resources> <resource> <directory>src/main/resources</directory> </resource> </resources> <testSourceDirectory>src/test/java</testSourceDirectory> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>3.2.1</version> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>3.2.0</version> <executions> <execution> <id>attach-javadocs</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>3.0.0-M3</version> <executions> <execution> <id>enforce-maven</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireMavenVersion> <version>3.6.1</version> </requireMavenVersion> </rules> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>versions-maven-plugin</artifactId> <version>2.7</version> </plugin> <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.8.5</version> <executions> <execution> <goals> <goal>prepare-agent</goal> </goals> </execution> <execution> <id>report</id> <phase>test</phase> <goals> <goal>report</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.sonatype.plugins</groupId> <artifactId>nexus-staging-maven-plugin</artifactId> <version>1.6.8</version> <extensions>true</extensions> <configuration> <serverId>ossrh</serverId> <nexusUrl>https://oss.sonatype.org/</nexusUrl> <autoReleaseAfterClose>true</autoReleaseAfterClose> </configuration> </plugin> </plugins> </build> <distributionManagement> <snapshotRepository> <id>ossrh</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> </snapshotRepository> <repository> <id>ossrh</id> <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> </repository> </distributionManagement> <profiles> <!-- GPG Signature on release --> <profile> <id>release-sign-artifacts</id> <activation> <property> <name>performRelease</name> <value>true</value> </property> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-gpg-plugin</artifactId> <version>1.6</version> <executions> <execution> <id>sign-artifacts</id> <phase>verify</phase> <goals> <goal>sign</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> </project>
Please help me with this. I'm so new to deploying a project to Maven Central.