Uploaded image for project: 'Maven GPG Plugin'
  1. Maven GPG Plugin
  2. MGPG-121

Signing fails with 3.2.2: "/Users/stevenobelia/.settings-security.xml (No such file or directory)"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.2.0, 3.2.1, 3.2.2
    • 3.2.3
    • None
    • os: macOS Sonoma 14.3.1
      jdk: jdk1.8.0_231
      maven: 3.6.0
      maven-gpg-plugin: 3.2.2, 3.2.1,3.2.0 (not work), 3.1.0 (normal)

    Description

      • Expect:
        Even if it is not secure, do not report an error that causes the signature to fail. Or by forcing the use of environment variables to control user behavior.
      • pom.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <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>site.wtfu.framework</groupId>
          <artifactId>idea-debug</artifactId>
          <version>1.0-SNAPSHOT</version>
      
          <properties>
              <maven.compiler.source>1.8</maven.compiler.source>
              <maven.compiler.target>1.8</maven.compiler.target>
              <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
          </properties>
      
          <build>
              <plugins>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-gpg-plugin</artifactId>
                      <version>3.2.2</version>
                      <executions>
                          <execution>
                              <id>sign-artifacts</id>
                              <phase>verify</phase>
                              <goals>
                                  <goal>sign</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
              </plugins>
          </build>
      
      </project>
      • settings.xml
      <?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">
      
          <localRepository>${user.home}/Documents/maven_repo</localRepository>
      
          <pluginGroups>
              <pluginGroup>com.haohuo.framework</pluginGroup>
          </pluginGroups>
      
          <proxies />
      
          <!--
              password encryption: https://maven.apache.org/guides/mini/guide-encryption.html
          -->
          <servers>
              <server>
                  <id>gpg.passphrase</id>
                  <passphrase>{AcPACqkxKm8H9FSK3OnqmM9+a1VQ7po8KQuQ+38pzjY=}</passphrase>
              </server>
          </servers>
      
          <mirrors />
      
          <profiles>
              <profile>
                  <id>father</id>
                  <activation><activeByDefault>true</activeByDefault></activation>
      
                  <properties>
                      <gpg.keyname>48E1F1185160B400</gpg.keyname>
                  </properties>
      
                  <repositories>
                      <repository>
                          <id>ali</id>
                          <name>ali maven lib</name>
                          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
                          <releases><enabled>true</enabled></releases>
                          <snapshots><enabled>false</enabled></snapshots>
                      </repository>
                  </repositories>
      
                  <pluginRepositories>
                      <pluginRepository>
                          <id>other-plugin</id>
                          <name>other-plugin-name</name>
                          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
                          <releases><enabled>true</enabled></releases>
                          <snapshots><enabled>false</enabled></snapshots>
                      </pluginRepository>
                  </pluginRepositories>
              </profile>
          </profiles>
      </settings>
       
      • log:
      /Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/Users/stevenobelia/Documents/project_idea_test/idea-debug -Djansi.passthrough=true -Dmaven.home=/Users/stevenobelia/software/apache-maven-3.6.0 -Dclassworlds.conf=/Users/stevenobelia/software/apache-maven-3.6.0/bin/m2.conf -Dmaven.ext.class.path=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=51353:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Users/stevenobelia/software/apache-maven-3.6.0/boot/plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2023.2.3 verify
      [INFO] Scanning for projects...
      [INFO] 
      [INFO] -------------------< site.wtfu.framework:idea-debug >-------------------
      [INFO] Building idea-debug 1.0-SNAPSHOT
      [INFO] --------------------------------[ jar ]---------------------------------
      [INFO] 
      [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ idea-debug ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 0 resource
      [INFO] 
      [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ idea-debug ---
      [INFO] Nothing to compile - all classes are up to date
      [INFO] 
      [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ idea-debug ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /Users/stevenobelia/Documents/project_idea_test/idea-debug/src/test/resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ idea-debug ---
      [INFO] Nothing to compile - all classes are up to date
      [INFO] 
      [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ idea-debug ---
      [INFO] No tests to run.
      [INFO] 
      [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ idea-debug ---
      [INFO] Building jar: /Users/stevenobelia/Documents/project_idea_test/idea-debug/target/idea-debug-1.0-SNAPSHOT.jar
      [INFO] 
      [INFO] --- maven-gpg-plugin:3.2.2:sign (sign-artifacts) @ idea-debug ---
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  1.500 s
      [INFO] Finished at: 2024-04-02T17:31:19+08:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:3.2.2:sign (sign-artifacts) on project idea-debug: Unable to decrypt gpg passphrase: org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException: java.io.FileNotFoundException: /Users/stevenobelia/.settings-security.xml (No such file or directory) -> [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/MojoFailureExceptionProcess finished with exit code 1
       

       

      Attachments

        Issue Links

          Activity

            People

              cstamas Tamas Cservenak
              eli_w Wang Tangfu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: