You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2020/03/04 16:54:42 UTC

[camel] 02/02: Add a profile to run the impsort plugin (sort and remove unused imports)

This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4eb044932fae344f49509a1ede2d3b58e59d0a93
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Mar 4 17:54:02 2020 +0100

    Add a profile to run the impsort plugin (sort and remove unused imports)
---
 parent/pom.xml | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/parent/pom.xml b/parent/pom.xml
index ce17d6b..1bfc2a9 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -299,6 +299,7 @@
         <ical4j-version>1.0.7</ical4j-version>
         <icu4j-version>65.1</icu4j-version>
         <ignite-version>2.7.6</ignite-version>
+        <impsort-maven-plugin-version>1.3.2</impsort-maven-plugin-version>
         <infinispan-version>10.1.3.Final</infinispan-version>
         <influx-java-driver-version>2.17</influx-java-driver-version>
         <influx-java-driver-bundle-version>2.17_1</influx-java-driver-bundle-version>
@@ -4500,6 +4501,34 @@
         </profile>
 
         <profile>
+            <id>impsort</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>net.revelc.code</groupId>
+                        <artifactId>impsort-maven-plugin</artifactId>
+                        <version>${impsort-maven-plugin-version}</version>
+                        <executions>
+                            <execution>
+                                <id>sort-imports</id>
+                                <goals>
+                                    <goal>sort</goal>
+                                </goals>
+                                <phase>process-sources</phase>
+                                <configuration>
+                                    <groups>java.,javax.,org.w3c.,org.xml.,junit.,*</groups>
+                                    <excludes>**/package-info.java</excludes>
+                                    <staticAfter>true</staticAfter>
+                                    <removeUnused>true</removeUnused>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
             <id>sourcecheck</id>
             <build>
                 <plugins>