diff --git a/jasypt-maven-plugin/src/main/java/com/ulisesbocchio/jasyptmavenplugin/mojo/EncryptMojo.java b/jasypt-maven-plugin/src/main/java/com/ulisesbocchio/jasyptmavenplugin/mojo/EncryptMojo.java index 28f353f..2ba5385 100644 --- a/jasypt-maven-plugin/src/main/java/com/ulisesbocchio/jasyptmavenplugin/mojo/EncryptMojo.java +++ b/jasypt-maven-plugin/src/main/java/com/ulisesbocchio/jasyptmavenplugin/mojo/EncryptMojo.java @@ -27,6 +27,10 @@ protected void run(final EncryptionService service, final Path path, String encr try { String contents = FileService.read(path); String encryptedContents = service.encrypt(contents, encryptPrefix, encryptSuffix, decryptPrefix, decryptSuffix); + if (contents.equals(encryptedContents)) { + LOGGER.warn("Encrypting file:{} not changed!", path); + return; + } FileService.write(path, encryptedContents); } catch (Exception e) {