You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamas Cservenak (Jira)" <ji...@apache.org> on 2024/04/02 13:46:00 UTC

[jira] [Closed] (MGPG-121) Signing fails with 3.2.2: "/Users/stevenobelia/.settings-security.xml (No such file or directory)"

     [ https://issues.apache.org/jira/browse/MGPG-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tamas Cservenak closed MGPG-121.
--------------------------------
    Resolution: Fixed

> Signing fails with 3.2.2: "/Users/stevenobelia/.settings-security.xml (No such file or directory)"
> --------------------------------------------------------------------------------------------------
>
>                 Key: MGPG-121
>                 URL: https://issues.apache.org/jira/browse/MGPG-121
>             Project: Maven GPG Plugin
>          Issue Type: Bug
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2
>         Environment: 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)
>            Reporter: Wang Tangfu
>            Priority: Minor
>             Fix For: 3.2.3
>
>
> * Desc:
> According to *maven-gpg-plugin*  ([Docs|
> [https://maven.apache.org/plugins/maven-gpg-plugin/usage.html#configure-passphrase-in-settings-xml]]) configuration of the current project using GPG signatures.
> The <server> encrypted passphrase configured in settings.xml is used. When decrypting, the master password file 'settings-security.xml' is found to be wrong, causing the signature to fail.
>  * Possible cause:
> After 3.1.0 version due to remove '{*}/META-INF/plexus/components.xml{*}', cause 'DefaultSecDispatcher' use the default values [~/.settings-security.xml], rather than [~/.m2/settings-security.xml]。
>  * 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
> {code:java}
> <?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>{code}
>  * settings.xml
> {code:java}
> <?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>
>  {code}
>  * log:
> {code:java}
> /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
>  {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)