[ https://issues.apache.org/jira/browse/MNG-8419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tamas Cservenak reassigned MNG-8419: ------------------------------------ Assignee: Tamas Cservenak > non obvious errors if maven can not decrypt passwords in settings > ----------------------------------------------------------------- > > Key: MNG-8419 > URL: https://issues.apache.org/jira/browse/MNG-8419 > Project: Maven > Issue Type: Improvement > Components: Settings > Affects Versions: 4.0.0-rc-1 > Environment: Java 17 > Windows 11 > Reporter: James Nord > Assignee: Tamas Cservenak > Priority: Major > Fix For: 4.0.0-rc-2 > > Attachments: image-2024-12-10-20-06-32-950.png > > > When I tried out maven 4.0.0-rc1 I was met with an error that led me to > https://issues.apache.org/jira/browse/MNG-8409 > > it was only > https://issues.apache.org/jira/browse/MNG-8409?focusedCommentId=17903737&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17903737 > in that ticket that made me realise that the error was not that I needed all > the secrets to be re-encrypted to be compatable with maven4 but that a single > one one. > This was because the error was all on a single line and not ansi coloured > like the other error. > {noformat} > ❯ mvn clean package -DskipTests > [ERROR] Error executing Maven. > [ERROR] Failed to create plexus container capsule > [ERROR] Caused by: Error building settings: [WARNING] Pre-Maven 4 legacy > encrypted password detected - configure password encryption with the help of > mvnenc to be compatible with Maven 4. @ C:\Users\jnord\.m2\settings.xml, > [ERROR] Could not decrypt password (fix the corrupted password or remove it, > if unused) > {6QN5lqw8socHMECuDj0lTTnj9l7XGMz1S5gahx0ctSot77xLyfYsjNzPbxSTQVpjDoxOoOaxRh5et/X2Uuc0+g==} > @ C:\Users\jnord\.m2\settings.xml, [WARNING] Pre-Maven 4 legacy encrypted > password detected - configure password encryption with the help of mvnenc to > be compatible with Maven 4. @ C:\Users\jnord\.m2\settings.xml, [ERROR] Could > not decrypt password (fix the corrupted password or remove it, if unused) > {7hZ9RhOdcIIHZV03mNaFbRH8dZ6hJpp1bcFX2vLfwikMXhJLlMOBveNwwS203Klq4atWP+fT8KHyHFpfKOZC+g==} > @ C:\Users\jnord\.m2\settings.xml, [WARNING] Pre-Maven 4 legacy encrypted > password detected - configure password encryption with the help of mvnenc to > be compatible with Maven 4. @ C:\Users\jnord\.m2\settings.xml, [ERROR] Could > not decrypt password (fix the corrupted password or remove it, if unused) > {iO83XXZ3Eu8HsksjPlKOmuUEU5ywEY8TcBfFJXCbVnGh/GHH3Z/2PQrzNXFANYdHgXmzE9ki2N8srv8uh9dFdQ==} > @ C:\Users\jnord\.m2\settings.xml, [WARNING] Pre-Maven 4 legacy encrypted > password detected - configure password encryption with the help of mvnenc to > be compatible with Maven 4. @ C:\Users\jnord\.m2\settings.xml, [ERROR] Could > not decrypt password (fix the corrupted password or remove it, if unused) > {zNAj9H1uB0oH4DW8LVEngGmAPNUuDCeStW6NGLUw7HoQeVHQI0pxU1Xfz86QHNUbsD+Ko09FkjLlp0hqmBymFw==} > @ C:\Users\jnord\.m2\settings.xml, [WARNING] Pre-Maven 4 legacy encrypted > password detected - configure password encryption with the help of mvnenc to > be compatible with Maven 4. @ C:\Users\jnord\.m2\settings.xml, [ERROR] Could > not decrypt password (fix the corrupted password or remove it, if unused) > {R1EqLkQkZ2oHXHBe84BqBL8fF0vaxPpqaR03oRTxIuI=} @ > C:\Users\jnord\.m2\settings.xml > {noformat} > *Note* there are only 3 errors logs output in the above. The third error > "[ERROR] Caused by: Error building settings" is a long line that has some > plain text output. > h3. > Steps to reproduce > * Setup a settings and security-settings file in maven3 that uses 50 servers > and encyrpted passwords > * change *one* of the passwords so it is not valid > * using maven 3 build a project (mvn test) > * switch to maven 4 and attempt to build the project > > h3. Expected Results > * project is built > or > * Error message is highlighted correctly and obvious to users > * It is obvious from the log which password is causing the issue > h3. Actual results > * The validation of the settings is punted into one big line making it hard > to find the error > * The error is non obvious > !image-2024-12-10-20-06-32-950.png! > h3. > -- This message was sent by Atlassian Jira (v8.20.10#820010)