accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [04/11] accumulo git commit: ACCUMULO-3771 Configure automatic Java code style formatting
Date Thu, 07 May 2015 18:54:08 GMT
ACCUMULO-3771 Configure automatic Java code style formatting

* Added maven-java-formatter-plugin to POM files


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e4b27ced
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e4b27ced
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e4b27ced

Branch: refs/heads/master
Commit: e4b27cedf400b4dc720134fdccd9ce98b20b06c6
Parents: 931bf89
Author: Mike Walch <mwalch@gmail.com>
Authored: Mon May 4 15:31:36 2015 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Thu May 7 14:40:15 2015 -0400

----------------------------------------------------------------------
 examples/simple/pom.xml                 |  9 +++++++
 maven-plugin/src/it/plugin-test/pom.xml |  7 ++++++
 pom.xml                                 | 35 +++++++++++++++++++++++++++-
 server/base/pom.xml                     |  9 +++++++
 server/gc/pom.xml                       | 11 +++++++++
 server/master/pom.xml                   | 11 +++++++++
 server/monitor/pom.xml                  |  9 +++++++
 server/native/pom.xml                   |  7 ++++++
 server/tracer/pom.xml                   | 11 +++++++++
 server/tserver/pom.xml                  |  9 +++++++
 10 files changed, 117 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4b27ced/examples/simple/pom.xml
----------------------------------------------------------------------
diff --git a/examples/simple/pom.xml b/examples/simple/pom.xml
index aa2f118..e83bf45 100644
--- a/examples/simple/pom.xml
+++ b/examples/simple/pom.xml
@@ -113,5 +113,14 @@
         </plugin>
       </plugins>
     </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
+        <artifactId>maven-java-formatter-plugin</artifactId>
+        <configuration>
+          <configFile>${project.basedir}/../../contrib/Eclipse-Accumulo-Codestyle.xml</configFile>
+        </configuration>
+      </plugin>
+    </plugins>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4b27ced/maven-plugin/src/it/plugin-test/pom.xml
----------------------------------------------------------------------
diff --git a/maven-plugin/src/it/plugin-test/pom.xml b/maven-plugin/src/it/plugin-test/pom.xml
index 7654c96..8a848e4 100644
--- a/maven-plugin/src/it/plugin-test/pom.xml
+++ b/maven-plugin/src/it/plugin-test/pom.xml
@@ -113,6 +113,13 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
+        <artifactId>maven-java-formatter-plugin</artifactId>
+        <configuration>
+          <configFile>${project.basedir}/../../../../contrib/Eclipse-Accumulo-Codestyle.xml</configFile>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4b27ced/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c74ad2a..3ff3372 100644
--- a/pom.xml
+++ b/pom.xml
@@ -905,6 +905,32 @@
           <artifactId>apilyzer-maven-plugin</artifactId>
           <version>1.0.1</version>
         </plugin>
