diff --git a/takari-lifecycle-plugin/src/main/java/io/takari/maven/plugins/util/PropertiesWriter.java b/takari-lifecycle-plugin/src/main/java/io/takari/maven/plugins/util/PropertiesWriter.java index 1e14676f..0e3339a8 100644 --- a/takari-lifecycle-plugin/src/main/java/io/takari/maven/plugins/util/PropertiesWriter.java +++ b/takari-lifecycle-plugin/src/main/java/io/takari/maven/plugins/util/PropertiesWriter.java @@ -35,6 +35,7 @@ public static void write(Properties properties, String comment, OutputStream out properties.store(sw, comment); List lines = new ArrayList<>(Arrays.asList(sw.toString().split("\\R"))); lines.remove(comment != null ? 1 : 0); + lines.sort(String::compareTo); // make lines ordering stable BufferedWriter w = new BufferedWriter(new OutputStreamWriter(out, ENCODING)); for (String line : lines) { w.write(line);