diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml index 183ac51e..c96733e0 100644 --- a/.github/workflows/javadoc.yml +++ b/.github/workflows/javadoc.yml @@ -19,7 +19,7 @@ jobs: java-version: '17' check-latest: true - name: Build Javadoc - run: mvn javadoc:javadoc + run: mvn -B -V javadoc:javadoc --file pom.xml - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4 with: diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 77cdc4f7..ba2a157d 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -4,6 +4,7 @@ name: Java CI with Maven on: + workflow_dispatch: push: branches: [ master ] paths-ignore: @@ -13,7 +14,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: java: ['8', '11', '17'] @@ -33,12 +34,13 @@ jobs: java-version: '17' check-latest: true - name: Build with Maven - run: mvn -B -DskipTests=true package --file pom.xml + run: mvn -B -V -DskipTests=true package --file pom.xml - uses: actions/upload-artifact@v3 with: name: java-${{ matrix.java }}-jars path: | **/target/*.jar + **/target/bom.* if: always() - name: Set up test JDK ${{ matrix.java }} uses: actions/setup-java@v3 @@ -47,7 +49,7 @@ jobs: java-version: ${{ matrix.java }} check-latest: true - name: Test with Maven - run: mvn -B -P coverage verify -Denforcer.skip=true -Dmaven.resources.skip=true -Dmaven.main.skip=true -Dassembly.skipAssembly=true -Dmaven.javadoc.skip=true -DskipITs=false --file pom.xml + run: mvn -B -V -P coverage verify -Denforcer.skip=true -Dmaven.resources.skip=true -Dmaven.main.skip=true -Dassembly.skipAssembly=true -Dmaven.javadoc.skip=true -DskipITs=false --file pom.xml - uses: actions/upload-artifact@v3 with: name: java-${{ matrix.java }}-testresults diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index ca5ab4ba..6686a643 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.0/apache-maven-3.9.0-bin.zip wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar diff --git a/pom.xml b/pom.xml index 129c4486..5bb599b9 100644 --- a/pom.xml +++ b/pom.xml @@ -63,7 +63,7 @@ https://github.com/mwiede/jsch/blob/master/LICENSE.txt - BSD + Revised BSD https://github.com/mwiede/jsch/blob/master/LICENSE.JZlib.txt @@ -92,18 +92,6 @@ ${junixsocket.version} true - - com.kohlschutter.junixsocket - junixsocket-native-common - ${junixsocket.version} - true - - - com.kohlschutter - compiler-annotations - 1.5.2 - true - net.java.dev.jna jna-jpms @@ -163,6 +151,12 @@ 1.15 test + + com.kohlschutter.junixsocket + junixsocket-native-common + ${junixsocket.version} + test + com.google.guava guava @@ -207,6 +201,9 @@ 16 + + + @@ -273,12 +270,11 @@ maven-compiler-plugin 3.10.1 - true 8 true true - -Xlint:all,-processing + -Xlint:all,-processing,-classfile -Werror @@ -480,6 +476,18 @@ + + org.cyclonedx + cyclonedx-maven-plugin + 2.7.5 + + + + makeBom + + + + org.apache.maven.plugins maven-release-plugin @@ -489,6 +497,11 @@ release + + org.apache.maven.plugins + maven-gpg-plugin + 3.0.1 + org.apache.maven.plugins maven-deploy-plugin @@ -509,6 +522,28 @@ maven-dependency-plugin 3.5.0 + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.2.1 + + true + true + warning + google_checks.xml + + ${project.build.sourceDirectory} + ${project.build.testSourceDirectory} + ${project.basedir}/examples + ${project.basedir}/src/main/java9 + ${project.basedir}/src/main/java10 + ${project.basedir}/src/main/java11 + ${project.basedir}/src/main/java15 + ${project.basedir}/src/main/java16 + ${project.basedir}/src/main/java-templates + + + net.revelc.code.formatter formatter-maven-plugin @@ -529,6 +564,19 @@ + + org.jacoco + jacoco-maven-plugin + 0.8.8 + + + com/jcraft/jsch/JavaVersion.class + com/jcraft/jsch/UnixDomainSocketFactory.class + META-INF/versions/9/com/jcraft/jsch/JavaVersion.class + META-INF/versions/10/com/jcraft/jsch/JavaVersion.class + + + @@ -539,7 +587,6 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 sign-artifacts @@ -560,15 +607,6 @@ org.jacoco jacoco-maven-plugin - 0.8.8 - - - com/jcraft/jsch/JavaVersion.class - com/jcraft/jsch/UnixDomainSocketFactory.class - META-INF/versions/9/com/jcraft/jsch/JavaVersion.class - META-INF/versions/10/com/jcraft/jsch/JavaVersion.class - - default-prepare-agent @@ -607,6 +645,7 @@ org.apache.maven.plugins maven-compiler-plugin + true -XDcompilePolicy=simple -Xplugin:ErrorProne @@ -624,7 +663,7 @@ com.google.errorprone error_prone_core - 2.17.0 + 2.18.0 @@ -680,25 +719,6 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.2.1 - - UTF-8 - true - true - warning - google_checks.xml - - ${project.build.sourceDirectory} - ${project.build.testSourceDirectory} - ${project.basedir}/examples - ${project.basedir}/src/main/java9 - ${project.basedir}/src/main/java10 - ${project.basedir}/src/main/java11 - ${project.basedir}/src/main/java15 - ${project.basedir}/src/main/java16 - ${project.basedir}/src/main/java-templates - - validate diff --git a/src/main/java9/module-info.java b/src/main/java9/module-info.java index a245540d..28e87027 100644 --- a/src/main/java9/module-info.java +++ b/src/main/java9/module-info.java @@ -7,7 +7,6 @@ requires static org.slf4j; requires static org.bouncycastle.provider; requires static org.newsclub.net.unix; - requires static com.kohlschutter.junixsocket.nativecommon; requires static com.sun.jna; requires static com.sun.jna.platform; } diff --git a/src/test/resources/docker/Dockerfile.sshagent b/src/test/resources/docker/Dockerfile.sshagent index f695ab3f..b73d917f 100644 --- a/src/test/resources/docker/Dockerfile.sshagent +++ b/src/test/resources/docker/Dockerfile.sshagent @@ -5,6 +5,9 @@ RUN apk update && \ apk upgrade && \ apk add openssh su-exec && \ rm /var/cache/apk/* && \ + if [ "$testuid" -gt 0 ]; then if egrep "^[^:]+:x:$testuid:" /etc/passwd; then deluser "$(egrep "^[^:]+:x:$testuid:" /etc/passwd | cut -d: -f1)"; fi; fi && \ + if [ "$testgid" -gt 0 ]; then if egrep "^[^:]+:x:[^:]+:$testgid:" /etc/passwd; then deluser "$(egrep "^[^:]+:x:[^:]+:$testgid:" /etc/passwd | cut -d: -f1)"; fi; fi && \ + if [ "$testgid" -gt 0 ]; then if egrep "^[^:]+:x:$testgid:" /etc/group; then delgroup "$(egrep "^[^:]+:x:$testgid:" /etc/group | cut -d: -f1)"; fi; fi && \ addgroup -g $testgid testuser && \ adduser -Du $testuid -G testuser -Hh /testuser -s /bin/sh -g testuser testuser && \ mkdir /testuser && \