+        <plugin>
+          <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
+          <artifactId>maven-java-formatter-plugin</artifactId>
+          <version>0.4</version>
+          <configuration>
+            <excludes>
+              <exclude>**/thrift/*.java</exclude>
+              <exclude>**/proto/*.java</exclude>
+            </excludes>
+          </configuration>
+          <dependencies>
+            <dependency>
+              <groupId>org.eclipse.tycho</groupId>
+              <artifactId>org.eclipse.jdt.core</artifactId>
+              <version>3.10.0.v20140604-1726</version>
+              <scope>compile</scope>
+            </dependency>
+          </dependencies>
+          <executions>
+            <execution>
+              <goals>
+                <goal>format</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>
@@ -950,7 +976,7 @@
               <module name="TreeWalker">
                 <module name="OneTopLevelClass" />
                 <module name="RegexpSinglelineJava">
-                  <property name="format" value="\s+$" />
+                  <property name="format" value="[^*]\s+$" />
                   <property name="message" value="Line has trailing whitespace." />
                 </module>
                 <module name="RegexpSinglelineJava">
@@ -1112,6 +1138,13 @@
         <extensions>true</extensions>
         <inherited>true</inherited>
       </plugin>
+      <plugin>
+        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
+        <artifactId>maven-java-formatter-plugin</artifactId>
+        <configuration>
+          <configFile>${project.basedir}/../contrib/Eclipse-Accumulo-Codestyle.xml</configFile>
+        </configuration>
+      </plugin>
     </plugins>
     <extensions>
       <extension>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4b27ced/server/base/pom.xml
----------------------------------------------------------------------
diff --git a/server/base/pom.xml b/server/base/pom.xml
index 94850b9..f52e2d3 100644
--- a/server/base/pom.xml
+++ b/server/base/pom.xml
@@ -127,6 +127,15 @@
         <directory>src/test/resources</directory>
       </testResource>
     </testResources>
+    <plugins>
+      <plugin>
+        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
+        <artifactId>maven-java-formatter-plugin</artifactId>
+        <configuration>
+          <configFile>${project.basedir}/../../contrib/Eclipse-Accumulo-Codestyle.xml</configFile>
+        </configuration>
+      </plugin>
+    </plugins>
   </build>
   <profiles>
     <profile>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4b27ced/server/gc/pom.xml
----------------------------------------------------------------------
diff --git a/server/gc/pom.xml b/server/gc/pom.xml
index 694ffe9..49d3fb5 100644
--- a/server/gc/pom.xml
+++ b/server/gc/pom.xml
@@ -87,4 +87,15 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
+        <artifactId>maven-java-formatter-plugin</artifactId>
+        <configuration>
+          <configFile>${project.basedir}/../../contrib/Eclipse-Accumulo-Codestyle.xml</configFile>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 </project>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4b27ced/server/master/pom.xml
----------------------------------------------------------------------
diff --git a/server/master/pom.xml b/server/master/pom.xml
index cf92d4a..0987ad1 100644
--- a/server/master/pom.xml
+++ b/server/master/pom.xml
@@ -95,4 +95,15 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
+        <artifactId>maven-java-formatter-plugin</artifactId>
+        <configuration>
+          <configFile>${project.basedir}/../../contrib/Eclipse-Accumulo-Codestyle.xml</configFile>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 </project>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4b27ced/server/monitor/pom.xml
----------------------------------------------------------------------
diff --git a/server/monitor/pom.xml b/server/monitor/pom.xml
index 51262c1..75ec235 100644
--- a/server/monitor/pom.xml
+++ b/server/monitor/pom.xml
@@ -143,5 +143,14 @@
         </plugin>
       </plugins>
     </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
+        <artifactId>maven-java-formatter-plugin</artifactId>
+        <configuration>
+          <configFile>${project.basedir}/../../contrib/Eclipse-Accumulo-Codestyle.xml</configFile>
+        </configuration>
+      </plugin>
+    </plugins>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4b27ced/server/native/pom.xml
----------------------------------------------------------------------
diff --git a/server/native/pom.xml b/server/native/pom.xml
index d175093..f97d7c9 100644
--- a/server/native/pom.xml
+++ b/server/native/pom.xml
@@ -109,6 +109,13 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
+        <artifactId>maven-java-formatter-plugin</artifactId>
+        <configuration>
+          <configFile>${project.basedir}/../../contrib/Eclipse-Accumulo-Codestyle.xml</configFile>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4b27ced/server/tracer/pom.xml
----------------------------------------------------------------------
diff --git a/server/tracer/pom.xml b/server/tracer/pom.xml
index c44f498..020af61 100644
--- a/server/tracer/pom.xml
+++ b/server/tracer/pom.xml
@@ -88,6 +88,17 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
+        <artifactId>maven-java-formatter-plugin</artifactId>
+        <configuration>
+          <configFile>${project.basedir}/../../contrib/Eclipse-Accumulo-Codestyle.xml</configFile>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
   <profiles>
     <profile>
       <id>thrift</id>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4b27ced/server/tserver/pom.xml
----------------------------------------------------------------------
diff --git a/server/tserver/pom.xml b/server/tserver/pom.xml
index a4bc3de..00a223f 100644
--- a/server/tserver/pom.xml
+++ b/server/tserver/pom.xml
@@ -141,5 +141,14 @@
         </plugin>
       </plugins>
     </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
+        <artifactId>maven-java-formatter-plugin</artifactId>
+        <configuration>
+          <configFile>${project.basedir}/../../contrib/Eclipse-Accumulo-Codestyle.xml</configFile>
+        </configuration>
+      </plugin>
+    </plugins>
   </build>
 </project>


Mime
View raw message