ulisesbocchio / jasypt-spring-boot

Jasypt integration for Spring boot
MIT License
2.91k stars 522 forks source link

No jasypt.plugin.value property provided #192

Closed cash1981 closed 4 years ago

cash1981 commented 4 years ago

I tried the plugin but get this error.

Added :

 <dependency>
            <groupId>com.github.ulisesbocchio</groupId>
            <artifactId>jasypt-spring-boot-starter</artifactId>
            <version>3.0.2</version>
        </dependency>

And the plugin

<plugin>
                <groupId>com.github.ulisesbocchio</groupId>
                <artifactId>jasypt-maven-plugin</artifactId>
                <version>3.0.2</version>
            </plugin>

Then run the command mvn jasypt:encrypt-value -Djasypt.encryptor.password="the password" -Djasypt.plugin.path="theValueYouWantToEncrypt"

And get the following output:


[INFO] --- jasypt-maven-plugin:3.0.2:encrypt-value (default-cli) @ gb-samtykke-rest ---
[INFO] Starting MavenCli v3.6.0 on VDI-DEV-P01-293 with PID 9060 (started by I776061 in C:\git\gb-samtykke-rest)
[INFO] No active profile set, falling back to default profiles: default
[INFO] Post-processing PropertySource instances
[INFO] Converting PropertySource configurationProperties [org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource] to AOP Proxy
[INFO] Converting PropertySource systemProperties [org.springframework.core.env.PropertiesPropertySource] to EncryptableMapPropertySourceWrapper
[INFO] Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableSystemEnvironmentPropertySourceWrapper
[INFO] Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper
[INFO] Property Filter custom Bean not found with name 'encryptablePropertyFilter'. Initializing Default Property Filter
[INFO] Started MavenCli in 1.889 seconds (JVM running for 6.436)
[INFO] Active Profiles: Default
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.089 s
[INFO] Finished at: 2020-01-27T11:37:07+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.ulisesbocchio:jasypt-maven-plugin:3.0.2:encrypt-value (default-cli) on project gb-samtykke-rest: No jasypt.plugin.value property provided -> [Help 1]

Any ideas?

ulisesbocchio commented 4 years ago

The value for encrypt-value goes in jasypt.plugin.value, you’re using jasypt.plugin.path

cash1981 commented 4 years ago

Then please update the README.md page, because I ran the command from there. It says:

To encrypt a single value run:

mvn jasypt:encrypt-value -Djasypt.encryptor.password="the password" -Djasypt.plugin.path="theValueYouWantToEncrypt"

ulisesbocchio commented 4 years ago

Will do, thanks

abeld89 commented 2 years ago

I'am trying to encrypt password with 3.0.4 plugin and I have the same issue:

[INFO] No active profile set, falling back to default profiles: default [INFO] Post-processing PropertySource instances [INFO] Skipping PropertySource configurationProperties [class org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource [INFO] Converting PropertySource systemProperties [org.springframework.core.env.PropertiesPropertySource] to EncryptableMapPropertySourceWrapper [INFO] Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableSystemEnvironmentPropertySourceWrappe r [INFO] Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper [INFO] Converting PropertySource Config resource 'file [src\main\resources\application-default.yml]' via location 'file:./src/main/resources/' [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySo urceWrapper [INFO] Converting PropertySource defaultProperties [org.springframework.boot.DefaultPropertiesPropertySource] to EncryptableMapPropertySourceWrapper [INFO] Started MavenCli in 2.479 seconds (JVM running for 6.097) [INFO] Active Profiles: Default [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Skipping videocalls-ms-batch [INFO] This project has been banned from the build due to previous failures. [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.151 s [INFO] Finished at: 2022-08-31T09:52:02+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.ulisesbocchio:jasypt-maven-plugin:3.0.4:encrypt-value (default-cli) on project videocalls-ms-batch: No jasypt.plugin.value property provided -> [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/MojoExecutionException

for the input: mvn jasypt:encrypt-value -Djasypt.encryptor.password=javatechie -Djasypt.plugin.value=Password or mvn jasypt:encrypt-value -Djasypt.encryptor.password="javatechie" -Djasypt.plugin.value=Password or mvn jasypt:encrypt-value -Djasypt.encryptor.password=javatechie -Djasypt.plugin.value="Password"

sarpio commented 1 year ago

Use the follwing. It works for me: mvn jasypt:encrypt-value "-Djasypt.encryptor.password=password" "-Djasypt.plugin.value=test"

Geooo030 commented 1 year ago

Use the follwing. It works for me: mvn jasypt:encrypt-value "-Djasypt.encryptor.password=password" "-Djasypt.plugin.value=test"

I try it successfully in this way, thanks for your solution. @sarpio

Rale1994 commented 1 year ago

Use the follwing. It works for me: mvn jasypt:encrypt-value "-Djasypt.encryptor.password=password" "-Djasypt.plugin.value=test"

This works, thanks! @sarpio

Cangiante98 commented 1 year ago

works!

Sairam2909 commented 10 months ago

worked, thanks a lot. spent nearly half a day to fix this 🙂 @sarpio

WallenHan commented 7 months ago

Use the follwing. It works for me: mvn jasypt:encrypt-value "-Djasypt.encryptor.password=password" "-Djasypt.plugin.value=test"

Save my life, thx bro!