You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2020/01/05 08:41:35 UTC
[camel-quarkus] branch master updated: build:
formatter-maven-plugin should validate code format when check-format
profile is active
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push:
new 52aa82f build: formatter-maven-plugin should validate code format when check-format profile is active
52aa82f is described below
commit 52aa82f0dbd233b392a5f9f857c42ba8cd45b833
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Sat Jan 4 23:57:30 2020 +0100
build: formatter-maven-plugin should validate code format when check-format profile is active
---
poms/build-parent/pom.xml | 42 ++++++++++++++++++++++++++++++++++++++----
1 file changed, 38 insertions(+), 4 deletions(-)
diff --git a/poms/build-parent/pom.xml b/poms/build-parent/pom.xml
index 2cd8c8e..a50d66d 100644
--- a/poms/build-parent/pom.xml
+++ b/poms/build-parent/pom.xml
@@ -103,6 +103,14 @@
<artifactId>jandex-maven-plugin</artifactId>
<version>${jandex-maven-plugin.version}</version>
</plugin>
+ <plugin>
+ <groupId>net.revelc.code.formatter</groupId>
+ <artifactId>formatter-maven-plugin</artifactId>
+ <version>${formatter-maven-plugin.version}</version>
+ <configuration>
+ <configFile>${camel.quarkus.project.root}/tooling/eclipse-formatter-config.xml</configFile>
+ </configuration>
+ </plugin>
</plugins>
</pluginManagement>
@@ -172,18 +180,44 @@
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
- <version>${formatter-maven-plugin.version}</version>
<executions>
<execution>
+ <id>format</id>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
- <configuration>
- <configFile>${camel.quarkus.project.root}/tooling/eclipse-formatter-config.xml</configFile>
- </configuration>
</plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>check-format</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>net.revelc.code.formatter</groupId>
+ <artifactId>formatter-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>format</id>
+ <phase/>
+ </execution>
+ <execution>
+ <id>validate</id>
+ <goals>
+ <goal>validate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>