Skip to content

Commit 8951fc8

Browse files
committedMar 8, 2023
Add spotless
1 parent 0eddc13 commit 8951fc8

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed
 

‎pom.xml

+83
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,59 @@
502502
<artifactId>maven-wrapper-plugin</artifactId>
503503
<version>3.1.1</version>
504504
</plugin>
505+
506+
<plugin>
507+
<groupId>com.diffplug.spotless</groupId>
508+
<artifactId>spotless-maven-plugin</artifactId>
509+
<version>2.28.0</version>
510+
<configuration>
511+
<java>
512+
<toggleOffOn />
513+
<palantirJavaFormat />
514+
<importOrder>
515+
<order>java|javax,org,,\#</order>
516+
</importOrder>
517+
<removeUnusedImports />
518+
<licenseHeader>
519+
<content>/*
520+
* Copyright (c) $YEAR, the original author(s).
521+
*
522+
* This software is distributable under the BSD license. See the terms of the
523+
* BSD license in the documentation provided with this software.
524+
*
525+
* https://opensource.org/licenses/BSD-3-Clause
526+
*/</content>
527+
</licenseHeader>
528+
</java>
529+
<pom>
530+
<sortPom>
531+
<expandEmptyElements>false</expandEmptyElements>
532+
<nrOfIndentSpace>4</nrOfIndentSpace>
533+
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
534+
</sortPom>
535+
</pom>
536+
<upToDateChecking>
537+
<enabled>true</enabled>
538+
</upToDateChecking>
539+
</configuration>
540+
<dependencies>
541+
<!--
542+
<dependency>
543+
<groupId>org.apache.maven.shared</groupId>
544+
<artifactId>maven-shared-resources</artifactId>
545+
<version>5</version>
546+
</dependency>
547+
-->
548+
</dependencies>
549+
<executions>
550+
<execution>
551+
<goals>
552+
<goal>${spotless.action}</goal>
553+
</goals>
554+
<phase>process-sources</phase>
555+
</execution>
556+
</executions>
557+
</plugin>
505558
</plugins>
506559
</pluginManagement>
507560

@@ -610,10 +663,16 @@
610663
<autoVersionSubmodules>true</autoVersionSubmodules>
611664
</configuration>
612665
</plugin>
666+
613667
<plugin>
614668
<groupId>org.graalvm.nativeimage</groupId>
615669
<artifactId>native-image-maven-plugin</artifactId>
616670
</plugin>
671+
672+
<plugin>
673+
<groupId>com.diffplug.spotless</groupId>
674+
<artifactId>spotless-maven-plugin</artifactId>
675+
</plugin>
617676
</plugins>
618677
</build>
619678

@@ -709,6 +768,30 @@
709768
<native.image.skip>false</native.image.skip>
710769
</properties>
711770
</profile>
771+
772+
<profile>
773+
<id>format-check</id>
774+
<activation>
775+
<property>
776+
<name>!format</name>
777+
</property>
778+
</activation>
779+
<properties>
780+
<spotless.action>check</spotless.action>
781+
</properties>
782+
</profile>
783+
784+
<profile>
785+
<id>format</id>
786+
<activation>
787+
<property>
788+
<name>format</name>
789+
</property>
790+
</activation>
791+
<properties>
792+
<spotless.action>apply</spotless.action>
793+
</properties>
794+
</profile>
712795
</profiles>
713796

714797
<modules>

0 commit comments

Comments
 (0)
Please sign in to comment.