accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [accumulo] branch main updated: Validate formatting in CI and releases (#1767)
Date Tue, 03 Nov 2020 23:58:41 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
     new de7b42f  Validate formatting in CI and releases (#1767)
de7b42f is described below

commit de7b42f1c529b6475eabfbe0516ad652c543fa81
Author: Christopher Tubbs <ctubbsii@apache.org>
AuthorDate: Tue Nov 3 18:58:31 2020 -0500

    Validate formatting in CI and releases (#1767)
    
    * Validate formatting in CI and releases
    * List files in console output for rat check
---
 .github/workflows/maven-full-its.yaml  |  2 +-
 .github/workflows/maven-on-demand.yaml |  2 +-
 .github/workflows/maven.yaml           |  6 ++--
 pom.xml                                | 66 +++++++++++++++++++++++++++++++++-
 4 files changed, 70 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/maven-full-its.yaml b/.github/workflows/maven-full-its.yaml
index 4e311f4..9a8fa58 100644
--- a/.github/workflows/maven-full-its.yaml
+++ b/.github/workflows/maven-full-its.yaml
@@ -61,7 +61,7 @@ jobs:
     - name: Show the first log message
       run: git log -n1
     - name: Build with Maven (Fast Build)
-      run: mvn -B -V -e -ntp "-Dstyle.color=always" clean package dependency:resolve -PskipQA
+      run: mvn -B -V -e -ntp "-Dstyle.color=always" clean package dependency:resolve -DskipTests
-DskipFormat -DverifyFormat
       env:
         MAVEN_OPTS: -Djansi.force=true
   creatematrix:
diff --git a/.github/workflows/maven-on-demand.yaml b/.github/workflows/maven-on-demand.yaml
index 0315ed3..e0708c1 100644
--- a/.github/workflows/maven-on-demand.yaml
+++ b/.github/workflows/maven-on-demand.yaml
@@ -52,7 +52,7 @@ on:
       addOpts:
         description: Additional options
         required: true
-        default: -Dspotbugs.skip -Dcheckstyle.skip
+        default: -Dspotbugs.skip -Dcheckstyle.skip -DskipFormat -DverifyFormat
 
 jobs:
   mvn:
diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml
index c14acb8..2c16fa7 100644
--- a/.github/workflows/maven.yaml
+++ b/.github/workflows/maven.yaml
@@ -51,7 +51,7 @@ jobs:
     - name: Show the first log message
       run: git log -n1
     - name: Build with Maven (Fast Build)
-      run: mvn -B -V -e -ntp "-Dstyle.color=always" clean package dependency:resolve -PskipQA
+      run: mvn -B -V -e -ntp "-Dstyle.color=always" clean package dependency:resolve -DskipTests
-DskipFormat -DverifyFormat
       env:
         MAVEN_OPTS: -Djansi.force=true
   # more complete builds with tests
@@ -61,7 +61,7 @@ jobs:
       matrix:
         profile:
           - {name: 'unit-tests',    args: 'verify -PskipQA -DskipTests=false'}
-          - {name: 'qa-checks',     args: 'verify javadoc:jar -Psec-bugs -DskipTests=true
-Dspotbugs.timeout=3600000'}
+          - {name: 'qa-checks',     args: 'verify javadoc:jar -Psec-bugs -DskipTests -Dspotbugs.timeout=3600000'}
           - {name: 'hadoop-compat', args: 'package -DskipTests -Dhadoop.version=3.0.3'}
       fail-fast: false
     timeout-minutes: 60
@@ -81,7 +81,7 @@ jobs:
         key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
         restore-keys: ${{ runner.os }}-m2
     - name: Build with Maven (${{ matrix.profile.name }})
-      run: mvn -B -V -e -ntp "-Dstyle.color=always" ${{ matrix.profile.args }}
+      run: mvn -B -V -e -ntp "-Dstyle.color=always" -DskipFormat ${{ matrix.profile.args
}}
       env:
         MAVEN_OPTS: -Djansi.force=true
     - name: Upload unit test results
diff --git a/pom.xml b/pom.xml
index ba39330..59717b6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -141,6 +141,7 @@
     <powermock.version>2.0.7</powermock.version>
     <!-- timestamp for reproducible outputs, updated on release by the release plugin
-->
     <project.build.outputTimestamp>2020-08-27T15:56:15Z</project.build.outputTimestamp>
+    <rat.consoleOutput>true</rat.consoleOutput>
     <!-- surefire/failsafe plugin option -->
     <reuseForks>false</reuseForks>
     <slf4j.version>1.7.30</slf4j.version>
@@ -939,7 +940,7 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-release-plugin</artifactId>
           <configuration>
-            <arguments>-P !autoformat,thrift -DskipTests</arguments>
+            <arguments>-P !autoformat,verifyformat,thrift -DskipTests</arguments>
             <autoVersionSubmodules>true</autoVersionSubmodules>
             <goals>clean deploy</goals>
             <preparationGoals>clean package</preparationGoals>
@@ -1506,6 +1507,69 @@
       </build>
     </profile>
     <profile>
+      <!-- off by default, but enable with '-P verifyformat' or '-DverifyFormat' -->
+      <id>verifyformat</id>
+      <activation>
+        <property>
+          <name>verifyFormat</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.github.ekryd.sortpom</groupId>
+            <artifactId>sortpom-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>sort-pom</id>
+                <goals>
+                  <goal>verify</goal>
+                </goals>
+                <phase>process-sources</phase>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>com.mycila</groupId>
+            <artifactId>license-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>license-headers</id>
+                <goals>
+                  <goal>check</goal>
+                </goals>
+                <phase>process-test-resources</phase>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>net.revelc.code.formatter</groupId>
+            <artifactId>formatter-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>format-java-source</id>
+                <goals>
+                  <goal>validate</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>net.revelc.code</groupId>
+            <artifactId>impsort-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>sort-imports</id>
+                <goals>
+                  <goal>check</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
       <!-- on by default, but disable with '-P !autoformat' or '-DskipFormat' -->
       <id>autoformat</id>
       <activation>


Mime
View raw message