Skip to content

Commit

Permalink
Enable spotless for code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekjaranowski committed May 11, 2023
1 parent 3361a6f commit 3b80a09
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<properties>
<mavenVersion>3.2.5</mavenVersion>
<mojo.java.target>8</mojo.java.target>
<recommendedJavaBuildVersion>11</recommendedJavaBuildVersion>
<!-- remove with parent upgrade -->
<maven-release-plugin.version>3.0.0</maven-release-plugin.version>
<scmpublish.content>${project.build.directory}/staging/build-helper-maven-plugin</scmpublish.content>
Expand Down Expand Up @@ -137,30 +138,10 @@
</dependency>
</dependencies>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<!-- version inherited -->
<configuration>
<configLocation>config/maven_checks.xml</configLocation>
<headerLocation>header.txt</headerLocation>
</configuration>
</plugin>
</plugins>
</reporting>

<profiles>

<profile>
<id>run-its</id>
<activation>
<property>
<name>skipTests</name>
<value>!true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -188,6 +169,28 @@
</build>
</profile>

<profile>
<id>java11+</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>${checkstyle.spotless.config}</configLocation>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<!-- This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
<profile>
<id>only-eclipse</id>
Expand Down

0 comments on commit 3b80a09

Please sign in to comment.