Skip to content

Commit 6ab2773

Browse files
authored
build: only run code formatter with JDK 11 and higher (GoogleCloudPlatform#3121)
1 parent f9b77ab commit 6ab2773

1 file changed

Lines changed: 21 additions & 11 deletions

File tree

pom.xml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,27 @@
383383
</plugins>
384384
</build>
385385
</profile>
386+
<profile>
387+
<id>format</id>
388+
<activation>
389+
<jdk>[11,)</jdk>
390+
</activation>
391+
<build>
392+
<plugins>
393+
<plugin>
394+
<groupId>com.coveo</groupId>
395+
<artifactId>fmt-maven-plugin</artifactId>
396+
<executions>
397+
<execution>
398+
<goals>
399+
<goal>format</goal>
400+
</goals>
401+
</execution>
402+
</executions>
403+
</plugin>
404+
</plugins>
405+
</build>
406+
</profile>
386407
</profiles>
387408

388409
<build>
@@ -409,17 +430,6 @@
409430
</configuration>
410431
</plugin>
411432

412-
<plugin>
413-
<groupId>com.coveo</groupId>
414-
<artifactId>fmt-maven-plugin</artifactId>
415-
<executions>
416-
<execution>
417-
<goals>
418-
<goal>format</goal>
419-
</goals>
420-
</execution>
421-
</executions>
422-
</plugin>
423433
<plugin>
424434
<groupId>org.apache.maven.plugins</groupId>
425435
<artifactId>maven-surefire-plugin</artifactId>

0 commit comments

Comments
 (0)