[ https://issues.apache.org/jira/browse/MNG-8425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17904907#comment-17904907 ]
Tamas Cservenak commented on MNG-8425: -------------------------------------- Yes, sadly mvnenc is not 100% done. It needs editing (the generated XML), as the env variable name, system property name, or pinentry executable or gpg-agent pipe path is not (yet) discovered and/or added. Also, rc1 had quite some issues already fixed on master (see rc-2 issues related to mvnenc). > creating maven encryption settings creates invalid settings > ----------------------------------------------------------- > > Key: MNG-8425 > URL: https://issues.apache.org/jira/browse/MNG-8425 > Project: Maven > Issue Type: Bug > Affects Versions: 4.0.0-rc-1 > Environment: Apache Maven 4.0.0-rc-1 > (d81b1b6a2870dc954d6d642500ad38e8e4cb3dde) > Maven home: C:\Java\maven-4.0.0-rc-1 > Java version: 17.0.9, vendor: Eclipse Adoptium, runtime: > c:\java\jdk-17.0.9.9-hotspot > Default locale: en_GB, platform encoding: Cp1252 > OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows" > Reporter: James Nord > Priority: Major > > I ran through the wizard to create a new maven4 encryption setup and then > tried to encrypt a password. > the password encryption failed telling me > "Maven Encryption is not configured, run `mvnenc init` first." > > h3. Steps to reproduce > Create a maven 4 encryption context to use an environment variable: > * Start the Maven 4 encryption wizard to setup encryption ({{{}mvn --force > --enc init{}}}) > * Choose "Master Password Dispatcher" > * Choose "Environment variable (variable name should be edited)" > * Choose "AES/GCM/NoPadding" > * when promped for the variable enter "{{{}MVN_PASSWORD{}}}" > * check the proposed values look correct and approve with "Y" > * wait for the file to be written > Set the variable for maven to use > * {{SET MVN_PASSWORD=TESTING_PASSWORD}} (or use export on *nix like system) > Attempt to create an encrypted password > * {{ mvn --enc encrypt}} > h3. Expected results > * there is a prompt for the password that is to be encrytped > * an encrypted password is output > h3. Actual results > The command tells you encryption is not configured. > > {code:java} > mvn --enc encrypt > Configuration validation of MavenSecDispatcher: INVALID > Configuration file present on path C:\Users\jnord\.m2\settings-security4.xml > Default dispatcher configured > Legacy dispatcher present in system > Legacy dispatcher is operational; transparent fallback possible > Configured default dispatcher configuration is invalid > Configuration validation of MasterDispatcher: INVALID > Configured Cipher supported > Configured Source configuration not handled > Configuration validation of LegacyDispatcher: VALID > Legacy configuration found with encrypted master password > Legacy master password successfully decrypted > Maven Encryption is not configured, run `mvnenc init` first. {code} > > -- This message was sent by Atlassian Jira (v8.20.10#820010)