Skip to content

Commit 5df175a

Browse files
aschemanslachiewicz
authored andcommitted
Align Spotless check/apply with Maven parent
Builds should either apply spotless or check for it depending on whether it is running in CI or not. Detected in the course of support-and-care/maven-support-and-care#77 and codehaus-plexus/.github#45
1 parent 2169fbd commit 5df175a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,5 +880,27 @@ limitations under the License.
880880
</plugins>
881881
</build>
882882
</profile>
883+
<profile>
884+
<id>format-check</id>
885+
<activation>
886+
<property>
887+
<name>env.CI</name>
888+
</property>
889+
</activation>
890+
<properties>
891+
<spotless.action>check</spotless.action>
892+
</properties>
893+
</profile>
894+
<profile>
895+
<id>format</id>
896+
<activation>
897+
<property>
898+
<name>!env.CI</name>
899+
</property>
900+
</activation>
901+
<properties>
902+
<spotless.action>apply</spotless.action>
903+
</properties>
904+
</profile>
883905
</profiles>
884906
</project>

0 commit comments

Comments
 (0)