Skip to content

Commit

Permalink
Merge pull request #257 from camunda-community-hub/np-java-8
Browse files Browse the repository at this point in the history
Downgrade project to use Java 8 for the build pipeline
  • Loading branch information
npepinpe authored Jan 24, 2022
2 parents e3e262e + 1ae2dae commit 2ffe49c
Show file tree
Hide file tree
Showing 7 changed files with 277 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '17'
java-version: '8'
distribution: 'temurin'
cache: 'maven'
- name: Build
Expand Down
9 changes: 0 additions & 9 deletions .mvn/jvm.config

This file was deleted.

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -953,10 +953,9 @@ you will need to sign the [Contributor License Agreement](https://cla-assistant.
In order to build from source, you will need to install maven 3.6+. You can find more about it on
the [maven homepage](https://maven.apache.org/users/index.html).

While the project targets Java 8 for compatibility purposes, for development you will need at least
Java 11 - ideally Java 17, as that's what we use for continuous integration. We recommend installing
any flavour of OpenJDK such
as [Eclipse Temurin](https://projects.eclipse.org/projects/adoptium.temurin).
The project targets Java 8 for compatibility purposes, and runs its build pipeline on Eclipse
Temurin's Java 8 distribution. It will most likely work locally with other JDKs, but in case you
run into build errors, you can try that distribution.

Finally, you will need to [install Docker](https://docs.docker.com/get-docker/) on your local
machine.
Expand Down
19 changes: 11 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
<plugin.version.checkstyle>3.1.2</plugin.version.checkstyle>
<plugin.version.dependency>3.2.0</plugin.version.dependency>
<plugin.version.enforcer>3.0.0</plugin.version.enforcer>
<plugin.version.google-format>1.7</plugin.version.google-format>
<plugin.version.gpg>3.0.1</plugin.version.gpg>
<plugin.version.jar>3.2.2</plugin.version.jar>
<plugin.version.javadoc>3.3.1</plugin.version.javadoc>
Expand Down Expand Up @@ -244,12 +245,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.camunda</groupId>
<artifactId>zeebe-test-util</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
Expand Down Expand Up @@ -324,9 +319,8 @@
<configuration>
<java>
<googleJavaFormat>
<version>1.11.0</version>
<version>${plugin.version.google-format}</version>
<style>GOOGLE</style>
<reflowLongStrings>true</reflowLongStrings>
</googleJavaFormat>
<licenseHeader>
<file>${project.basedir}/HEADER</file>
Expand Down Expand Up @@ -455,8 +449,17 @@
<goal>enforce</goal>
</goals>
<configuration>
<!-- see more https://maven.apache.org/enforcer/enforcer-rules/index.html -->
<rules>
<banDuplicatePomDependencyVersions/>
<requireJavaVersion>
<version>[1.8,)</version>
</requireJavaVersion>
<requireMavenVersion>
<version>[3.6,)</version>
</requireMavenVersion>
<requireReleaseDeps/>
<requireUpperBoundDeps/>
</rules>
</configuration>
</execution>
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/io/zeebe/containers/ZeebeBrokerNodeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import io.camunda.zeebe.client.api.response.ProcessInstanceEvent;
import io.camunda.zeebe.model.bpmn.Bpmn;
import io.camunda.zeebe.model.bpmn.BpmnModelInstance;
import io.camunda.zeebe.test.util.asserts.TopologyAssert;
import io.zeebe.containers.util.TestUtils;
import io.zeebe.containers.util.TopologyAssert;
import java.io.IOException;
import java.nio.file.Path;
import java.time.Duration;
Expand Down Expand Up @@ -166,7 +166,7 @@ private void awaitUntilTopologyIsComplete(final ZeebeClient client) {
.untilAsserted(
() ->
TopologyAssert.assertThat(client.newTopologyRequest().send().join())
.isComplete(1, 1));
.isComplete(1, 1, 1));
}

private static Stream<Arguments> reuseDataTestCases() {
Expand Down
12 changes: 6 additions & 6 deletions src/test/java/io/zeebe/containers/cluster/ZeebeClusterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import io.camunda.zeebe.client.ZeebeClient;
import io.camunda.zeebe.client.api.response.Topology;
import io.camunda.zeebe.test.util.asserts.TopologyAssert;
import io.zeebe.containers.ZeebeGatewayNode;
import io.zeebe.containers.util.TopologyAssert;
import java.util.Optional;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -59,7 +59,7 @@ void shouldStartSingleNodeCluster() {
TopologyAssert.assertThat(topology)
.as("the topology is complete for a one broker, one partition cluster")
.hasBrokersCount(1)
.isComplete(1, 1);
.isComplete(1, 1, 1);
}

@Test
Expand Down Expand Up @@ -93,7 +93,7 @@ void shouldStartClusterWithEmbeddedGateways() {
TopologyAssert.assertThat(topology)
.as("the topology is complete with 2 partitions and 2 brokers")
.hasBrokersCount(2)
.isComplete(2, 2);
.isComplete(2, 2, 2);
}
}
}
Expand Down Expand Up @@ -125,7 +125,7 @@ void shouldStartClusterWithStandaloneGateway() {
TopologyAssert.assertThat(topology)
.as("the topology is complete for a one broker, one partition cluster")
.hasBrokersCount(1)
.isComplete(1, 1);
.isComplete(1, 1, 1);
}
}

Expand Down Expand Up @@ -160,8 +160,8 @@ void shouldStartClusterWithMixedGateways() {
.isEqualTo(1);
TopologyAssert.assertThat(topology)
.as("the topology is complete for a one broker, one partition cluster")
.hasBrokersCount(1)
.isComplete(1, 1);
.isComplete(1, 1, 1)
.hasBrokersCount(1);
}
}
}
Expand Down
Loading

0 comments on commit 2ffe49c

Please sign in to comment.