You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@yetus.apache.org by aw...@apache.org on 2020/10/31 05:19:05 UTC

[yetus] branch YETUS-1034-release updated (097eee1 -> 879f861)

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

aw pushed a change to branch YETUS-1034-release
in repository https://gitbox.apache.org/repos/asf/yetus.git.


    from 097eee1  YETUS-1044. jars are not getting signed with build-and-sign (#173)
     new 168194c  YETUS-1046. remove jython releasedocmaker and shelldocs (#174)
     new 27c6f54  YETUS-1056. blanks gives wrong advice (#181)
     new af2efc1  YETUS-1047. Replace yetus-minimaven-plugin with yetus-maven-plugin (#175)
     new 0ae897d  YETUS-1050. perlcritic should not force --brutal (#176)
     new 776481b  YETUS-889. change golangci-lint to give all output (#177)
     new 3b0e098  YETUS-1053. Add Apache Creadur RAT to the docker image (#179)
     new 89dede6  YETUS-1055. Add test code for yetuslib (#180)
     new 19e57f3  YETUS-1043. github action website linkchecker doesn't work for releases (#182)
     new 93fd431  YETUS-1061. remove github user and password support (#183)
     new 879f861  YETUS-1061. remove github user and password support (addendum) (#187)

The 10 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 asf-site-src/pom.xml                               |   2 +-
 .../in-progress/precommit/bugsystems.html.md       |  14 +-
 .../precommit/plugins/asflicense.html.md           |   6 +-
 .../in-progress/precommit/plugins/github.html.md   |   2 -
 .../precommit/plugins/golangcilint.html.md         |   2 +-
 .../in-progress/releasedocmaker.html.md            |   3 +-
 .../in-progress/yetus-maven-plugin.html.md         |  82 +-----
 pom.xml                                            |   4 +-
 precommit/pom.xml                                  |   2 +-
 precommit/src/main/shell/core.d/00-yetuslib.sh     |  12 +-
 .../src/main/shell/test-patch-docker/Dockerfile    |  12 +
 .../src/main/shell/test-patch.d/asflicense.sh      |   4 +-
 precommit/src/main/shell/test-patch.d/blanks.sh    |   2 +-
 precommit/src/main/shell/test-patch.d/github.sh    |  28 ---
 precommit/src/main/shell/test-patch.d/golangci.sh  |   6 +-
 .../src/main/shell/test-patch.d/perlcritic.sh      |   4 +-
 .../src/main/shell/test-patch.d/shellcheck.sh      |   4 +
 .../src/test/resources/arrayfiletest.txt           |   4 +
 .../src/test/shell/functions_test_helper.bash      |   5 +-
 precommit/src/test/shell/run-bats.sh               |   2 +-
 precommit/src/test/shell/yetus_abs.bats            |  66 +++++
 .../src/test/shell/yetus_add_array_element.bats    |   1 +
 precommit/src/test/shell/yetus_array_contains.bats |   1 +
 .../shell/yetus_array_to_comma.bats}               |  35 ++-
 .../src/test/shell/yetus_del_array_element.bats    |   5 +-
 ...array_element.bats => yetus_file_to_array.bats} |  29 +--
 .../test/shell/yetus_find_deepest_directory.bats   |  74 ++++++
 precommit/src/test/shell/yetus_relative_dir.bats   |  69 ++++++
 ...tains.bats => yetus_sort_and_unique_array.bats} |  47 ++--
 ...s_array_contains.bats => yetus_sort_array.bats} |  51 ++--
 releasedocmaker/pom.xml                            |  58 +----
 .../src/main/assemblies/jar-with-dependencies.xml  |  46 ----
 .../yetus/releasedocmaker/ReleaseDocMaker.java     |  62 -----
 shelldocs/pom.xml                                  |  52 +---
 .../java/org/apache/yetus/shelldocs/ShellDocs.java |  62 -----
 website-tester.sh                                  |   2 +-
 yetus-dist/pom.xml                                 |   2 +-
 yetus-maven-plugin/pom.xml                         |  67 -----
 .../src/main/assemblies/yetus-maven-plugin.xml     |  44 ----
 .../maven/plugin/fileops/CreateSymLinkMojo.java    |   0
 .../yetus/maven/plugin/fileops/MakeBins4Libs.java  |   0
 .../maven/plugin/rdm/ReleaseDocMakerMojo.java      | 274 ---------------------
 .../yetus/maven/plugin/rdm/package-info.java       |  22 --
 .../maven/plugin/shelldocs/ShellDocsMojo.java      | 106 --------
 .../yetus/maven/plugin/shelldocs/package-info.java |  22 --
 .../org/apache/yetus/maven/plugin/utils/Utils.java | 137 -----------
 .../yetus/maven/plugin/utils/package-info.java     |  22 --
 .../src/main/resources/licenses/ASL20.txt          |   0
 yetus-minimaven-plugin/pom.xml                     |  88 -------
 .../yetus/maven/plugin/fileops/package-info.java   |  22 --
 50 files changed, 368 insertions(+), 1298 deletions(-)
 copy yetus-minimaven-plugin/src/main/resources/licenses/ASL20.txt => precommit/src/test/resources/arrayfiletest.txt (99%)
 create mode 100755 precommit/src/test/shell/yetus_abs.bats
 copy precommit/src/{main/shell/personality/bigtop.sh => test/shell/yetus_array_to_comma.bats} (64%)
 copy precommit/src/test/shell/{yetus_add_array_element.bats => yetus_file_to_array.bats} (61%)
 create mode 100755 precommit/src/test/shell/yetus_find_deepest_directory.bats
 create mode 100755 precommit/src/test/shell/yetus_relative_dir.bats
 copy precommit/src/test/shell/{yetus_array_contains.bats => yetus_sort_and_unique_array.bats} (50%)
 copy precommit/src/test/shell/{yetus_array_contains.bats => yetus_sort_array.bats} (50%)
 delete mode 100644 releasedocmaker/src/main/assemblies/jar-with-dependencies.xml
 delete mode 100644 releasedocmaker/src/main/java/org/apache/yetus/releasedocmaker/ReleaseDocMaker.java
 delete mode 100644 shelldocs/src/main/java/org/apache/yetus/shelldocs/ShellDocs.java
 delete mode 100644 yetus-maven-plugin/src/main/assemblies/yetus-maven-plugin.xml
 rename {yetus-minimaven-plugin => yetus-maven-plugin}/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateSymLinkMojo.java (100%)
 rename {yetus-minimaven-plugin => yetus-maven-plugin}/src/main/java/org/apache/yetus/maven/plugin/fileops/MakeBins4Libs.java (100%)
 delete mode 100644 yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/ReleaseDocMakerMojo.java
 delete mode 100644 yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/package-info.java
 delete mode 100644 yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/shelldocs/ShellDocsMojo.java
 delete mode 100644 yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/shelldocs/package-info.java
 delete mode 100644 yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/Utils.java
 delete mode 100644 yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/package-info.java
 rename {yetus-minimaven-plugin => yetus-maven-plugin}/src/main/resources/licenses/ASL20.txt (100%)
 delete mode 100644 yetus-minimaven-plugin/pom.xml
 delete mode 100644 yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java


[yetus] 01/10: YETUS-1046. remove jython releasedocmaker and shelldocs (#174)

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch YETUS-1034-release
in repository https://gitbox.apache.org/repos/asf/yetus.git

commit 168194c7f8ab441d05ca549b159d9a0adbdfb978
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Mon Oct 26 09:13:24 2020 -0700

    YETUS-1046. remove jython releasedocmaker and shelldocs (#174)
---
 .../in-progress/releasedocmaker.html.md            |   3 +-
 .../in-progress/yetus-maven-plugin.html.md         |  82 +-----
 releasedocmaker/pom.xml                            |  58 +----
 .../src/main/assemblies/jar-with-dependencies.xml  |  46 ----
 .../yetus/releasedocmaker/ReleaseDocMaker.java     |  62 -----
 shelldocs/pom.xml                                  |  50 +---
 .../java/org/apache/yetus/shelldocs/ShellDocs.java |  62 -----
 yetus-maven-plugin/pom.xml                         |  12 -
 .../maven/plugin/rdm/ReleaseDocMakerMojo.java      | 274 ---------------------
 .../yetus/maven/plugin/rdm/package-info.java       |  22 --
 .../maven/plugin/shelldocs/ShellDocsMojo.java      | 106 --------
 .../yetus/maven/plugin/shelldocs/package-info.java |  22 --
 12 files changed, 6 insertions(+), 793 deletions(-)

diff --git a/asf-site-src/source/documentation/in-progress/releasedocmaker.html.md b/asf-site-src/source/documentation/in-progress/releasedocmaker.html.md
index 82d1e42..c946c3b 100644
--- a/asf-site-src/source/documentation/in-progress/releasedocmaker.html.md
+++ b/asf-site-src/source/documentation/in-progress/releasedocmaker.html.md
@@ -231,7 +231,8 @@ This will do the normal JIRA querying, looking for items it considers problemati
 
 # Index Mode
 
-There is basic support for an autoindexer.  It will create two files that contain links to all directories that have a major.minor*-style version numbering system.
+There is basic support for an autoindexer.  It will create two files that contain links to all directories that have a major.minor\*-style
+version numbering system.
 For example directories with names like 0.6, 1.2.2, 1.2alpha etc. will all be linked.
 
 * `index.md`: a file suitable for conversion to HTML via mvn site
diff --git a/asf-site-src/source/documentation/in-progress/yetus-maven-plugin.html.md b/asf-site-src/source/documentation/in-progress/yetus-maven-plugin.html.md
index ada3868..8928c2e 100644
--- a/asf-site-src/source/documentation/in-progress/yetus-maven-plugin.html.md
+++ b/asf-site-src/source/documentation/in-progress/yetus-maven-plugin.html.md
@@ -26,8 +26,6 @@
   * [bin4libs](#bin4libs)
   * [symlink](#symlink)
   * [parallel-mkdirs](#parallel-mkdirs)
-* [releasedocmaker](#releasedocmaker)
-* [shelldocs](#shelldocs)
 
 <!-- /MarkdownTOC -->
 
@@ -87,7 +85,8 @@ The wrapper as written above makes sure that nearly all forms of referencing (re
 
 ### Licenses
 
-The `license` field translates to `licenses/NAME.txt` as the name of the file to load from the CLASSPATH.  The `ASL20` license is the Apache Software License v2.0.
+The `license` field translates to `licenses/NAME.txt` as the name of the file to load from the CLASSPATH.
+The `ASL20` license is the Apache Software License v2.0.
 
 If no license is wanted, then set `license` to the string `none`.
 
@@ -157,80 +156,3 @@ Available configuration options:
 | `goal` | the goal to use to create the directories | `generate-test-resources` |
 
 By default, `forkCount` is inherited from surefire and therefore follows the same rules as described in its [documentation](https://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html).  Of special note is that 'C' (aka core) values are honored.
-
-# releasedocmaker
-
-This goal runs releasedocmaker without the need to download or build an Apache Yetus tarball.  Instead, yetus-maven-plugin contains all the necessary components in a native maven way!
-
-```xml
-      <plugin>
-        <groupId>org.apache.yetus</groupId>
-        <artifactId>yetus-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>rdm</id>
-            <phase>pre-site</phase>
-            <goals>
-              <goal>releasedocmaker</goal>
-            </goals>
-            <configuration>
-              <projects>
-                <project>HADOOP</project>
-                <project>HDFS</project>
-                <project>MAPRED</project>
-                <project>YARN</project>
-              </projects>
-            </configuration>
-          </execution>
-        </plugin>
-```
-
-The configuration options generally map 1:1 to the `releasedocmaker` executable's options.  Unless otherwise specified, defaults are set by the actual executable.
-
-| Option | Description | Default |
-|--------|-------------|---------|
-| `baseUrl` | --baseurl | |
-| `dirversions` | boolean; same as --dirversions | false |
-| `fileversions` | boolean; same as --fileversions | false |
-| `incompatibleLabel` | --incompatiblelabel | |
-| `index` | boolean; --index | false  |
-| `license` | boolean; --license | false |
-| `lintFilters` | ArrayList; --lint | |
-| `outputDir` | --outputdir | `${project.build.directory}/generated-site/markdown` |
-| `projects` | ArrayList; --projects | `${project.name}` |
-| `projectTitle` | --projecttitle | |
-| `range` | boolean; --range | false |
-| `retries` | integer; --retries | |
-| `skipcredits` | boolean; --skipcredits | false |
-| `sortorder` | --sortorder | |
-| `sorttype` | --sorttype | |
-| `useToday` | --usetoday | false |
-| `versions` | ArrayList; --versions | `${project.version}` |
-
-# shelldocs
-
-Similar to the `releasedocmaker` goal, the `shelldocs` goal runs the Apache Yetus `shelldocs` utility against a given set of input files or directories and generates a single output MultiMarkdown file:
-
-```xml
-      <plugin>
-        <groupId>org.apache.yetus</groupId>
-        <artifactId>yetus-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>shelldocs</id>
-            <phase>pre-site</phase>
-            <goals>
-              <goal>shelldocs</goal>
-            </goals>
-          </execution>
-        </plugin>
-```
-
-The configuration options generally map 1:1 to the `shelldocs` executable's options.  Unless otherwise specified, defaults are set by the actual executable.
-
-| Option | Description | Default |
-|--------|-------------|---------|
-| `lint` | boolean; --lint | false |
-| `output` | --output | `${project.build.directory}/generated-site/markdown/${project.name}.md` |
-| `inputs` | ArrayList; --input ... | *sh files located in`${project.basedir}/src/main/shell` |
-| `skipprnorep` | --skipprnorep | false |
diff --git a/releasedocmaker/pom.xml b/releasedocmaker/pom.xml
index 6836e72..cb09b2a 100644
--- a/releasedocmaker/pom.xml
+++ b/releasedocmaker/pom.xml
@@ -31,20 +31,7 @@
   <artifactId>releasedocmaker</artifactId>
   <description>JIRA-based Changelog and Release Notes Generator</description>
   <name>Apache Yetus - releasedocmaker</name>
-  <packaging>jar</packaging>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.python</groupId>
-      <artifactId>jython-slim</artifactId>
-      <version>${jython-slim.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.yetus</groupId>
-      <artifactId>audience-annotations</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-  </dependencies>
+  <packaging>pom</packaging>
 
   <build>
     <resources>
@@ -54,10 +41,6 @@
     </resources>
 
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-      </plugin>
 
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
@@ -100,45 +83,6 @@
             </configuration>
           </execution>
 
-          <execution>
-            <id>make-jar-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <archive>
-                <manifest>
-                  <mainClass>org.apache.yetus.releasedocmaker.ReleaseDocMaker</mainClass>
-                </manifest>
-              </archive>
-              <descriptors>
-                <descriptor>src/main/assemblies/jar-with-dependencies.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>net.sf.mavenjython</groupId>
-        <artifactId>jython-compile-maven-plugin</artifactId>
-        <version>${jython-compile-maven-plugin.version}</version>
-        <executions>
-          <execution>
-            <phase>compile</phase>
-            <goals>
-              <goal>jython</goal>
-            </goals>
-            <configuration>
-              <temporaryBuildDirectory>${project.build.directory}/jython-plugins-tmp/</temporaryBuildDirectory>
-              <libraries>
-                <param>--index-url=https://pypi.python.org/simple/</param>
-                <param>python-dateutil</param>
-              </libraries>
-            </configuration>
-          </execution>
         </executions>
       </plugin>
 
diff --git a/releasedocmaker/src/main/assemblies/jar-with-dependencies.xml b/releasedocmaker/src/main/assemblies/jar-with-dependencies.xml
deleted file mode 100644
index 6236faf..0000000
--- a/releasedocmaker/src/main/assemblies/jar-with-dependencies.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<assembly xmlns="https://maven.apache.org/ASSEMBLY/2.0.0"
-  xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="https://maven.apache.org/ASSEMBLY/2.0.0 https://maven.apache.org/xsd/assembly-2.0.0.xsd">
-  <!-- TODO: a jarjar format would be better -->
-  <id>jar-with-dependencies</id>
-  <formats>
-    <format>jar</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <dependencySets>
-    <dependencySet>
-      <outputDirectory>/</outputDirectory>
-      <useProjectArtifact>true</useProjectArtifact>
-      <unpack>true</unpack>
-      <scope>runtime</scope>
-    </dependencySet>
-  </dependencySets>
-  <fileSets>
-    <fileSet>
-      <directory>${project.build.directory}/jython-plugins-tmp/Lib/site-packages</directory>
-      <outputDirectory>Lib</outputDirectory>
-      <includes>
-        <include>**</include>
-      </includes>
-    </fileSet>
-  </fileSets>
-</assembly>
diff --git a/releasedocmaker/src/main/java/org/apache/yetus/releasedocmaker/ReleaseDocMaker.java b/releasedocmaker/src/main/java/org/apache/yetus/releasedocmaker/ReleaseDocMaker.java
deleted file mode 100644
index 1b6e8db..0000000
--- a/releasedocmaker/src/main/java/org/apache/yetus/releasedocmaker/ReleaseDocMaker.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.yetus.releasedocmaker;
-
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.python.core.Py;
-import org.python.core.PyException;
-import org.python.core.PySystemState;
-import org.python.util.PythonInterpreter;
-
-import org.apache.yetus.audience.InterfaceAudience;
-import org.apache.yetus.audience.InterfaceStability;
-
-/**
- * Jython-based interface to releasedocmaker.
- */
-
-public class ReleaseDocMaker {
-  /**
-   *
-   * This method calls the main() method of the shelldocs Python program.
-   *
-   * @param args argument string
-   * @throws PyException standard exception thrown for Jython
-   */
-
-  @InterfaceAudience.Public
-  @InterfaceStability.Evolving
-  public static void main(final String[] args) throws PyException {
-    List<String> list = new LinkedList<String>(Arrays.asList(args));
-    list.add(0,"releasedocmaker");
-    String[] newargs = list.toArray(new String[list.size()]);
-    PythonInterpreter.initialize(System.getProperties(), System.getProperties(), newargs);
-    PySystemState systemState = Py.getSystemState();
-    PythonInterpreter interpreter = new PythonInterpreter();
-    systemState.__setattr__("_jy_interpreter", Py.java2py(interpreter));
-    String command = "try:\n "
-                     + "  import releasedocmaker\n "
-                     + "  releasedocmaker.main()\n"
-                     + "except "
-                     + "  SystemExit: pass";
-    interpreter.exec(command);
-  }
-}
diff --git a/shelldocs/pom.xml b/shelldocs/pom.xml
index 5226dc9..c44741d 100644
--- a/shelldocs/pom.xml
+++ b/shelldocs/pom.xml
@@ -31,20 +31,7 @@
   <artifactId>shelldocs</artifactId>
   <description>API Documentation for Shell Scripts</description>
   <name>Apache Yetus - shelldocs</name>
-  <packaging>jar</packaging>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.python</groupId>
-      <artifactId>jython-slim</artifactId>
-      <version>${jython-slim.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.yetus</groupId>
-      <artifactId>audience-annotations</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-  </dependencies>
+  <packaging>pom</packaging>
 
   <build>
 
@@ -57,23 +44,6 @@
     <plugins>
 
       <plugin>
-        <groupId>net.sf.mavenjython</groupId>
-        <artifactId>jython-compile-maven-plugin</artifactId>
-        <version>${jython-compile-maven-plugin.version}</version>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>jython</goal>
-            </goals>
-            <configuration>
-              <temporaryBuildDirectory>${project.build.directory}/jython-plugins-tmp/</temporaryBuildDirectory>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
         <dependencies>
           <dependency>
@@ -86,24 +56,6 @@
         <executions>
 
           <execution>
-            <id>make-jar-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <archive>
-                <manifest>
-                  <mainClass>org.apache.yetus.shelldocs.ShellDocs</mainClass>
-                </manifest>
-              </archive>
-              <descriptorRefs>
-                <descriptorRef>jar-with-dependencies</descriptorRef>
-              </descriptorRefs>
-            </configuration>
-          </execution>
-
-          <execution>
             <id>build</id>
             <phase>prepare-package</phase>
             <goals>
diff --git a/shelldocs/src/main/java/org/apache/yetus/shelldocs/ShellDocs.java b/shelldocs/src/main/java/org/apache/yetus/shelldocs/ShellDocs.java
deleted file mode 100644
index 0ed6eff..0000000
--- a/shelldocs/src/main/java/org/apache/yetus/shelldocs/ShellDocs.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.yetus.shelldocs;
-
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.python.core.Py;
-import org.python.core.PyException;
-import org.python.core.PySystemState;
-import org.python.util.PythonInterpreter;
-
-import org.apache.yetus.audience.InterfaceAudience;
-import org.apache.yetus.audience.InterfaceStability;
-
-/**
- * Jython-based interface to shelldocs.
- */
-
-public class ShellDocs {
-  /**
-   *
-   * This method calls the main() method of the shelldocs Python program.
-   *
-   * @param args argument string
-   * @throws PyException standard exception thrown for Jython
-   */
-
-  @InterfaceAudience.Public
-  @InterfaceStability.Evolving
-  public static void main(final String[] args) throws PyException {
-    List<String> list = new LinkedList<String>(Arrays.asList(args));
-    list.add(0,"shelldocs");
-    String[] newargs = list.toArray(new String[list.size()]);
-    PythonInterpreter.initialize(System.getProperties(), System.getProperties(), newargs);
-    PySystemState systemState = Py.getSystemState();
-    PythonInterpreter interpreter = new PythonInterpreter();
-    systemState.__setattr__("_jy_interpreter", Py.java2py(interpreter));
-    String command = "try:\n"
-                   + "  import shelldocs\n"
-                   + "  shelldocs.main()\n"
-                   + "except"
-                   + "  SystemExit: pass";
-    interpreter.exec(command);
-  }
-}
diff --git a/yetus-maven-plugin/pom.xml b/yetus-maven-plugin/pom.xml
index 0069d95..f3e2e47 100644
--- a/yetus-maven-plugin/pom.xml
+++ b/yetus-maven-plugin/pom.xml
@@ -56,18 +56,6 @@
       <version>${maven.api.version}</version>
       <scope>provided</scope>
     </dependency>
-    <dependency>
-        <groupId>org.apache.yetus</groupId>
-        <artifactId>releasedocmaker</artifactId>
-        <version>${project.version}</version>
-        <classifier>jar-with-dependencies</classifier>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.yetus</groupId>
-        <artifactId>shelldocs</artifactId>
-        <version>${project.version}</version>
-        <classifier>jar-with-dependencies</classifier>
-    </dependency>
   </dependencies>
 
   <build>
diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/ReleaseDocMakerMojo.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/ReleaseDocMakerMojo.java
deleted file mode 100644
index c1c9810..0000000
--- a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/ReleaseDocMakerMojo.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.yetus.maven.plugin.rdm;
-
-import java.io.File;
-import java.util.ArrayList;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-
-import org.apache.yetus.audience.InterfaceAudience;
-import org.apache.yetus.audience.InterfaceStability;
-import org.apache.yetus.releasedocmaker.ReleaseDocMaker;
-
-/**
- * Goal which executes releasedocmaker.
- */
-@Mojo(name = "releasedocmaker",
-      defaultPhase = LifecyclePhase.PRE_SITE,
-        threadSafe = true)
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
-public final class ReleaseDocMakerMojo extends AbstractMojo {
-
-  /**
-   * Location of output.
-   */
-  @Parameter
-  private String baseUrl;
-
-  /**
-   * Location of the dirName.
-   */
-  @Parameter(defaultValue = "${project.build.directory}")
-  private File buildDir;
-
-  /**
-   * Create diretory versions.
-   */
-  @Parameter(defaultValue = "false")
-  private Boolean dirversions;
-
-  /**
-   * Allow empty files.
-   */
-  @Parameter(defaultValue = "false")
-  private Boolean empty;
-
-  /**
-   * Create file versions.
-   */
-  @Parameter(defaultValue = "false")
-  private Boolean fileversions;
-
-  /**
-   * label for incompatible issues.
-   */
-  @Parameter
-  private String incompatibleLabel;
-
-  /**
-   * Create an index.
-   */
-  @Parameter(defaultValue = "false")
-  private Boolean index;
-
-  /**
-   * Put the ASF License on generated files.
-   */
-  @Parameter(defaultValue = "false")
-  private Boolean license;
-
-  /**
-   * Run in --lint mode.
-   */
-  @Deprecated
-  @Parameter(defaultValue = "false")
-  private Boolean lint;
-
-  /**
-   * lint filters.
-   */
-  @Parameter
-  private String[] lintFilters;
-
-  /**
-   * Location of output.
-   */
-  @Parameter(defaultValue = "${project.build.directory}/generated-site/markdown")
-  private String outputDir;
-
-  /**
-   * Put the ASF License on generated files.
-   */
-  @Parameter(defaultValue = "${project.name}")
-  private String[] projects;
-
-  /**
-   * Title of project.
-   */
-  @Parameter
-  private String projectTitle;
-
-  /**
-   * Treat versions as a range.
-   */
-  @Parameter(defaultValue = "false")
-  private Boolean range;
-
-  /**
-   * Number of times to retry the HTTPS connection.
-   */
-  @Parameter
-  private Integer retries;
-
-  /**
-   * Drop reporter/assignee.
-   */
-  @Parameter(defaultValue = "false")
-  private Boolean skipcredits;
-
-  /**
-   * Set the sort order.
-   */
-  @Parameter
-  private String sortorder;
-
-  /**
-   * Set the type order.
-   */
-  @Parameter
-  private String sorttype;
-
-
-  /**
-   * Use today.
-   */
-  @Parameter(defaultValue = "false")
-  private Boolean useToday;
-
-  /**
-   * Version to generate.
-   */
-  @Parameter(defaultValue = "${project.version}")
-  private String[] versions;
-
-  /**
-   * Build our argument list to pass to the executor.
-   */
-  private ArrayList<String> argList = new ArrayList<String>();
-
-  /**
-   * Execute our plugin.
-   * @throws MojoExecutionException  an error occurred
-   */
-  @InterfaceAudience.Private
-  @InterfaceStability.Unstable
-  public void execute() throws MojoExecutionException {
-
-    buildArgs();
-    String[] args = argList.toArray(new String[0]);
-
-    ReleaseDocMaker rdm = new ReleaseDocMaker();
-    rdm.main(args);
-  }
-
-
-  /**
-   * Based upon what we got from maven, build our rdm command line params.
-   */
-  private void buildArgs() {
-
-    if (baseUrl != null) {
-      argList.add("--baseurl");
-      argList.add(baseUrl);
-    }
-
-    if (dirversions) {
-      argList.add("--dirversions");
-    }
-
-    if (empty) {
-      argList.add("--empty");
-    }
-
-    if (fileversions) {
-      argList.add("--fileversions");
-    }
-
-    if (incompatibleLabel != null) {
-      argList.add("--incompatiblelabel");
-      argList.add(incompatibleLabel);
-    }
-
-    if (index) {
-      argList.add("--index");
-    }
-
-    if (license) {
-      argList.add("--license");
-    }
-
-    if (lint) {
-      argList.add("--lint");
-      argList.add("all");
-    }
-
-    for (String f: lintFilters) {
-      argList.add("--lint");
-      argList.add(f);
-    }
-
-    argList.add("--outputdir");
-    argList.add(outputDir);
-
-    for (String p: projects) {
-      argList.add("--project");
-      argList.add(p);
-    }
-
-    if (projectTitle != null) {
-      argList.add("--projecttitle");
-      argList.add(projectTitle);
-    }
-
-    if (range) {
-      argList.add("--range");
-    }
-
-    if (retries != null) {
-      argList.add("--retries");
-      argList.add(retries.toString());
-    }
-
-    if (skipcredits) {
-      argList.add("--skipcredits");
-    }
-
-    if (sortorder != null) {
-      argList.add("--sortorder");
-      argList.add(sortorder);
-    }
-
-    if (sorttype != null) {
-      argList.add("--sorttype");
-      argList.add(sorttype);
-    }
-
-    if (useToday) {
-      argList.add("--usetoday");
-    }
-
-    for (String v: versions) {
-      argList.add("--version");
-      argList.add(v);
-    }
-
-  }
-
-}
diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/package-info.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/package-info.java
deleted file mode 100644
index 04067bd..0000000
--- a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Utilities for running releasedocmaker.
- */
-package org.apache.yetus.maven.plugin.rdm;
diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/shelldocs/ShellDocsMojo.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/shelldocs/ShellDocsMojo.java
deleted file mode 100644
index 05bd59f..0000000
--- a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/shelldocs/ShellDocsMojo.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.yetus.maven.plugin.shelldocs;
-
-import java.util.ArrayList;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-
-import org.apache.yetus.audience.InterfaceAudience;
-import org.apache.yetus.audience.InterfaceStability;
-import org.apache.yetus.shelldocs.ShellDocs;
-
-/**
- * Goal which executes releasedocmaker.
- */
-@Mojo(name = "shelldocs",
-      defaultPhase = LifecyclePhase.PRE_SITE,
-        threadSafe = true)
-@InterfaceAudience.Private
-@InterfaceStability.Unstable
-public final class ShellDocsMojo extends AbstractMojo {
-
-  /**
-   * Run in --lint mode.
-   */
-  @Parameter(defaultValue = "false")
-  private Boolean lint;
-
-  /**
-   * Run in --skipprnorep mode.
-   */
-  @Parameter(defaultValue = "false")
-  private Boolean skipprnorep;
-
-  /**
-   * Location of output.
-   */
-  @Parameter(defaultValue = "${project.build.directory}/generated-site/markdown/${project.name}.md")
-  private String output;
-
-  /**
-   * Version to generate.
-   */
-  @Parameter(defaultValue = "${project.basedir}/src/main/shell")
-  private String[] inputs;
-
-  /**
-   * Build our argument list to pass to the executor.
-   */
-  private ArrayList<String> argList = new ArrayList<String>();
-
-  /**
-   * Execute our plugin.
-   * @throws MojoExecutionException  an error occurred
-   */
-  @InterfaceAudience.Private
-  @InterfaceStability.Unstable
-  public void execute() throws MojoExecutionException {
-
-    buildArgs();
-    String[] args = argList.toArray(new String[0]);
-
-    ShellDocs shelldocs = new ShellDocs();
-    shelldocs.main(args);
-  }
-
-
-  /**
-   * Based upon what we got from maven, build our shelldocs command line params.
-   */
-  private void buildArgs() {
-
-    if (lint) {
-      argList.add("--lint");
-    }
-
-    argList.add("--output");
-    argList.add(output);
-
-    for (String p: inputs) {
-      argList.add("--input");
-      argList.add(p);
-    }
-
-    if (skipprnorep) {
-      argList.add("--skipprnorep");
-    }
-
-  }
-
-}
diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/shelldocs/package-info.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/shelldocs/package-info.java
deleted file mode 100644
index 1a83c36..0000000
--- a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/shelldocs/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Utilities for running releasedocmaker.
- */
-package org.apache.yetus.maven.plugin.shelldocs;


[yetus] 02/10: YETUS-1056. blanks gives wrong advice (#181)

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch YETUS-1034-release
in repository https://gitbox.apache.org/repos/asf/yetus.git

commit 27c6f54b65e965e05e807ad6c3c3fb901b80b59a
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Wed Oct 28 10:22:59 2020 -0700

    YETUS-1056. blanks gives wrong advice (#181)
    
    Signed-off-by: Sean Busbey <bu...@apache.org>
---
 precommit/src/main/shell/test-patch.d/blanks.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/precommit/src/main/shell/test-patch.d/blanks.sh b/precommit/src/main/shell/test-patch.d/blanks.sh
index ad9f728..3865eaf 100755
--- a/precommit/src/main/shell/test-patch.d/blanks.sh
+++ b/precommit/src/main/shell/test-patch.d/blanks.sh
@@ -174,7 +174,7 @@ function blanks_postcompile
     else
       add_vote_table_v2 -1 blanks \
         "@@BASE@@/blanks-eol.txt" \
-        "${BUILDMODEMSG} has ${count} line(s) that end in blanks. Use git apply --blanks=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply"
+        "${BUILDMODEMSG} has ${count} line(s) that end in blanks. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply"
     fi
 
     if [[ -n "${BUGLINECOMMENTS}" ]]; then


[yetus] 06/10: YETUS-1053. Add Apache Creadur RAT to the docker image (#179)

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch YETUS-1034-release
in repository https://gitbox.apache.org/repos/asf/yetus.git

commit 3b0e0983d6daf32114e2a85bb7a15add372a81be
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Thu Oct 29 10:29:16 2020 -0700

    YETUS-1053. Add Apache Creadur RAT to the docker image (#179)
---
 .../in-progress/precommit/plugins/asflicense.html.md         |  6 ++++--
 precommit/src/main/shell/test-patch-docker/Dockerfile        | 12 ++++++++++++
 precommit/src/main/shell/test-patch.d/asflicense.sh          |  4 +++-
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/asf-site-src/source/documentation/in-progress/precommit/plugins/asflicense.html.md b/asf-site-src/source/documentation/in-progress/precommit/plugins/asflicense.html.md
index b7c8f3f..40829b9 100644
--- a/asf-site-src/source/documentation/in-progress/precommit/plugins/asflicense.html.md
+++ b/asf-site-src/source/documentation/in-progress/precommit/plugins/asflicense.html.md
@@ -27,7 +27,9 @@ Test
 
 # Description
 
-Runs the [Apache Creadur](http://creadur.apache.org) project's [Rat](http://creadur.apache.org/rat/) code to verify software licensing.  Currently, `ant`, `gradle`, and `maven` have built-in support. For other build tools, the rat jar will need to be provided.
+Runs the [Apache Creadur](http://creadur.apache.org) project's [Rat](http://creadur.apache.org/rat/) code to verify software licensing.
+Currently, `ant`, `gradle`, and `maven` have built-in support.  The Apache Yetus container image also provides the jar file in /opt/apache-rat.
+For other build tools/scenarios, the rat jar will need to be provided.
 
 # Environment Variables
 
@@ -38,7 +40,7 @@ None
 | Option | Notes |
 |:---------|:------|
 | `--asflicense-rat-excludes=<path>` | When running rat outside of a build tool, specify the location of the exclusion file |
-| `--asflicense-rat-jar=<path` | When running rat outside of a build tool, specify the location of the Java jar file to execute |
+| `--asflicense-rat-jar=<path>` | When running rat outside of a build tool, specify the location of the Java jar file to execute. Defaults to /opt/apache-rat/apache-rat.jar |
 
 # Docker Notes
 
diff --git a/precommit/src/main/shell/test-patch-docker/Dockerfile b/precommit/src/main/shell/test-patch-docker/Dockerfile
index 097b26b..bb0f7d8 100644
--- a/precommit/src/main/shell/test-patch-docker/Dockerfile
+++ b/precommit/src/main/shell/test-patch-docker/Dockerfile
@@ -100,6 +100,18 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y ant \
     && rm -rf /var/lib/apt/lists/*
 
 ####
+# Install Apache Creadur RAT jar
+####
+RUN mkdir -p /opt/apache-rat \
+    && curl -f -s -L -o /tmp/rat.tgz \
+        'https://www.apache.org/dyn/closer.cgi?action=download&filename=/creadur/apache-rat-0.13/apache-rat-0.13-bin.tar.gz' \
+    && shasum -a 512 /tmp/rat.tgz \
+        | awk '$1!="2c1e12eace7b80a9b6373c2f5080fbf63d3fa8d9248f3a17bd05de961cd3ca3c4549817b8b7320a84f0c323194edad0abdb86bdfec3976227a228e2143e14a54" {exit(1)}' \
+    && tar --strip-components 1 -C /opt/apache-rat -xpzf /tmp/rat.tgz \
+    && rm /tmp/rat.tgz \
+    && mv /opt/apache-rat/apache-rat-0.13.jar /opt/apache-rat/apache-rat.jar
+
+####
 # Install GNU automake, GNU make, and related
 ####
 RUN apt-get -q update && apt-get -q install --no-install-recommends -y autoconf automake libtool make \
diff --git a/precommit/src/main/shell/test-patch.d/asflicense.sh b/precommit/src/main/shell/test-patch.d/asflicense.sh
index 5b17549..d98466d 100755
--- a/precommit/src/main/shell/test-patch.d/asflicense.sh
+++ b/precommit/src/main/shell/test-patch.d/asflicense.sh
@@ -18,6 +18,8 @@
 
 add_test_type asflicense
 
+ASFLICENSE_RAT_JAR=/opt/apache-rat/apache-rat.jar
+
 function asflicense_usage
 {
   yetus_add_option "--asflicense-rat-excludes=<file>" "path to file containing exclusion patterns"
@@ -86,7 +88,7 @@ function asflicense_tests
       btfails=false
     ;;
     *)
-      if [[ -z "${ASFLICENSE_RAT_JAR}" ]]; then
+      if [[ ! -f "${ASFLICENSE_RAT_JAR}" ]]; then
         return 0
       fi
 


[yetus] 07/10: YETUS-1055. Add test code for yetuslib (#180)

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch YETUS-1034-release
in repository https://gitbox.apache.org/repos/asf/yetus.git

commit 89dede67c4e9b2a793117ff89eed702b61ec92fe
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Thu Oct 29 22:34:08 2020 -0700

    YETUS-1055. Add test code for yetuslib (#180)
    
    Additionally, this change:
    
    * fixes some bugs
    * adds shellcheck support for bats files
---
 precommit/src/main/shell/core.d/00-yetuslib.sh     | 12 ++--
 .../src/main/shell/test-patch.d/shellcheck.sh      |  4 ++
 .../arrayfiletest.txt}                             | 26 ++------
 .../src/test/shell/functions_test_helper.bash      |  5 +-
 precommit/src/test/shell/run-bats.sh               |  2 +-
 precommit/src/test/shell/yetus_abs.bats            | 66 +++++++++++++++++++
 .../src/test/shell/yetus_add_array_element.bats    |  1 +
 precommit/src/test/shell/yetus_array_contains.bats |  1 +
 ...rray_element.bats => yetus_array_to_comma.bats} | 37 +++++++----
 .../src/test/shell/yetus_del_array_element.bats    |  5 +-
 ...array_element.bats => yetus_file_to_array.bats} | 29 +++++----
 .../test/shell/yetus_find_deepest_directory.bats   | 74 ++++++++++++++++++++++
 precommit/src/test/shell/yetus_relative_dir.bats   | 69 ++++++++++++++++++++
 ...tains.bats => yetus_sort_and_unique_array.bats} | 47 +++++++-------
 ...s_array_contains.bats => yetus_sort_array.bats} | 51 ++++++++-------
 15 files changed, 327 insertions(+), 102 deletions(-)

diff --git a/precommit/src/main/shell/core.d/00-yetuslib.sh b/precommit/src/main/shell/core.d/00-yetuslib.sh
index cfea284..13754f8 100755
--- a/precommit/src/main/shell/core.d/00-yetuslib.sh
+++ b/precommit/src/main/shell/core.d/00-yetuslib.sh
@@ -255,7 +255,7 @@ function yetus_array_to_comma
 }
 
 ## @description  Convert a file to an array.
-## @description  Comments on the beginning of the line are stripped.
+## @description  Comments on the beginning of the line and emtpy lines are stripped.
 ## @audience     public
 ## @stability    evolving
 ## @replaceable  no
@@ -280,11 +280,11 @@ function yetus_file_to_array
     # work due to the variable only being present in
     # the subshell.  So MUST force the grep into the
     # subshell...
-    mapfile -t a < <("${GREP:-grep}" -v -e '^#' "${filename}" )
+    mapfile -t a < <("${GREP:-grep}" -v -e '^#' -e '^$' "${filename}" )
   else
     while read -r line; do
       a+=("${line}")
-    done < <("${GREP:-grep}" -v -e '^#' "${filename}")
+    done < <("${GREP:-grep}" -v -e '^#' -e '^$' "${filename}")
   fi
   eval "${var}=(\"\${a[@]}\")"
   return 0
@@ -464,7 +464,11 @@ function yetus_sort_and_unique_array
   fi
 }
 
-## @description  find the deepest entry of a directory array
+## @description  find the deepest entry of a directory array.
+## @description  this is different than yetus_relative_dir because
+## @description  the provided directory array provides where the
+## @description  directory breaks may occur rather than every
+## @description  directory being a potential cut off point.
 ## @description  NOTE: array and filename MUST be absolute paths
 ## @audience     public
 ## @stability    stable
diff --git a/precommit/src/main/shell/test-patch.d/shellcheck.sh b/precommit/src/main/shell/test-patch.d/shellcheck.sh
index e1b683a..ae66e70 100755
--- a/precommit/src/main/shell/test-patch.d/shellcheck.sh
+++ b/precommit/src/main/shell/test-patch.d/shellcheck.sh
@@ -39,6 +39,10 @@ function shellcheck_filefilter
     # if it ends in an explicit .sh, then this is shell code.
     add_test shellcheck
     yetus_add_array_element SHELLCHECK_FILTERFILES "${filename}"
+  elif [[ ${filename} =~ \.bats$ ]]; then
+    # if it ends in an explicit .bats, then this is bats code
+    # which modern shellcheck can work with.
+    add_test shellcheck
   elif [[ ${BUILDTOOL} = maven && ${filename} =~ src/main/shell ]]; then
     # if it is maven and in src/main/shell, assume it's shell code
     add_test shellcheck
diff --git a/precommit/src/test/shell/yetus_add_array_element.bats b/precommit/src/test/resources/arrayfiletest.txt
old mode 100755
new mode 100644
similarity index 61%
copy from precommit/src/test/shell/yetus_add_array_element.bats
copy to precommit/src/test/resources/arrayfiletest.txt
index 462f34c..3ffd070
--- a/precommit/src/test/shell/yetus_add_array_element.bats
+++ b/precommit/src/test/resources/arrayfiletest.txt
@@ -1,3 +1,7 @@
+1
+2
+3
+
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
@@ -12,25 +16,3 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-
-load functions_test_helper
-
-@test "yetus_add_array_element (empty)" {
-  yetus_add_array_element ARRAY value
-  [ "${ARRAY[0]}" = value ]
-}
-
-@test "yetus_add_array_element (exist)" {
-  ARRAY=("val2")
-  yetus_add_array_element ARRAY val1
-  [ "${ARRAY[0]}" = val2 ]
-  [ "${ARRAY[1]}" = val1 ]
-}
-
-@test "yetus_add_array_element (double exist)" {
-  ARRAY=("val2" "val1")
-  yetus_add_array_element ARRAY val3
-  [ "${ARRAY[0]}" = val2 ]
-  [ "${ARRAY[1]}" = val1 ]
-  [ "${ARRAY[2]}" = val3 ]
-}
diff --git a/precommit/src/test/shell/functions_test_helper.bash b/precommit/src/test/shell/functions_test_helper.bash
index 2d92edf..4ff7961 100755
--- a/precommit/src/test/shell/functions_test_helper.bash
+++ b/precommit/src/test/shell/functions_test_helper.bash
@@ -23,6 +23,10 @@ setup() {
 
   echo "bindir: ${TESTBINDIR}" 2>&1
 
+  tmpres="${BATS_TEST_DIRNAME}/../resources"
+  # shellcheck disable=SC2034
+  TESTRESOURCES=$(cd -P -- "${tmpres}" >/dev/null && pwd -P)
+
   mkdir -p "${TMP}"
 
   # shellcheck disable=SC2034
@@ -40,7 +44,6 @@ teardown() {
   rm -rf "${TMP}"
 }
 
-
 strstr() {
   if [ "${1#*$2}" != "${1}" ]; then
     echo true
diff --git a/precommit/src/test/shell/run-bats.sh b/precommit/src/test/shell/run-bats.sh
index 24ea79e..adc7224 100755
--- a/precommit/src/test/shell/run-bats.sh
+++ b/precommit/src/test/shell/run-bats.sh
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 targetdir=../../../target
-mkdir -p ${targetdir}/surefire-reports ${targetdir}/tap
+mkdir -p "${targetdir}/surefire-reports" "${targetdir}/tap"
 
 batsexe=$(command -v bats) 2>/dev/null
 
diff --git a/precommit/src/test/shell/yetus_abs.bats b/precommit/src/test/shell/yetus_abs.bats
new file mode 100755
index 0000000..9dc03db
--- /dev/null
+++ b/precommit/src/test/shell/yetus_abs.bats
@@ -0,0 +1,66 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+load functions_test_helper
+
+create_fake () {
+  mkdir "${TMP}/j"
+  touch "${TMP}/j/k"
+  ln -s j "${TMP}/l"
+}
+
+
+@test "yetus_abs (simple not exist)" {
+  run yetus_abs fake
+  [ "${status}" -eq 1 ]
+}
+
+@test "yetus_abs (simple dir)" {
+  create_fake
+  run yetus_abs "${TMP}/j"
+  [ "${output}" = "${TMP}/j" ]
+}
+
+@test "yetus_abs (simple file)" {
+  create_fake
+  run yetus_abs "${TMP}/j/k"
+  [ "${output}" = "${TMP}/j/k" ]
+}
+
+@test "yetus_abs (relative file1)" {
+  create_fake
+  run yetus_abs "${TMP}/j/../j/k"
+  [ "${output}" = "${TMP}/j/k" ]
+}
+
+@test "yetus_abs (relative file2)" {
+  create_fake
+  run yetus_abs "${RELTMP}/j/../j/k"
+  [ "${output}" = "${TMP}/j/k" ]
+}
+
+@test "yetus_abs (relative dir)" {
+  create_fake
+  fred=$(cd -P -- ".." >/dev/null && pwd -P)
+  run yetus_abs ".."
+  [ "${output}" = "${fred}" ]
+}
+
+@test "yetus_abs (symlink)" {
+  create_fake
+  run yetus_abs "${TMP}/l"
+  [ "${output}" = "${TMP}/j" ]
+}
diff --git a/precommit/src/test/shell/yetus_add_array_element.bats b/precommit/src/test/shell/yetus_add_array_element.bats
index 462f34c..6ba687a 100755
--- a/precommit/src/test/shell/yetus_add_array_element.bats
+++ b/precommit/src/test/shell/yetus_add_array_element.bats
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
diff --git a/precommit/src/test/shell/yetus_array_contains.bats b/precommit/src/test/shell/yetus_array_contains.bats
index 4151ffe..8fb5d2b 100755
--- a/precommit/src/test/shell/yetus_array_contains.bats
+++ b/precommit/src/test/shell/yetus_array_contains.bats
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
diff --git a/precommit/src/test/shell/yetus_add_array_element.bats b/precommit/src/test/shell/yetus_array_to_comma.bats
similarity index 57%
copy from precommit/src/test/shell/yetus_add_array_element.bats
copy to precommit/src/test/shell/yetus_array_to_comma.bats
index 462f34c..ef14cea 100755
--- a/precommit/src/test/shell/yetus_add_array_element.bats
+++ b/precommit/src/test/shell/yetus_array_to_comma.bats
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
@@ -15,22 +16,30 @@
 
 load functions_test_helper
 
-@test "yetus_add_array_element (empty)" {
-  yetus_add_array_element ARRAY value
-  [ "${ARRAY[0]}" = value ]
+@test "yetus_array_to_comma (empty)" {
+  # shellcheck disable=SC2034
+  ARRAY=()
+  run yetus_array_to_comma ARRAY
+  [ "${output}" = "" ]
 }
 
-@test "yetus_add_array_element (exist)" {
-  ARRAY=("val2")
-  yetus_add_array_element ARRAY val1
-  [ "${ARRAY[0]}" = val2 ]
-  [ "${ARRAY[1]}" = val1 ]
+@test "yetus_array_to_comma (one)" {
+  # shellcheck disable=SC2034
+  ARRAY=(one)
+  run yetus_array_to_comma ARRAY
+  [ "${output}" = "one" ]
 }
 
-@test "yetus_add_array_element (double exist)" {
-  ARRAY=("val2" "val1")
-  yetus_add_array_element ARRAY val3
-  [ "${ARRAY[0]}" = val2 ]
-  [ "${ARRAY[1]}" = val1 ]
-  [ "${ARRAY[2]}" = val3 ]
+@test "yetus_array_to_comma (two)" {
+  # shellcheck disable=SC2034
+  ARRAY=(one two)
+  run yetus_array_to_comma ARRAY
+  [ "${output}" = "one,two" ]
 }
+
+@test "yetus_array_to_comma (three)" {
+  # shellcheck disable=SC2034
+  ARRAY=(one two three)
+  run yetus_array_to_comma ARRAY
+  [ "${output}" = "one,two,three" ]
+}
\ No newline at end of file
diff --git a/precommit/src/test/shell/yetus_del_array_element.bats b/precommit/src/test/shell/yetus_del_array_element.bats
index a79b584..86499ff 100755
--- a/precommit/src/test/shell/yetus_del_array_element.bats
+++ b/precommit/src/test/shell/yetus_del_array_element.bats
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
@@ -17,7 +18,7 @@ load functions_test_helper
 
 @test "yetus_del_array_element (empty array)" {
   yetus_del_array_element ARRAY value
-  [ "${#ARRAY[@]}" = 0 ]
+  [ "${#ARRAY[@]}" -eq 0 ]
 }
 
 @test "yetus_del_array_element (not exist)" {
@@ -30,7 +31,7 @@ load functions_test_helper
 @test "yetus_add_array_element (single exist)" {
   ARRAY=("val1")
   yetus_del_array_element ARRAY val1
-  echo ">${ARRAY[@]}<"
+  echo ">${ARRAY[*]}<"
   [ "${#ARRAY[@]}" -eq 0 ]
 }
 
diff --git a/precommit/src/test/shell/yetus_add_array_element.bats b/precommit/src/test/shell/yetus_file_to_array.bats
similarity index 61%
copy from precommit/src/test/shell/yetus_add_array_element.bats
copy to precommit/src/test/shell/yetus_file_to_array.bats
index 462f34c..9e398fd 100755
--- a/precommit/src/test/shell/yetus_add_array_element.bats
+++ b/precommit/src/test/shell/yetus_file_to_array.bats
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
@@ -15,22 +16,22 @@
 
 load functions_test_helper
 
-@test "yetus_add_array_element (empty)" {
-  yetus_add_array_element ARRAY value
-  [ "${ARRAY[0]}" = value ]
+@test "yetus_file_to_array (empty)" {
+  run yetus_file_to_array ARRAY "nonexistent"
+  [ "${status}" = 1 ]
 }
 
-@test "yetus_add_array_element (exist)" {
-  ARRAY=("val2")
-  yetus_add_array_element ARRAY val1
-  [ "${ARRAY[0]}" = val2 ]
-  [ "${ARRAY[1]}" = val1 ]
+@test "yetus_file_to_array (basic read)" {
+  run yetus_file_to_array ARRAY "${TESTRESOURCES}/arrayfiletest.txt"
+  [ "${status}" = 0 ]
 }
 
-@test "yetus_add_array_element (double exist)" {
-  ARRAY=("val2" "val1")
-  yetus_add_array_element ARRAY val3
-  [ "${ARRAY[0]}" = val2 ]
-  [ "${ARRAY[1]}" = val1 ]
-  [ "${ARRAY[2]}" = val3 ]
+@test "yetus_file_to_array (contents)" {
+  yetus_file_to_array ARRAY "${TESTRESOURCES}/arrayfiletest.txt"
+  [ "${ARRAY[0]}" = 1 ]
 }
+
+@test "yetus_file_to_array (count)" {
+  yetus_file_to_array ARRAY "${TESTRESOURCES}/arrayfiletest.txt"
+  [ "${#ARRAY[@]}" -eq 3 ]
+}
\ No newline at end of file
diff --git a/precommit/src/test/shell/yetus_find_deepest_directory.bats b/precommit/src/test/shell/yetus_find_deepest_directory.bats
new file mode 100755
index 0000000..0a2e3e4
--- /dev/null
+++ b/precommit/src/test/shell/yetus_find_deepest_directory.bats
@@ -0,0 +1,74 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+load functions_test_helper
+
+@test "yetus_find_deepest_directory (simple find1)" {
+  # shellcheck disable=SC2034
+  ARRAY=("/a")
+  run yetus_find_deepest_directory ARRAY "/a"
+  [ "${output}" = "/a" ]
+}
+
+@test "yetus_find_deepest_directory (simple find2)" {
+  # shellcheck disable=SC2034
+  ARRAY=("/a")
+  run yetus_find_deepest_directory ARRAY "/a/1"
+  [ "${output}" = "/a" ]
+}
+
+@test "yetus_find_deepest_directory (simple fail)" {
+  # shellcheck disable=SC2034
+  ARRAY=("/a")
+  run yetus_find_deepest_directory ARRAY "/b/1"
+  [ "${output}" = "" ]
+}
+
+@test "yetus_find_deepest_directory (two path find)" {
+  # shellcheck disable=SC2034
+  ARRAY=("/a/b" "/a/c")
+  run yetus_find_deepest_directory ARRAY "/a/b/k"
+  [ "${output}" = "/a/b" ]
+}
+
+@test "yetus_find_deepest_directory (two+two path find)" {
+  # shellcheck disable=SC2034
+  ARRAY=("/a/b/c" "/a/b/d")
+  run yetus_find_deepest_directory ARRAY "/a/b/d/j"
+  [ "${output}" = "/a/b/d" ]
+}
+
+
+@test "yetus_find_deepest_directory (complex path find1)" {
+  # shellcheck disable=SC2034
+  ARRAY=("/a/b/c" "/a/b/d" "/a/b/e" "/a/b/d/f" "/a/b/d/g")
+  run yetus_find_deepest_directory ARRAY "/a/b/d"
+  [ "${output}" = "/a/b/d" ]
+}
+
+@test "yetus_find_deepest_directory (complex path find2)" {
+  # shellcheck disable=SC2034
+  ARRAY=("/a/b" "/a/b/c" "/a/b/d/f/k/j" "/a/b/d/g")
+  run yetus_find_deepest_directory ARRAY "/a/b/d/f/k/e"
+  [ "${output}" = "/a/b" ]
+}
+
+@test "yetus_find_deepest_directory (complex path find3)" {
+  # shellcheck disable=SC2034
+  ARRAY=("/a/b" "/a/b/c" "/a/b/d" "/a/b/d/f/k/j" "/a/b/d/g")
+  run yetus_find_deepest_directory ARRAY "/a/b/d/f/k/e"
+  [ "${output}" = "/a/b/d" ]
+}
\ No newline at end of file
diff --git a/precommit/src/test/shell/yetus_relative_dir.bats b/precommit/src/test/shell/yetus_relative_dir.bats
new file mode 100755
index 0000000..a031204
--- /dev/null
+++ b/precommit/src/test/shell/yetus_relative_dir.bats
@@ -0,0 +1,69 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+load functions_test_helper
+
+create_fake () {
+  mkdir "${TMP}/j"
+  touch "${TMP}/j/k"
+  ln -s j "${TMP}/l"
+  mkdir "${TMP}/m"
+  touch "${TMP}/m/n"
+  ln -s m "${TMP}/o"
+}
+
+
+@test "yetus_relative_dir (simple dir)" {
+  create_fake
+  run yetus_relative_dir "${TMP}" "${TMP}/j"
+  [ "${status}" -eq 0 ]
+  [ "${output}" = "j" ]
+}
+
+@test "yetus_relative_dir (simple file)" {
+  create_fake
+  run yetus_relative_dir "${TMP}/j" "${TMP}/j/k"
+  [ "${status}" -eq 0 ]
+  [ "${output}" = "k" ]
+}
+
+@test "yetus_relative_dir (simple symlink)" {
+  create_fake
+  run yetus_relative_dir "${TMP}" "${TMP}/l"
+  [ "${status}" -eq 0 ]
+  [ "${output}" = "l" ]
+}
+
+@test "yetus_relative_dir (fail simple dir)" {
+  create_fake
+  run yetus_relative_dir "${TMP}/j" "${TMP}/m"
+  [ "${status}" -eq 1 ]
+  [ "${output}" = "${TMP}/m" ]
+}
+
+@test "yetus_relative_dir (fail simple file)" {
+  create_fake
+  run yetus_relative_dir "${TMP}/j" "${TMP}/m/n"
+  [ "${status}" -eq 1 ]
+  [ "${output}" = "${TMP}/m/n" ]
+}
+
+@test "yetus_relative_dir (fail simple symlink)" {
+  create_fake
+  run yetus_relative_dir "${TMP}/j" "${TMP}/o"
+  [ "${status}" -eq 1 ]
+  [ "${output}" = "${TMP}/o" ]
+}
\ No newline at end of file
diff --git a/precommit/src/test/shell/yetus_array_contains.bats b/precommit/src/test/shell/yetus_sort_and_unique_array.bats
similarity index 50%
copy from precommit/src/test/shell/yetus_array_contains.bats
copy to precommit/src/test/shell/yetus_sort_and_unique_array.bats
index 4151ffe..2ae8bc4 100755
--- a/precommit/src/test/shell/yetus_array_contains.bats
+++ b/precommit/src/test/shell/yetus_sort_and_unique_array.bats
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
@@ -15,33 +16,35 @@
 
 load functions_test_helper
 
-@test "yetus_array_contains (empty)" {
-  run yetus_array_contains value "${ARRAY[@]}"
-  [ "${status}" = 1 ]
+@test "yetus_sort_and_unique_array (empty)" {
+  yetus_sort_and_unique_array ARRAY
 }
 
-@test "yetus_array_contains (exist)" {
+@test "yetus_sort_and_unique_array (single value)" {
   ARRAY=("value")
-  run yetus_array_contains value "${ARRAY[@]}"
-  [ "${status}" = 0 ]
+  yetus_sort_and_unique_array ARRAY
 }
 
-@test "yetus_array_contains (notexist)" {
-  ARRAY=("different")
-  run yetus_array_contains value "${ARRAY[@]}"
-  [ "${status}" = 1 ]
-}
+@test "yetus_sort_and_unique_array (multiple value)" {
+  ARRAY=("b" "c" "a")
+  preifsod=$(echo "${IFS}" | od -c)
+  yetus_sort_and_unique_array ARRAY
+  postifsod=$(echo "${IFS}" | od -c)
 
-@test "yetus_array_contains (exist, multi)" {
-  ARRAY=("val1" "val2" "val3")
-  for j in val1 val2 val3; do
-    run yetus_array_contains "${j}" "${ARRAY[@]}"
-    [ "${status}" = 0 ]
-  done
+  [ "${ARRAY[0]}" = "a" ]
+  [ "${ARRAY[1]}" = "b" ]
+  [ "${ARRAY[2]}" = "c" ]
+  [ "${preifsod}" = "${postifsod}" ]
 }
 
-@test "yetus_array_contains (multi, not exist)" {
-  ARRAY=("val1" "val2" "val3")
-  run yetus_array_contains value "${ARRAY[@]}"
-  [ "${status}" = 1 ]
-}
+@test "yetus_sort_and_unique_array (multiple duplicate values)" {
+  ARRAY=("b" "c" "b" "a" "a" "c")
+  preifsod=$(echo "${IFS}" | od -c)
+  yetus_sort_and_unique_array ARRAY
+  postifsod=$(echo "${IFS}" | od -c)
+
+  [ "${ARRAY[0]}" = "a" ]
+  [ "${ARRAY[1]}" = "b" ]
+  [ "${ARRAY[2]}" = "c" ]
+  [ "${preifsod}" = "${postifsod}" ]
+}
\ No newline at end of file
diff --git a/precommit/src/test/shell/yetus_array_contains.bats b/precommit/src/test/shell/yetus_sort_array.bats
similarity index 50%
copy from precommit/src/test/shell/yetus_array_contains.bats
copy to precommit/src/test/shell/yetus_sort_array.bats
index 4151ffe..cb8cd59 100755
--- a/precommit/src/test/shell/yetus_array_contains.bats
+++ b/precommit/src/test/shell/yetus_sort_array.bats
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
@@ -15,33 +16,39 @@
 
 load functions_test_helper
 
-@test "yetus_array_contains (empty)" {
-  run yetus_array_contains value "${ARRAY[@]}"
-  [ "${status}" = 1 ]
+@test "yetus_sort_array (empty)" {
+  yetus_sort_array ARRAY
 }
 
-@test "yetus_array_contains (exist)" {
+@test "yetus_sort_array (single value)" {
   ARRAY=("value")
-  run yetus_array_contains value "${ARRAY[@]}"
-  [ "${status}" = 0 ]
+  yetus_sort_array ARRAY
 }
 
-@test "yetus_array_contains (notexist)" {
-  ARRAY=("different")
-  run yetus_array_contains value "${ARRAY[@]}"
-  [ "${status}" = 1 ]
-}
+@test "yetus_sort_array (multiple value)" {
+  ARRAY=("b" "c" "a")
+  preifsod=$(echo "${IFS}" | od -c)
+  yetus_sort_array ARRAY
+  postifsod=$(echo "${IFS}" | od -c)
 
-@test "yetus_array_contains (exist, multi)" {
-  ARRAY=("val1" "val2" "val3")
-  for j in val1 val2 val3; do
-    run yetus_array_contains "${j}" "${ARRAY[@]}"
-    [ "${status}" = 0 ]
-  done
+  [ "${ARRAY[0]}" = "a" ]
+  [ "${ARRAY[1]}" = "b" ]
+  [ "${ARRAY[2]}" = "c" ]
+  [ "${preifsod}" = "${postifsod}" ]
 }
 
-@test "yetus_array_contains (multi, not exist)" {
-  ARRAY=("val1" "val2" "val3")
-  run yetus_array_contains value "${ARRAY[@]}"
-  [ "${status}" = 1 ]
-}
+@test "yetus_sort_array (multiple duplicate values)" {
+  ARRAY=("b" "c" "b" "a" "a" "c")
+  preifsod=$(echo "${IFS}" | od -c)
+  yetus_sort_array ARRAY
+  postifsod=$(echo "${IFS}" | od -c)
+
+  [ "${ARRAY[0]}" = "a" ]
+  [ "${ARRAY[1]}" = "a" ]
+  [ "${ARRAY[2]}" = "b" ]
+  [ "${ARRAY[3]}" = "b" ]
+  [ "${ARRAY[4]}" = "c" ]
+  [ "${ARRAY[5]}" = "c" ]
+
+  [ "${preifsod}" = "${postifsod}" ]
+}
\ No newline at end of file


[yetus] 10/10: YETUS-1061. remove github user and password support (addendum) (#187)

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch YETUS-1034-release
in repository https://gitbox.apache.org/repos/asf/yetus.git

commit 879f861192ff982e6fa114cb9c55fba7eca62822
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Fri Oct 30 15:51:28 2020 -0700

    YETUS-1061. remove github user and password support (addendum) (#187)
---
 precommit/src/main/shell/test-patch.d/github.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/precommit/src/main/shell/test-patch.d/github.sh b/precommit/src/main/shell/test-patch.d/github.sh
index 9e8419d..1b10005 100755
--- a/precommit/src/main/shell/test-patch.d/github.sh
+++ b/precommit/src/main/shell/test-patch.d/github.sh
@@ -54,8 +54,6 @@ function github_parse_args
 {
   declare i
 
-  github_set_github_user
-
   for i in "$@"; do
     case ${i} in
       --github-api-url=*)


[yetus] 09/10: YETUS-1061. remove github user and password support (#183)

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch YETUS-1034-release
in repository https://gitbox.apache.org/repos/asf/yetus.git

commit 93fd431dd954756705199be5b68c19094b02e975
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Fri Oct 30 07:09:30 2020 -0700

    YETUS-1061. remove github user and password support (#183)
---
 .../in-progress/precommit/bugsystems.html.md       | 14 +-----------
 .../in-progress/precommit/plugins/github.html.md   |  2 --
 precommit/src/main/shell/test-patch.d/github.sh    | 26 ----------------------
 3 files changed, 1 insertion(+), 41 deletions(-)

diff --git a/asf-site-src/source/documentation/in-progress/precommit/bugsystems.html.md b/asf-site-src/source/documentation/in-progress/precommit/bugsystems.html.md
index b19c152..d6c70e4 100644
--- a/asf-site-src/source/documentation/in-progress/precommit/bugsystems.html.md
+++ b/asf-site-src/source/documentation/in-progress/precommit/bugsystems.html.md
@@ -98,7 +98,7 @@ Pull requests that are made off of a specific branch will switch the test repo t
 ## GitHub Authentication
 
 Some operations depend upon authentication credentials.  The GitHub plug-in
-supports authentication via token or user name/passphrase.  Authentication is
+supports authentication via token.  Authentication is
 required for controlling the API query rate, accessing private repositories,
 reading private pull requests, updating GitHub Statuses (requires
 `repo:status` permissions), writing comments to PRs, and other functionality.
@@ -110,18 +110,6 @@ the appropriate documentation for your particular setup.
 
 The token is provided via the `--github-token` option.
 
-### GitHub Username/password
-
-    NOTE: GitHub is deprecating this format. It is kept here for backward compatibility
-    until such a time the format is completely removed from modern implementations.
-
-The user name is provided via the `--github-user` option or the GITHUB\_USER environment variable.  The default value for  GITHUB\_USER is the value of `--project` suffixed with QA.  For example,
-`--project=yetus` will set `GITHUB_USER=yetusqa`.
-
-The password is provided via the `--github-password` or GITHUB\_PASSWD environment variable.
-
-Both username and password options must be provided.
-
 # GitLab Specific
 
 GitLab supports the full range of functionality, including putting comments on individual lines.  Be aware, however, that `test-patch` will (generally) require that GitLab MRs be fully squashed and rebased (i.e., a single commit) in many circumstances.
diff --git a/asf-site-src/source/documentation/in-progress/precommit/plugins/github.html.md b/asf-site-src/source/documentation/in-progress/precommit/plugins/github.html.md
index f22ab96..9da3ce2 100644
--- a/asf-site-src/source/documentation/in-progress/precommit/plugins/github.html.md
+++ b/asf-site-src/source/documentation/in-progress/precommit/plugins/github.html.md
@@ -39,9 +39,7 @@ None
 |:---------|:------|
 | `--github-api-url=<url>` | REST API URL (for GitHub Enterprise) |
 | `--github-base-url=<url>` | Non-REST API URL (for GitHub Enterprise) |
-| `--github-password=<pw>` | Password or OAuth 2.0 token to use for authentication |
 | `--github-repo=<repo>` | `username/repository` identifier |
-| `--github-user=<user>` | Username to use for authentication |
 | `--github-token=<token>` | Token used to perform read and write operations |
 
 # Docker Notes
diff --git a/precommit/src/main/shell/test-patch.d/github.sh b/precommit/src/main/shell/test-patch.d/github.sh
index 4e01a5d..9e8419d 100755
--- a/precommit/src/main/shell/test-patch.d/github.sh
+++ b/precommit/src/main/shell/test-patch.d/github.sh
@@ -33,8 +33,6 @@ GITHUB_API_URL="https://api.github.com"
 GITHUB_REPO=""
 
 # user settings
-GITHUB_PASSWD="${GITHUB_PASSWD-}"
-GITHUB_USER="${GITHUB_USER-}"
 GITHUB_TOKEN="${GITHUB_TOKEN-}"
 GITHUB_ISSUE=""
 GITHUB_USE_EMOJI_VOTE=false
@@ -43,25 +41,12 @@ declare -a GITHUB_AUTH
 # private globals...
 GITHUB_BRIDGED=false
 
-# Simple function to set a default GitHub user after PROJECT_NAME has been set
-function github_set_github_user
-{
-  if [[ -n "${PROJECT_NAME}" && ! "${PROJECT_NAME}" = unknown ]]; then
-    GITHUB_USER=${GITHUB_USER:-"${PROJECT_NAME}qa"}
-  fi
-}
-
 function github_usage
 {
-  github_set_github_user
-
   yetus_add_option "--github-api-url=<url>" "The URL of the API for github (default: '${GITHUB_API_URL}')"
   yetus_add_option "--github-base-url=<url>" "The URL of the github server (default:'${GITHUB_BASE_URL}')"
-# Do not extract GITHUB_PASSWD environment variable
-  yetus_add_option "--github-password=<pw>" "Github password (or OAuth token) (default: 'GITHUB_PASSWD' environment variable)"
   yetus_add_option "--github-repo=<repo>" "github repo to use (default:'${GITHUB_REPO}')"
   yetus_add_option "--github-token=<token>" "The token to use to read/write to github"
-  yetus_add_option "--github-user=<user>" "Github user [default: ${GITHUB_USER}]"
   yetus_add_option "--github-use-emoji-vote" "Whether to use emoji to represent the vote result on github [default: ${GITHUB_USE_EMOJI_VOTE}]"
 }
 
@@ -85,18 +70,10 @@ function github_parse_args
         delete_parameter "${i}"
         GITHUB_REPO=${i#*=}
       ;;
-      --github-password=*)
-        delete_parameter "${i}"
-        GITHUB_PASSWD=${i#*=}
-      ;;
       --github-token=*)
         delete_parameter "${i}"
         GITHUB_TOKEN=${i#*=}
       ;;
-      --github-user=*)
-        delete_parameter "${i}"
-        GITHUB_USER=${i#*=}
-      ;;
       --github-use-emoji-vote)
         delete_parameter "${i}"
         GITHUB_USE_EMOJI_VOTE=true
@@ -181,9 +158,6 @@ function github_initialize
 
   if [[ -n "${GITHUB_TOKEN}" ]]; then
     GITHUB_AUTH=(-H "Authorization: token ${GITHUB_TOKEN}")
-  elif [[ -n "${GITHUB_USER}"
-     && -n "${GITHUB_PASSWD}" ]]; then
-    GITHUB_AUTH=(-u "${GITHUB_USER}:${GITHUB_PASSWD}")
   fi
 
   # if the default branch hasn't been set yet, ask GitHub


[yetus] 04/10: YETUS-1050. perlcritic should not force --brutal (#176)

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch YETUS-1034-release
in repository https://gitbox.apache.org/repos/asf/yetus.git

commit 0ae897d8b2fc5c9f44ada7a6b80c54eec8c91890
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Thu Oct 29 08:54:20 2020 -0700

    YETUS-1050. perlcritic should not force --brutal (#176)
---
 precommit/src/main/shell/test-patch.d/perlcritic.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/precommit/src/main/shell/test-patch.d/perlcritic.sh b/precommit/src/main/shell/test-patch.d/perlcritic.sh
index fa380c8..7085329 100755
--- a/precommit/src/main/shell/test-patch.d/perlcritic.sh
+++ b/precommit/src/main/shell/test-patch.d/perlcritic.sh
@@ -75,7 +75,7 @@ function perlcritic_preapply
   pushd "${BASEDIR}" >/dev/null || return 1
   for i in "${CHANGED_FILES[@]}"; do
     if [[ ${i} =~ \.p[lm]$ && -f ${i} ]]; then
-      ${PERLCRITIC} -1 --verbose 1 "${i}" 2>/dev/null >> "${PATCH_DIR}/branch-perlcritic-result.txt"
+      "${PERLCRITIC}" --verbose 1 --nocolor "${i}" 2>/dev/null >> "${PATCH_DIR}/branch-perlcritic-result.txt"
     fi
   done
   popd >/dev/null || return 1
@@ -117,7 +117,7 @@ function perlcritic_postapply
   pushd "${BASEDIR}" >/dev/null || return 1
   for i in "${CHANGED_FILES[@]}"; do
     if [[ ${i} =~ \.p[lm]$ && -f ${i} ]]; then
-      ${PERLCRITIC} -1 --verbose 1 "${i}" 2>/dev/null >> "${PATCH_DIR}/patch-perlcritic-result.txt"
+      "${PERLCRITIC}" --verbose 1 --nocolor "${i}" 2>/dev/null >> "${PATCH_DIR}/patch-perlcritic-result.txt"
     fi
   done
   popd >/dev/null || return 1


[yetus] 03/10: YETUS-1047. Replace yetus-minimaven-plugin with yetus-maven-plugin (#175)

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch YETUS-1034-release
in repository https://gitbox.apache.org/repos/asf/yetus.git

commit af2efc19d4b773940a00003a9f2ce267aff04fe4
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Thu Oct 29 07:13:52 2020 -0700

    YETUS-1047. Replace yetus-minimaven-plugin with yetus-maven-plugin (#175)
---
 asf-site-src/pom.xml                               |   2 +-
 pom.xml                                            |   4 +-
 precommit/pom.xml                                  |   2 +-
 shelldocs/pom.xml                                  |   2 +-
 yetus-dist/pom.xml                                 |   2 +-
 yetus-maven-plugin/pom.xml                         |  55 ---------
 .../src/main/assemblies/yetus-maven-plugin.xml     |  44 -------
 .../maven/plugin/fileops/CreateSymLinkMojo.java    |   0
 .../yetus/maven/plugin/fileops/MakeBins4Libs.java  |   0
 .../org/apache/yetus/maven/plugin/utils/Utils.java | 137 ---------------------
 .../yetus/maven/plugin/utils/package-info.java     |  22 ----
 .../src/main/resources/licenses/ASL20.txt          |   0
 yetus-minimaven-plugin/pom.xml                     |  88 -------------
 .../yetus/maven/plugin/fileops/package-info.java   |  22 ----
 14 files changed, 5 insertions(+), 375 deletions(-)

diff --git a/asf-site-src/pom.xml b/asf-site-src/pom.xml
index 9b8dd90..fad41d9 100644
--- a/asf-site-src/pom.xml
+++ b/asf-site-src/pom.xml
@@ -42,7 +42,7 @@
     <plugins>
       <plugin>
         <groupId>org.apache.yetus</groupId>
-        <artifactId>yetus-minimaven-plugin</artifactId>
+        <artifactId>yetus-maven-plugin</artifactId>
         <version>${project.version}</version>
         <executions>
           <!-- AUTOMATED_EDIT_BEGIN -->
diff --git a/pom.xml b/pom.xml
index a393054..da19571 100644
--- a/pom.xml
+++ b/pom.xml
@@ -64,7 +64,6 @@
     <maven.compiler.source>1.8</maven.compiler.source>
     <maven.compiler.target>1.8</maven.compiler.target>
 
-    <build-helper-maven-plugin.version>3.2.0</build-helper-maven-plugin.version>
     <checkstyle.version>8.36</checkstyle.version>
     <commons.io.version>2.6</commons.io.version>
     <exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>
@@ -322,15 +321,14 @@
   </reporting>
 
   <modules>
-    <module>yetus-minimaven-plugin</module>
     <module>yetus-assemblies</module>
     <module>audience-annotations-component</module>
+    <module>yetus-maven-plugin</module>
     <module>precommit</module>
     <module>releasedocmaker</module>
     <module>shelldocs</module>
     <module>asf-site-src</module>
     <module>yetus-dist</module>
-    <module>yetus-maven-plugin</module>
   </modules>
 
 </project>
diff --git a/precommit/pom.xml b/precommit/pom.xml
index e612ab4..b4e96d0 100644
--- a/precommit/pom.xml
+++ b/precommit/pom.xml
@@ -116,7 +116,7 @@
 
       <plugin>
         <groupId>org.apache.yetus</groupId>
-        <artifactId>yetus-minimaven-plugin</artifactId>
+        <artifactId>yetus-maven-plugin</artifactId>
         <version>${project.version}</version>
         <executions>
           <execution>
diff --git a/shelldocs/pom.xml b/shelldocs/pom.xml
index c44741d..e0b5654 100644
--- a/shelldocs/pom.xml
+++ b/shelldocs/pom.xml
@@ -91,7 +91,7 @@
 
       <plugin>
         <groupId>org.apache.yetus</groupId>
-        <artifactId>yetus-minimaven-plugin</artifactId>
+        <artifactId>yetus-maven-plugin</artifactId>
         <version>${project.version}</version>
         <executions>
           <execution>
diff --git a/yetus-dist/pom.xml b/yetus-dist/pom.xml
index d01fb4c..a48c62a 100644
--- a/yetus-dist/pom.xml
+++ b/yetus-dist/pom.xml
@@ -62,7 +62,7 @@
       </dependency>
       <dependency>
         <groupId>org.apache.yetus</groupId>
-        <artifactId>yetus-minimaven-plugin</artifactId>
+        <artifactId>yetus-maven-plugin</artifactId>
         <version>${project.version}</version>
       </dependency>
     </dependencies>
diff --git a/yetus-maven-plugin/pom.xml b/yetus-maven-plugin/pom.xml
index f3e2e47..68869fa 100644
--- a/yetus-maven-plugin/pom.xml
+++ b/yetus-maven-plugin/pom.xml
@@ -61,61 +61,6 @@
   <build>
     <plugins>
       <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <version>${build-helper-maven-plugin.version}</version>
-        <executions>
-          <execution>
-            <id>add-source</id>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>add-source</goal>
-            </goals>
-            <configuration>
-              <sources>
-                <source>../yetus-minimaven-plugin/src/main/resources</source>
-                <source>../yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops</source>
-              </sources>
-            </configuration>
-          </execution>
-          <execution>
-            <id>add-resource</id>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>add-resource</goal>
-            </goals>
-            <configuration>
-              <resources>
-                <resource>
-                  <directory>../yetus-minimaven-plugin/src/main/resources</directory>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>create-internal-zip</id>
-            <phase>prepare-package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <finalName>classes/yetus-bin</finalName>
-              <appendAssemblyId>false</appendAssemblyId>
-              <attach>false</attach>
-              <descriptors>
-                <descriptor>src/main/assemblies/yetus-maven-plugin.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
       </plugin>
       <plugin>
diff --git a/yetus-maven-plugin/src/main/assemblies/yetus-maven-plugin.xml b/yetus-maven-plugin/src/main/assemblies/yetus-maven-plugin.xml
deleted file mode 100644
index a67a7be..0000000
--- a/yetus-maven-plugin/src/main/assemblies/yetus-maven-plugin.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<assembly xmlns="https://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
-  xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="https://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 https://maven.apache.org/xsd/assembly-1.1.3.xsd">
-  <id>yetus-maven-plugin</id>
-  <formats>
-    <format>zip</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <fileSets>
-    <fileSet>
-      <directory>${project.build.directory}/../../releasedocmaker/target/dist/apache-yetus-${project.version}</directory>
-      <outputDirectory>.</outputDirectory>
-      <includes>
-        <include>**</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>${project.build.directory}/../../shelldocs/target/dist/apache-yetus-${project.version}</directory>
-      <outputDirectory>.</outputDirectory>
-      <includes>
-        <include>**</include>
-      </includes>
-    </fileSet>
-  </fileSets>
-</assembly>
\ No newline at end of file
diff --git a/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateSymLinkMojo.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateSymLinkMojo.java
similarity index 100%
rename from yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateSymLinkMojo.java
rename to yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateSymLinkMojo.java
diff --git a/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/MakeBins4Libs.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/MakeBins4Libs.java
similarity index 100%
rename from yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/MakeBins4Libs.java
rename to yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/MakeBins4Libs.java
diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/Utils.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/Utils.java
deleted file mode 100644
index 651d6c3..0000000
--- a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/Utils.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.yetus.maven.plugin.utils;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.util.Arrays;
-import java.util.List;
-import java.util.LinkedList;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-
-import org.apache.yetus.audience.InterfaceAudience;
-import org.apache.yetus.audience.InterfaceStability;
-
-
-/**
- * Random utilities for running Yetus components.
- */
-@InterfaceAudience.Private
-@InterfaceStability.Evolving
-public final class Utils {
-
-  /**
-   * Buffer size used while zipping and unzipping zip-ed archives.
-   */
-  private static final int BUFFER_SIZE = 8192;
-
-
-  /**
-   * InputStream from the classpath that has our archive.
-   */
-  private ZipInputStream zipFile;
-
-  /**
-   * extracted dir+bin.
-   */
-  private File binDir;
-
-
-  /**
-   * Constructor for generic utilities.
-   */
-  @InterfaceAudience.Private
-  @InterfaceStability.Evolving
-  public Utils() {
-    this.zipFile = new ZipInputStream(this.getClass()
-          .getClassLoader()
-          .getResourceAsStream("yetus-bin.zip"));
-  }
-
-  /**
-   * Execute the yetus command with the given parameters.
-   * @param cmd command to execute
-   * @param args to that command
-   * @throws IOException an error occurred
-   * @throws InterruptedException an error occurred
-   * @return int process return code
-   */
-  @InterfaceAudience.Private
-  @InterfaceStability.Evolving
-  public int execCmd(final String cmd, final String... args)
-      throws IOException, InterruptedException {
-    File cmdFile = new File(binDir, cmd);
-    String realCmd = cmdFile.toString();
-
-    String[] params = args;
-
-    List<String> list = new LinkedList<String>(Arrays.asList(args));
-    list.add(0, realCmd);
-    params = list.toArray(new String[list.size()]);
-
-    ProcessBuilder pb = new ProcessBuilder(params);
-    pb.inheritIO();
-    Process p = pb.start();
-    return p.waitFor();
-  }
-
-  /**
-   * Extract the yetus-bin file in the dest directory.
-   * @param destDir The unzip directory where to extractthe  file.
-   * @throws IOException an error occurred
-   */
-  @InterfaceAudience.Private
-  @InterfaceStability.Evolving
-  public void extractYetus(final File destDir) throws IOException {
-    this.binDir = new File(destDir, "bin");
-
-    if (binDir.isDirectory()) {
-      return;
-    }
-    try {
-      ZipEntry entry;
-      while ((entry = zipFile.getNextEntry()) != null) {
-        if (!entry.isDirectory()) {
-            File file = new File(destDir, entry.getName());
-            if (!file.getParentFile().mkdirs()) {
-              if (!file.getParentFile().isDirectory()) {
-                throw new IOException("Mkdirs failed to create "
-                  + file.getParentFile().toString());
-              }
-            }
-            OutputStream out = new FileOutputStream(file);
-            try {
-              byte[] buffer = new byte[BUFFER_SIZE];
-              int i;
-              while ((i = zipFile.read(buffer)) != -1) {
-                out.write(buffer, 0, i);
-              }
-            } finally {
-              out.close();
-            }
-            file.setExecutable(true);
-            file.setReadable(true);
-            file.setWritable(true);
-        }
-      }
-    } finally {
-      zipFile.close();
-    }
-  }
-
-}
diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/package-info.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/package-info.java
deleted file mode 100644
index 8e04ace..0000000
--- a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Utilities for running Yetus.
- */
-package org.apache.yetus.maven.plugin.utils;
diff --git a/yetus-minimaven-plugin/src/main/resources/licenses/ASL20.txt b/yetus-maven-plugin/src/main/resources/licenses/ASL20.txt
similarity index 100%
rename from yetus-minimaven-plugin/src/main/resources/licenses/ASL20.txt
rename to yetus-maven-plugin/src/main/resources/licenses/ASL20.txt
diff --git a/yetus-minimaven-plugin/pom.xml b/yetus-minimaven-plugin/pom.xml
deleted file mode 100644
index a753664..0000000
--- a/yetus-minimaven-plugin/pom.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<project xmlns="https://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="https://maven.apache.org/POM/4.0.0
-                      https://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.yetus</groupId>
-    <artifactId>yetus-project</artifactId>
-    <version>0.13.0</version>
-    <relativePath>..</relativePath>
-  </parent>
-  <groupId>org.apache.yetus</groupId>
-  <artifactId>yetus-minimaven-plugin</artifactId>
-  <description>Apache Yetus Maven Build Tools</description>
-  <name>Apache Yetus - MiniMaven Plugin</name>
-  <packaging>maven-plugin</packaging>
-
-  <dependencies>
-    <dependency>
-        <groupId>org.apache.maven</groupId>
-        <artifactId>maven-plugin-api</artifactId>
-        <version>${maven.plugin.api.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>commons-io</groupId>
-        <artifactId>commons-io</artifactId>
-        <version>${commons.io.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.plugin-tools</groupId>
-      <artifactId>maven-plugin-annotations</artifactId>
-      <version>${maven.api.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.yetus</groupId>
-      <artifactId>audience-annotations</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-compiler-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-plugin-plugin</artifactId>
-        <version>${maven.api.version}</version>
-        <executions>
-          <execution>
-            <id>default-descriptor</id>
-            <phase>compile</phase>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-
-    </plugins>
-  </build>
-
-</project>
diff --git a/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java b/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java
deleted file mode 100644
index b473904..0000000
--- a/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Mini-maven just has the bits necessary to build Apache Yetus.
- */
-package org.apache.yetus.maven.plugin.fileops;


[yetus] 05/10: YETUS-889. change golangci-lint to give all output (#177)

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch YETUS-1034-release
in repository https://gitbox.apache.org/repos/asf/yetus.git

commit 776481bdfb02afbb872e741a54ba05ffb918345c
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Thu Oct 29 08:54:42 2020 -0700

    YETUS-889. change golangci-lint to give all output (#177)
---
 .../in-progress/precommit/plugins/golangcilint.html.md              | 2 +-
 precommit/src/main/shell/test-patch.d/golangci.sh                   | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/asf-site-src/source/documentation/in-progress/precommit/plugins/golangcilint.html.md b/asf-site-src/source/documentation/in-progress/precommit/plugins/golangcilint.html.md
index fdd6acf..5037393 100644
--- a/asf-site-src/source/documentation/in-progress/precommit/plugins/golangcilint.html.md
+++ b/asf-site-src/source/documentation/in-progress/precommit/plugins/golangcilint.html.md
@@ -27,7 +27,7 @@ Test
 
 # Description
 
-NOTE: Go support is experimental.  Additionally, this plug-in only supports Go using Go modules.
+NOTE: This plug-in only supports Go using Go modules.
 
 Provides support for
 [golangci-lint](https://github.com/golangci/golangci-lint).  This
diff --git a/precommit/src/main/shell/test-patch.d/golangci.sh b/precommit/src/main/shell/test-patch.d/golangci.sh
index 1866784..9d9ef47 100755
--- a/precommit/src/main/shell/test-patch.d/golangci.sh
+++ b/precommit/src/main/shell/test-patch.d/golangci.sh
@@ -83,9 +83,11 @@ function golangcilint_exec
     gargs=("cat")
   fi
 
-  args=("--color=never")
+  args+=("--max-issues-per-linter=0")
+  args+=("--max-same-issues=0")
   args+=("--out-format=line-number")
   args+=("--print-issued-lines=false")
+  args+=("--color=never")
 
   if [[ -f "${GOLANGCI_CONFIG}" ]]; then
     args+=("--config" "${GOLANGCI_CONFIG}")
@@ -103,7 +105,7 @@ function golangcilint_exec
       echo "${p}${REPLY}" >> "${PATCH_DIR}/${repostatus}-golangcilint-result.txt"
     done < <("${GOLANGCI_LINT}" run "${args[@]}" ./... 2>&1 \
       | "${gargs[@]}" \
-      | sort -t : -k 1,1 -k 2,2n -k 3,3n)
+      | sort -t : -k 1,1 -k 2,2n -k 3,3n -k 4)
     popd >/dev/null || return 1
   done
   return 0


[yetus] 08/10: YETUS-1043. github action website linkchecker doesn't work for releases (#182)

Posted by aw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch YETUS-1034-release
in repository https://gitbox.apache.org/repos/asf/yetus.git

commit 19e57f3e0f8dd89b3b668dc36f10d9d4275503ba
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Fri Oct 30 07:09:19 2020 -0700

    YETUS-1043. github action website linkchecker doesn't work for releases (#182)
---
 website-tester.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/website-tester.sh b/website-tester.sh
index c1bf2c6..8e4367f 100755
--- a/website-tester.sh
+++ b/website-tester.sh
@@ -27,7 +27,7 @@ echo "::endgroup::"
 
 echo "::group::tar"
 tar -C /tmp/website/html --strip-components 1 \
-  -xpf yetus-dist/target/artifacts/apache-yetus-*-SNAPSHOT-site.tar.gz
+  -xpf yetus-dist/target/artifacts/apache-yetus-*-site.tar.gz
 echo "::endgroup::"
 
 echo "::group::start apache httpd"