ulisesbocchio / jasypt-spring-boot

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

Maven plugin overrides spring.config.location with hardcoded value #345

Open Sremnerud opened 1 year ago

Sremnerud commented 1 year ago

AbstractJasyptMojo overrides already set spring.config.location which inhibits one from pointing out another location for application.properties e.g.

mvn jasypt:encrypt -Djasypt.encryptor.password=mypassword -Dspring.config.location=file:./some/other/location/

https://github.com/ulisesbocchio/jasypt-spring-boot/blob/c0c207cda7dfc294fa986955a72384e8a5d365c9/jasypt-maven-plugin/src/main/java/com/ulisesbocchio/jasyptmavenplugin/mojo/AbstractJasyptMojo.java#L59

even using -Djasypt.plugin.path with another path you still need to have src/main/resources directory in the project or it throws an exception

jonas-haeusler commented 1 year ago

this should be fixed in the latest release with #294