Leverage Maven's -Dstyle.color to avoid coloring instead of stripping

the ASCII codes in the client
This commit is contained in:
Peter Palaga
2021-03-08 23:17:13 +01:00
parent 90cae47f1a
commit bc4d2e6176
2 changed files with 22 additions and 19 deletions

View File

@@ -473,6 +473,17 @@ public enum Environment {
}
}
/**
* The values of {@link Environment#MAVEN_COLOR} option.
*/
public enum Color {
always, never, auto;
public static Optional<Color> of(String color) {
return color == null ? Optional.empty() : Optional.of(Color.valueOf(color));
}
}
public static class DocumentedEnumEntry<E> {
private final E entry;