Skip to content

Commit

Permalink
Add eclipse formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Feb 23, 2019
1 parent 7c518af commit 7f18725
Show file tree
Hide file tree
Showing 5 changed files with 384 additions and 1 deletion.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Expand Up @@ -27,7 +27,7 @@ jobs:
displayName: 'Maven Build'
inputs:
goals: 'install'
options: '-B --settings azure-mvn-settings.xml -Dnative-image.docker-build -Dtest-postgresql -Dnative-image.xmx=4g -Dnative'
options: '-B --settings azure-mvn-settings.xml -Dnative-image.docker-build -Dtest-postgresql -Dnative-image.xmx=4g -Dnative -Dno-format'

- script: |
docker build -f docker/integration-test-main/Dockerfile -t jtgdocker1/quarkus-integration-test-main integration-tests/main
Expand Down
97 changes: 97 additions & 0 deletions build-parent/pom.xml
Expand Up @@ -1584,8 +1584,105 @@
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<configFile>${maven.multiModuleProjectDirectory}/ide-config/eclipse-format.xml</configFile>
<skip>${format.skip}</skip>
</configuration>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<version>1.2.0</version>
<configuration>
<groups>java.,javax.,org.,com.</groups>
<staticGroups>*</staticGroups>
<skip>${format.skip}</skip>
</configuration>
</plugin>
</plugins>

</pluginManagement>
</build>

<profiles>

<profile>
<id>format</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>!no-format</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<executions>
<execution>
<id>sort-imports</id>
<goals>
<goal>sort</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>validate</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>no-format</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>validate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<executions>
<execution>
<id>check-imports</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 7f18725

Please sign in to comment.