Skip to content

Commit

Permalink
Update dependencies, cleanup deprecations (#1760)
Browse files Browse the repository at this point in the history
* Update dependencies, cleanup deprecations

* Properly register candidate extensions

* Fix msec received stat logging

* Fix extension registration for <candidate/>

* Update jitsi-xmpp-extensions

* Update jicoco

* Run Maven in batch-mode

* Declare Java release version
  • Loading branch information
ibauersachs authored Nov 22, 2021
1 parent 7da4966 commit b5f3b42
Show file tree
Hide file tree
Showing 15 changed files with 151 additions and 185 deletions.
32 changes: 20 additions & 12 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,34 @@ on:
pull_request:
branches: [ master ]

env:
# Java version to use for the release
RELEASE_JAVA_VERSION: 8

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
java: [ 8, 11, 17 ]

name: Java ${{ matrix.java }}

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache local Maven repository
uses: actions/cache@v2

- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
distribution: temurin
java-version: ${{ matrix.java }}
cache: maven

- name: Build with Maven
run: ./resources/build.sh -Pcoverage
run: ./resources/build.sh -Pcoverage -B

- name: Upload coverage report
uses: codecov/codecov-action@v1
if: matrix.java == env.RELEASE_JAVA_VERSION
uses: codecov/codecov-action@v2
3 changes: 0 additions & 3 deletions jvb-api/jvb-api-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,6 @@
</executions>
<configuration>
<jvmTarget>1.8</jvmTarget>
<args>
<arg>-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi,io.ktor.util.KtorExperimentalAPI</arg>
</args>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ import io.ktor.server.engine.embeddedServer
import io.ktor.server.jetty.Jetty
import org.jitsi.utils.logging2.LoggerImpl
import kotlin.random.Random
import kotlin.time.Duration
import kotlin.time.ExperimentalTime
import kotlin.time.seconds

@ExperimentalTime
class WebSocketClientTest : ShouldSpec() {
override fun isolationMode(): IsolationMode? = IsolationMode.InstancePerLeaf
override fun isolationMode(): IsolationMode = IsolationMode.InstancePerLeaf

private val wsPort = Random.nextInt(49152, 65535).also {
println("Server running on port $it")
Expand Down Expand Up @@ -76,7 +76,7 @@ class WebSocketClientTest : ShouldSpec() {
ws.run()
ws.sendString("hello")
should("send a message") {
eventually(5.seconds) {
eventually(Duration.seconds(5)) {
wsServer.receivedMessages shouldHaveSize 1
}
wsServer.receivedMessages.first().shouldBeInstanceOf<Frame.Text>()
Expand All @@ -88,7 +88,7 @@ class WebSocketClientTest : ShouldSpec() {
ws.run()
ws.sendString("hello")
should("invoke the incoming message handler") {
eventually(5.seconds) {
eventually(Duration.seconds(5)) {
receivedMessages shouldHaveSize 1
}
receivedMessages.first().shouldBeInstanceOf<Frame.Text>()
Expand Down
3 changes: 1 addition & 2 deletions jvb-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<version>2.1-SNAPSHOT</version>
</parent>

<groupId>org.jitsi</groupId>
<artifactId>jvb-api-parent</artifactId>
<packaging>pom</packaging>

Expand All @@ -48,7 +47,7 @@
<plugin>
<groupId>com.github.gantsign.maven</groupId>
<artifactId>ktlint-maven-plugin</artifactId>
<version>1.7.0</version>
<version>${ktlint-maven-plugin.version}</version>
<executions>
<execution>
<id>format-and-check</id>
Expand Down
168 changes: 65 additions & 103 deletions jvb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@



<groupId>org.jitsi</groupId>
<artifactId>jitsi-videobridge</artifactId>
<packaging>jar</packaging>
<name>jitsi-videobridge</name>
Expand Down Expand Up @@ -61,7 +60,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1.1-jre</version>
<version>31.0.1-jre</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
Expand All @@ -81,7 +80,7 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>15.0</version>
<version>23.0.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.spotbugs/spotbugs-annotations -->
<dependency>
Expand All @@ -108,7 +107,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
<version>1.7.32</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -192,44 +191,56 @@
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry</artifactId>
<version>4.3.0</version>
<version>5.3.0</version>
<scope>runtime</scope>
</dependency>
<!-- test -->
<dependency>
<groupId>io.mockk</groupId>
<artifactId>mockk</artifactId>
<version>1.10.2</version>
<version>1.12.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework</groupId>
<artifactId>jersey-test-framework-core</artifactId>
<version>${jersey.version}</version>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-jetty</artifactId>
<version>${jersey.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<version>${jersey.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- We need this so that maven-surefire-plugin can run junit4 tests -->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.7.0</version>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -254,32 +265,12 @@
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-engine</artifactId>
<version>1.6.2</version>
<version>1.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.5.0</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down Expand Up @@ -448,34 +439,24 @@
<source>1.8</source>
<target>1.8</target>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-Xlint:all,-serial</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<systemPropertyVariables>
<java.util.logging.config.file>${project.basedir}/lib/logging.properties</java.util.logging.config.file>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.0.0</version>
<version>4.4.2.2</version>
<configuration>
<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
<includeTests>true</includeTests>
Expand All @@ -489,51 +470,25 @@
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<groupId>com.github.gantsign.maven</groupId>
<artifactId>ktlint-maven-plugin</artifactId>
<version>${ktlint-maven-plugin.version}</version>
<configuration>
<sourceRoots>
<sourceRoot>${project.basedir}/src/main/kotlin</sourceRoot>
</sourceRoots>
<testSourceRoots>
<testSourceRoot>${project.basedir}/src/test/kotlin</testSourceRoot>
</testSourceRoots>
</configuration>
<executions>
<execution>
<id>ktlint</id>
<phase>verify</phase>
<configuration>
<target name="ktlint">
<java taskname="ktlint" dir="${basedir}" fork="true" failonerror="true"
classpathref="maven.plugin.classpath" classname="com.pinterest.ktlint.Main">
<arg value="src/**/*.kt"/>
<!-- to generate report in checkstyle format prepend following args: -->
<!--
<arg value="[dash][dash]reporter=plain"/>
<arg value="[dash][dash]reporter=checkstyle,output=${project.build.directory}/ktlint.xml"/>
-->
<!-- see https://github.com/shyiko/ktlint#usage for more -->
</java>
</target>
</configuration>
<goals><goal>run</goal></goals>
</execution>
<execution>
<id>ktlint-format</id>
<configuration>
<target name="ktlint">
<java taskname="ktlint" dir="${basedir}" fork="true" failonerror="true"
classpathref="maven.plugin.classpath" classname="com.pinterest.ktlint.Main">
<arg value="-F"/>
<arg value="src/**/*.kt"/>
</java>
</target>
</configuration>
<goals><goal>run</goal></goals>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.pinterest</groupId>
<artifactId>ktlint</artifactId>
<version>0.41.0</version>
</dependency>
<!-- additional 3rd party ruleset(s) can be specified here -->
</dependencies>
</plugin>
<plugin>
<!-- Instructs the plugin to add the current package version in the jar manifest
Expand All @@ -551,19 +506,26 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>9.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
Loading

0 comments on commit b5f3b42

Please sign in to comment.