accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [accumulo] 01/05: POM updates for formatting (#416)
Date Fri, 06 Apr 2018 09:53:01 GMT
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch 1.8
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit fc20be34d6984114e7240c4eba276a3fe87a347b
Author: Christopher Tubbs <ctubbsii@apache.org>
AuthorDate: Fri Apr 6 00:00:39 2018 -0400

    POM updates for formatting (#416)
    
    * Update to formatter-maven-plugin 2.7.2
    * Update sortpom version
    * Simplify formatting plugin profiles which require jdk8
    * Use 100 character line limit
    * Update ciManagement and issueManagement sections for next release
    * Include rule to ignore @link/@see tags in javadocs
    * Ignore long 'new *Map<>' lines, because they tend to be long with
      generics
---
 contrib/Eclipse-Accumulo-Codestyle.xml |   4 +-
 pom.xml                                | 157 +++++++++++++++------------------
 2 files changed, 73 insertions(+), 88 deletions(-)

diff --git a/contrib/Eclipse-Accumulo-Codestyle.xml b/contrib/Eclipse-Accumulo-Codestyle.xml
index 42e03bf..3b04c4d 100644
--- a/contrib/Eclipse-Accumulo-Codestyle.xml
+++ b/contrib/Eclipse-Accumulo-Codestyle.xml
@@ -90,7 +90,7 @@
 <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters"
value="do not insert"/>
 <setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment"
value="false"/>
 <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration"
value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="160"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="100"/>
 <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
 <setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference"
value="do not insert"/>
 <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression"
value="do not insert"/>
@@ -221,7 +221,7 @@
 <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement"
value="do not insert"/>
 <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant"
value="16"/>
 <setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="160"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="100"/>
 <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package"
value="insert"/>
 <setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
 <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments"
value="do not insert"/>
diff --git a/pom.xml b/pom.xml
index 44273de..f4b46bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -105,12 +105,12 @@
     <url>https://gitbox.apache.org/repos/asf?p=accumulo.git</url>
   </scm>
   <issueManagement>
-    <system>JIRA</system>
-    <url>https://issues.apache.org/jira/browse/ACCUMULO</url>
+    <system>GitHub Issues</system>
+    <url>https://github.com/apache/accumulo/issues</url>
   </issueManagement>
   <ciManagement>
-    <system>Apache Jenkins</system>
-    <url>https://builds.apache.org/view/A/view/Accumulo/</url>
+    <system>Travis CI</system>
+    <url>https://travis-ci.org/apache/accumulo</url>
   </ciManagement>
   <properties>
     <!-- used for filtering the java source with the current version -->
@@ -610,8 +610,7 @@
         <plugin>
           <groupId>com.github.ekryd.sortpom</groupId>
           <artifactId>sortpom-maven-plugin</artifactId>
-          <!-- version 2.4.0 is the last version which supports Java 7 -->
-          <version>2.4.0</version>
+          <version>2.8.0</version>
           <configuration>
             <predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
             <createBackupFile>false</createBackupFile>
@@ -705,7 +704,7 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-release-plugin</artifactId>
           <configuration>
-            <arguments>-P !autoformat,!autoformat-with-jdk8,thrift,sunny -Dtimeout.factor=2
${extraReleaseArgs}</arguments>
+            <arguments>-P !autoformat,thrift,sunny -Dtimeout.factor=2 ${extraReleaseArgs}</arguments>
             <autoVersionSubmodules>true</autoVersionSubmodules>
             <goals>clean deploy</goals>
             <preparationGoals>clean verify</preparationGoals>
@@ -812,10 +811,24 @@
           <version>1.2.0</version>
         </plugin>
         <plugin>
-          <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
-          <artifactId>maven-java-formatter-plugin</artifactId>
-          <version>0.4</version>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
           <configuration>
+            <excludes combine.children="append">
+              <exclude>src/main/resources/META-INF/services/*</exclude>
+              <exclude>nbproject/**</exclude>
+              <exclude>nb-configuration.xml</exclude>
+              <exclude>nbactions.xml</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+        <plugin>
+          <!-- this plugin requires java 1.8 and should only be used in a jdk8 profile
-->
+          <groupId>net.revelc.code.formatter</groupId>
+          <artifactId>formatter-maven-plugin</artifactId>
+          <version>2.7.2</version>
+          <configuration>
+            <configFile>${eclipseFormatterStyle}</configFile>
             <compilerCompliance>${maven.compiler.source}</compilerCompliance>
             <compilerSource>${maven.compiler.source}</compilerSource>
             <compilerTargetPlatform>${maven.compiler.target}</compilerTargetPlatform>
@@ -825,33 +838,11 @@
             </excludes>
             <lineEnding>LF</lineEnding>
             <overrideConfigCompilerVersion>true</overrideConfigCompilerVersion>
-          </configuration>
-          <dependencies>
-            <dependency>
-              <groupId>org.eclipse.tycho</groupId>
-              <artifactId>org.eclipse.jdt.core</artifactId>
-              <version>3.10.0.v20140604-1726</version>
-            </dependency>
-          </dependencies>
-          <executions>
-            <execution>
-              <id>format-java-source</id>
-              <goals>
-                <goal>format</goal>
-              </goals>
-            </execution>
-          </executions>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.rat</groupId>
-          <artifactId>apache-rat-plugin</artifactId>
-          <configuration>
-            <excludes combine.children="append">
-              <exclude>src/main/resources/META-INF/services/*</exclude>
-              <exclude>nbproject/**</exclude>
-              <exclude>nb-configuration.xml</exclude>
-              <exclude>nbactions.xml</exclude>
-            </excludes>
+            <skipJsFormatting>true</skipJsFormatting>
+            <skipHtmlFormatting>true</skipHtmlFormatting>
+            <skipXmlFormatting>true</skipXmlFormatting>
+            <skipJsonFormatting>true</skipJsonFormatting>
+            <skipCssFormatting>true</skipCssFormatting>
           </configuration>
         </plugin>
         <plugin>
@@ -866,6 +857,12 @@
             </excludes>
           </configuration>
         </plugin>
+        <plugin>
+          <!-- this plugin requires java 1.8 and should only be used in a jdk8 profile
-->
+          <groupId>net.revelc.code</groupId>
+          <artifactId>warbucks-maven-plugin</artifactId>
+          <version>1.0.0</version>
+        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>
@@ -882,20 +879,6 @@
         </executions>
       </plugin>
       <plugin>
-        <!-- verify before compile; should be sorted already -->
-        <groupId>com.github.ekryd.sortpom</groupId>
-        <artifactId>sortpom-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>verify-sorted-pom</id>
-            <goals>
-              <goal>verify</goal>
-            </goals>
-            <phase>process-resources</phase>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-enforcer-plugin</artifactId>
         <executions>
@@ -991,9 +974,8 @@
                 </module>
                 <module name="OuterTypeFilename" />
                 <module name="LineLength">
-                  <!-- needs extra, because Eclipse formatter ignores the ending left
brace -->
-                  <property name="max" value="200" />
-                  <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"
/>
+                  <property name="max" value="100" />
+                  <property name="ignorePattern" value="^[ ]*[*].*@(link|see) |Map.* =
new .*Map|a href=|http://|https://|ftp://" />
                 </module>
                 <module name="AvoidStarImport" />
                 <module name="UnusedImports">
@@ -1165,8 +1147,8 @@
                     </pluginExecution>
                     <pluginExecution>
                       <pluginExecutionFilter>
-                        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
-                        <artifactId>maven-java-formatter-plugin</artifactId>
+                        <groupId>net.revelc.code.formatter</groupId>
+                        <artifactId>formatter-maven-plugin</artifactId>
                         <versionRange>[0,)</versionRange>
                         <goals>
                           <goal>format</goal>
@@ -1389,9 +1371,11 @@
       </build>
     </profile>
     <profile>
+      <!-- this profile requires jdk8 -->
       <!-- on by default, but disable with '-P !autoformat' or '-DskipFormat' -->
       <id>autoformat</id>
       <activation>
+        <jdk>[1.8,1.9)</jdk>
         <property>
           <name>!skipFormat</name>
         </property>
@@ -1412,32 +1396,17 @@
             </executions>
           </plugin>
           <plugin>
-            <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
-            <artifactId>maven-java-formatter-plugin</artifactId>
-            <configuration>
-              <configFile>${eclipseFormatterStyle}</configFile>
-            </configuration>
+            <groupId>net.revelc.code.formatter</groupId>
+            <artifactId>formatter-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>format-java-source</id>
+                <goals>
+                  <goal>format</goal>
+                </goals>
+              </execution>
+            </executions>
           </plugin>
-        </plugins>
-      </build>
-    </profile>
-    <profile>
-      <!-- Minimal testing profile. (a.k.a. SunnyDay) -->
-      <id>sunny</id>
-      <properties>
-        <failsafe.groups>org.apache.accumulo.test.categories.SunnyDayTests</failsafe.groups>
-      </properties>
-    </profile>
-    <profile>
-      <id>autoformat-with-jdk8</id>
-      <activation>
-        <jdk>[1.8,1.9)</jdk>
-        <property>
-          <name>!skipFormat</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
           <plugin>
             <groupId>net.revelc.code</groupId>
             <artifactId>impsort-maven-plugin</artifactId>
@@ -1454,6 +1423,13 @@
       </build>
     </profile>
     <profile>
+      <!-- Minimal testing profile. (a.k.a. SunnyDay) -->
+      <id>sunny</id>
+      <properties>
+        <failsafe.groups>org.apache.accumulo.test.categories.SunnyDayTests</failsafe.groups>
+      </properties>
+    </profile>
+    <profile>
       <id>jdk8</id>
       <activation>
         <jdk>[1.8,1.9)</jdk>
@@ -1471,15 +1447,24 @@
                 <additionalparam>-Xdoclint:all,-Xdoclint:-missing</additionalparam>
               </configuration>
             </plugin>
-            <plugin>
-              <groupId>net.revelc.code</groupId>
-              <artifactId>warbucks-maven-plugin</artifactId>
-              <version>1.0.0</version>
-            </plugin>
           </plugins>
         </pluginManagement>
         <plugins>
           <plugin>
+            <!-- verify before compile; should be sorted already -->
+            <groupId>com.github.ekryd.sortpom</groupId>
+            <artifactId>sortpom-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>verify-sorted-pom</id>
+                <goals>
+                  <goal>verify</goal>
+                </goals>
+                <phase>process-resources</phase>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
             <groupId>net.revelc.code</groupId>
             <artifactId>warbucks-maven-plugin</artifactId>
             <executions>

-- 
To stop receiving notification emails like this one, please contact
ctubbsii@apache.org.

Mime
View raw message