I try to encrypt the server password in my settings.xml, and I get this exception when trying to deploy an artifact.
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811) at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676) at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:313) at javax.crypto.Cipher.doFinal(Cipher.java:2087) at org.sonatype.plexus.components.cipher.PBECipher.decrypt64(PBECipher.java:185) ... 18 more
here is an excerpt from xml
<server> <id>server</id> <username>username</username> <password>{N8AF8BmQ5x8HZX/yrlrP1QiKNMEdoXWyBFZd/*zIabY=}</password> </server>
the same exception also occurs for my main password, I just followed the instructions here https://maven.apache.org/guides/mini/guide-encryption.html created the security-settings.xml file, as in the manual, I executed these two commands and copied the encrypted passwords into the corresponding xml files.
mvn --encrypt-master-password <password> mvn --encrypt-password <password>
maven encryption
gary69
source share