Yash
Yash

Reputation: 199

Required Encryption configuration property missing: jasypt.encryptor.password

Hi I'm trying to generate Jar file for my project, I'm using Jasypt to encrypt my jwtsecret. But whenever I try to do clean package in eclipse as goals to generate my jar file, I get this error Caused by: java.lang.IllegalStateException: Required Encryption configuration property missing: jasypt.encryptor.password.

This is the command that I have tried-

 mvn clean install -U dependency:copy-dependencies -Darguments="-Djasypt.encryptor.password=${tokensecretkey}"

Along with some other ones that I was using to do trial and hit. Can anyone help me here?

Upvotes: 1

Views: 4763

Answers (1)

Yash
Yash

Reputation: 199

The following command generates the Jar file when using Jasypt:

mvn -B clean package -Djasypt.encryptor.password=<secret key>

and then below command can be used to run the generated Jar file:

java -jar -Djasypt.encryptor.password=<secret key> Your_jar_file.jar

Upvotes: 1

Related Questions