diff --git a/pom.xml b/pom.xml
index f3335af1d3..a13b25be0a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -622,7 +622,7 @@
2.5.0
- ${project.parent.basedir}/.mvn/modernizer/violations.xml
+ ${maven.multiModuleProjectDirectory}/src/violations.xml
diff --git a/src/violations.xml b/src/violations.xml
new file mode 100644
index 0000000000..54ec65c81a
--- /dev/null
+++ b/src/violations.xml
@@ -0,0 +1,63 @@
+
+
+
+ java/lang/Class.newInstance:()Ljava/lang/Object;
+ 1.1
+ Prefer Class.getConstructor().newInstance()
+
+
+
+ java/lang/String."<init>":([B)V
+ 1.1
+ Prefer new String(byte[], Charset)
+
+
+
+ java/lang/String.getBytes:()[B
+ 1.1
+ Prefer String.getBytes(Charset)
+
+
+
+
+ java/io/File.toString:()Ljava/lang/String;
+ 1.1
+ Prefer File.getPath()
+
+
+
+ org/testng/Assert.assertEquals:(Ljava/lang/Iterable;Ljava/lang/Iterable;)V
+ 1.8
+ Use io.trino.testing.assertions.Assert.assertEquals due to TestNG #543
+
+
+
+ org/testng/Assert.assertEquals:(Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/String;)V
+ 1.8
+ Use io.trino.testing.assertions.Assert.assertEquals due to TestNG #543
+
+
+
+ org/testng/Assert.assertThrows:(Lorg/testng/Assert$ThrowingRunnable;)V
+ 1.8
+ Use AssertJ's assertThatThrownBy, see https://github.com/trinodb/trino/issues/5320 for rationale
+
+
+
+ org/testng/Assert.assertThrows:(Ljava/lang/Class;Lorg/testng/Assert$ThrowingRunnable;)V
+ 1.8
+ Use AssertJ's assertThatThrownBy, see https://github.com/trinodb/trino/issues/5320 for rationale
+
+
+
+ java/util/TimeZone.getTimeZone:(Ljava/lang/String;)Ljava/util/TimeZone;
+ 1.8
+ Avoid TimeZone.getTimeZone as it returns GMT for a zone not supported by the JVM. Use TimeZone.getTimeZone(ZoneId.of(..)) instead, or TimeZone.getTimeZone(..., false).
+
+
+
+ org/joda/time/DateTimeZone.toTimeZone:()Ljava/util/TimeZone;
+ 1.8
+ Avoid DateTimeZone.toTimeZone as it returns GMT for a zone not supported by the JVM. Use TimeZone.getTimeZone(ZoneId.of(dtz.getId())) instead.
+
+