SLING-10891 Enable code checks with Checkstyle
diff --git a/pom.xml b/pom.xml
index 97f8430..f12509d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,6 +82,34 @@
           </systemPropertyVariables>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>3.1.2</version>
+        <dependencies>
+          <dependency>
+            <groupId>com.puppycrawl.tools</groupId>
+            <artifactId>checkstyle</artifactId>
+            <version>9.0.1</version>
+          </dependency>
+          <dependency>
+            <groupId>de.bildschirmarbeiter</groupId>
+            <artifactId>checkstyle</artifactId>
+            <version>3</version>
+          </dependency>
+        </dependencies>
+        <configuration>
+          <configLocation>checks.xml</configLocation>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>validate</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>