accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [2/7] accumulo git commit: ACCUMULO-3781 Create autoformat profile
Date Fri, 08 May 2015 00:03:08 GMT
ACCUMULO-3781 Create autoformat profile

* Place maven-java-formatter-plugin in autoformat profile
* Enable skipping of profile with '-P !autoformat' or '-DskipFormat'
* Add '-P !autoformat' to release profile and maven-plugin invoked IT
* Simplify reference to config location using ${project.parent.basedir}
* Enable overriding formatter with '-DeclipseFormatterStyle=/some/absolute/path'


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

Branch: refs/heads/1.7
Commit: 6771ff7d431915eb0ad19198c0d8d6edbce49d88
Parents: a8ef75e
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Thu May 7 16:51:01 2015 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Thu May 7 17:42:52 2015 -0400

----------------------------------------------------------------------
 examples/simple/pom.xml                 |  9 --------
 maven-plugin/pom.xml                    |  3 +++
 maven-plugin/src/it/plugin-test/pom.xml |  7 -------
 pom.xml                                 | 31 +++++++++++++++++++++-------
 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 --------
 11 files changed, 26 insertions(+), 91 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/6771ff7d/examples/simple/pom.xml
----------------------------------------------------------------------
diff --git a/examples/simple/pom.xml b/examples/simple/pom.xml
index e83bf45..aa2f118 100644
--- a/examples/simple/pom.xml
+++ b/examples/simple/pom.xml
@@ -113,14 +113,5 @@
         </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/6771ff7d/maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml
index d0b618e..2c07d7d 100644
--- a/maven-plugin/pom.xml
+++ b/maven-plugin/pom.xml
@@ -110,6 +110,9 @@
                 <goal>clean</goal>
                 <goal>post-integration-test</goal>
               </goals>
+              <profiles>
+                <profile>!autoformat</profile>
+              </profiles>
             </configuration>
             <executions>
               <execution>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6771ff7d/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 8a848e4..7654c96 100644
--- a/maven-plugin/src/it/plugin-test/pom.xml
+++ b/maven-plugin/src/it/plugin-test/pom.xml
@@ -113,13 +113,6 @@
           </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/6771ff7d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index cd20445..3188cac 100644
--- a/pom.xml
+++ b/pom.xml
@@ -119,6 +119,8 @@
     <accumulo.release.version>${project.version}</accumulo.release.version>
     <!-- bouncycastle version for test dependencies -->
     <bouncycastle.version>1.50</bouncycastle.version>
+    <!-- relative path for Eclipse format; should override in child modules if necessary
-->
+    <eclipseFormatterStyle>${project.parent.basedir}/contrib/Eclipse-Accumulo-Codestyle.xml</eclipseFormatterStyle>
     <!-- findbugs-maven-plugin won't work on jdk8 or later; set to 3.0.0 or newer -->
     <findbugs.version>3.0.0</findbugs.version>
     <!-- surefire/failsafe plugin option -->
@@ -643,7 +645,7 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-release-plugin</artifactId>
           <configuration>
-            <arguments>-P apache-release,thrift,assemble,docs,sunny -Dtimeout.factor=2</arguments>
+            <arguments>-P !autoformat,apache-release,thrift,assemble,docs,sunny -Dtimeout.factor=2</arguments>
             <autoVersionSubmodules>true</autoVersionSubmodules>
             <goals>clean deploy</goals>
             <preparationGoals>clean verify</preparationGoals>
@@ -1155,13 +1157,6 @@
         <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>
@@ -1309,6 +1304,26 @@
       </build>
     </profile>
     <profile>
+      <!-- on by default, but disable with '-P !autoformat' or '-DskipFormat' -->
+      <id>autoformat</id>
+      <activation>
+        <property>
+          <name>!skipFormat</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
+            <artifactId>maven-java-formatter-plugin</artifactId>
+            <configuration>
+              <configFile>${eclipseFormatterStyle}</configFile>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
       <!-- 'mvn clean -P sortpom' sorts -->
       <id>sortpom</id>
       <build>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6771ff7d/server/base/pom.xml
----------------------------------------------------------------------
diff --git a/server/base/pom.xml b/server/base/pom.xml
index f52e2d3..94850b9 100644
--- a/server/base/pom.xml
+++ b/server/base/pom.xml
@@ -127,15 +127,6 @@
         <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/6771ff7d/server/gc/pom.xml
----------------------------------------------------------------------
diff --git a/server/gc/pom.xml b/server/gc/pom.xml
index 49d3fb5..694ffe9 100644
--- a/server/gc/pom.xml
+++ b/server/gc/pom.xml
@@ -87,15 +87,4 @@
       <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/6771ff7d/server/master/pom.xml
----------------------------------------------------------------------
diff --git a/server/master/pom.xml b/server/master/pom.xml
index 0987ad1..cf92d4a 100644
--- a/server/master/pom.xml
+++ b/server/master/pom.xml
@@ -95,15 +95,4 @@
       <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/6771ff7d/server/monitor/pom.xml
----------------------------------------------------------------------
diff --git a/server/monitor/pom.xml b/server/monitor/pom.xml
index 75ec235..51262c1 100644
--- a/server/monitor/pom.xml
+++ b/server/monitor/pom.xml
@@ -143,14 +143,5 @@
         </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/6771ff7d/server/native/pom.xml
----------------------------------------------------------------------
diff --git a/server/native/pom.xml b/server/native/pom.xml
index f97d7c9..d175093 100644
--- a/server/native/pom.xml
+++ b/server/native/pom.xml
@@ -109,13 +109,6 @@
           </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/6771ff7d/server/tracer/pom.xml
----------------------------------------------------------------------
diff --git a/server/tracer/pom.xml b/server/tracer/pom.xml
index 020af61..c44f498 100644
--- a/server/tracer/pom.xml
+++ b/server/tracer/pom.xml
@@ -88,17 +88,6 @@
       <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/6771ff7d/server/tserver/pom.xml
----------------------------------------------------------------------
diff --git a/server/tserver/pom.xml b/server/tserver/pom.xml
index 00a223f..a4bc3de 100644
--- a/server/tserver/pom.xml
+++ b/server/tserver/pom.xml
@@ -141,14 +141,5 @@
         </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