Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.2.8 changes #279

Merged
merged 13 commits into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
name: Java CI with Maven

on:
workflow_dispatch:
push:
branches: [ master ]
paths-ignore:
Expand All @@ -13,7 +14,7 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8', '11', '17']
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
104 changes: 67 additions & 37 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,11 @@
<version>${junixsocket.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.kohlschutter.junixsocket</groupId>
<artifactId>junixsocket-native-common</artifactId>
<version>${junixsocket.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.kohlschutter</groupId>
<artifactId>compiler-annotations</artifactId>
<version>1.5.2</version>
<scope>provided</scope>
norrisjeremy marked this conversation as resolved.
Show resolved Hide resolved
<optional>true</optional>
</dependency>
<dependency>
Expand Down Expand Up @@ -163,6 +158,12 @@
<version>1.15</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.kohlschutter.junixsocket</groupId>
<artifactId>junixsocket-native-common</artifactId>
<version>${junixsocket.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down Expand Up @@ -207,6 +208,9 @@
<version>16</version>
</requireJavaVersion>
<dependencyConvergence />
<banDuplicatePomDependencyVersions />
<reactorModuleConvergence />
<requireUpperBoundDeps />
</rules>
</configuration>
</execution>
Expand Down Expand Up @@ -273,7 +277,6 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<fork>true</fork>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For whatever reason, maven-compiler-plugin sometimes doesn't display compiler warnings if it tries to fork a javac process.
So I removed it here and opted to just place it inside the errorprone profile, since we only need to fork when using errorprone.

<release>8</release>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
Expand Down Expand Up @@ -480,6 +483,21 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<version>2.7.4</version>
<configuration>
<includeProvidedScope>false</includeProvidedScope>
</configuration>
<executions>
<execution>
<goals>
<goal>makeBom</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand All @@ -489,6 +507,11 @@
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
Expand All @@ -509,6 +532,28 @@
<artifactId>maven-dependency-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<failOnViolation>true</failOnViolation>
<logViolationsToConsole>true</logViolationsToConsole>
<violationSeverity>warning</violationSeverity>
<configLocation>google_checks.xml</configLocation>
<sourceDirectories>
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
<sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
<sourceDirectory>${project.basedir}/examples</sourceDirectory>
<sourceDirectory>${project.basedir}/src/main/java9</sourceDirectory>
<sourceDirectory>${project.basedir}/src/main/java10</sourceDirectory>
<sourceDirectory>${project.basedir}/src/main/java11</sourceDirectory>
<sourceDirectory>${project.basedir}/src/main/java15</sourceDirectory>
<sourceDirectory>${project.basedir}/src/main/java16</sourceDirectory>
<sourceDirectory>${project.basedir}/src/main/java-templates</sourceDirectory>
</sourceDirectories>
</configuration>
</plugin>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
Expand All @@ -529,6 +574,19 @@
</directories>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<configuration>
<excludes>
<exclude>com/jcraft/jsch/JavaVersion.class</exclude>
<exclude>com/jcraft/jsch/UnixDomainSocketFactory.class</exclude>
<exclude>META-INF/versions/9/com/jcraft/jsch/JavaVersion.class</exclude>
<exclude>META-INF/versions/10/com/jcraft/jsch/JavaVersion.class</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
Expand All @@ -539,7 +597,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -560,15 +617,6 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<configuration>
<excludes>
<exclude>com/jcraft/jsch/JavaVersion.class</exclude>
<exclude>com/jcraft/jsch/UnixDomainSocketFactory.class</exclude>
<exclude>META-INF/versions/9/com/jcraft/jsch/JavaVersion.class</exclude>
<exclude>META-INF/versions/10/com/jcraft/jsch/JavaVersion.class</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>default-prepare-agent</id>
Expand Down Expand Up @@ -607,6 +655,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<fork>true</fork>
<compilerArgs combine.children="append">
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne</arg>
Expand All @@ -624,7 +673,7 @@
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.17.0</version>
<version>2.18.0</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand Down Expand Up @@ -680,25 +729,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<encoding>UTF-8</encoding>
<failOnViolation>true</failOnViolation>
<logViolationsToConsole>true</logViolationsToConsole>
<violationSeverity>warning</violationSeverity>
<configLocation>google_checks.xml</configLocation>
<sourceDirectories>
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
<sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
<sourceDirectory>${project.basedir}/examples</sourceDirectory>
<sourceDirectory>${project.basedir}/src/main/java9</sourceDirectory>
<sourceDirectory>${project.basedir}/src/main/java10</sourceDirectory>
<sourceDirectory>${project.basedir}/src/main/java11</sourceDirectory>
<sourceDirectory>${project.basedir}/src/main/java15</sourceDirectory>
<sourceDirectory>${project.basedir}/src/main/java16</sourceDirectory>
<sourceDirectory>${project.basedir}/src/main/java-templates</sourceDirectory>
</sourceDirectories>
</configuration>
<executions>
<execution>
<id>validate</id>
Expand Down
1 change: 0 additions & 1 deletion src/main/java9/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
3 changes: 3 additions & 0 deletions src/test/resources/docker/Dockerfile.sshagent
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Copy link
Contributor Author

@norrisjeremy norrisjeremy Feb 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with the latest Ubuntu 22.04 based Github runners turned out to be that the user inside the Azure VM has a GID of 123, which conflicts with the built-in ntp group inside the Alpine container.
This causes the addgroup command below to fail, since it can't add a testuser group with the same GID.
The gross hack above is to check for any UID/GID conflicts inside the Alpine container and remove any conflicting users and/or groups.

addgroup -g $testgid testuser && \
adduser -Du $testuid -G testuser -Hh /testuser -s /bin/sh -g testuser testuser && \
mkdir /testuser && \
Expand Down