Skip to content

Commit

Permalink
overriding nexus plugin to handle java17, cleaning up kafka image (#342)
Browse files Browse the repository at this point in the history
* overriding nexus plugin to handle java17, cleaning up kafka image

* updating parent

---------

Co-authored-by: Andy Kruth <[email protected]>
  • Loading branch information
andykruth-ii and Andy Kruth authored Nov 3, 2023
1 parent 6ab5692 commit 1496a30
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class StreamRegistryIT {
private static ConfigurableApplicationContext context;

@ClassRule
public static KafkaContainer kafka = new KafkaContainer(TestUtils.kafkaImageName);
public static KafkaContainer kafka = new KafkaContainer(TestUtils.KAFKA_IMAGE_NAME);

@BeforeClass
public static void before() throws IOException {
Expand Down
25 changes: 24 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.expediagroup</groupId>
<artifactId>eg-oss-parent</artifactId>
<version>2.4.0</version>
<version>2.4.1</version>
</parent>

<groupId>com.expediagroup.streamplatform</groupId>
Expand Down Expand Up @@ -304,6 +304,29 @@
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<!--
Override parent nexus plugin to add dependencies that will work with Java 17.
https://issues.sonatype.org/browse/OSSRH-66257
https://stackoverflow.com/questions/70153962/nexus-staging-maven-plugin-maven-deploy-failed-an-api-incompatibility-was-enco
-->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus.staging.maven.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-nexus-staging</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
<dependencies>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.15</version> <!-- apparently this needs to be exactly this version -->
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
import org.testcontainers.utility.DockerImageName;

public class TestUtils {
public static DockerImageName kafkaImageName = DockerImageName.parse("confluentinc/cp-kafka:7.4.0");
public static final DockerImageName KAFKA_IMAGE_NAME = DockerImageName.parse("confluentinc/cp-kafka:7.4.0");
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class AgentIT {
.pollDelay(1, SECONDS);

@Rule
public KafkaContainer kafka = new KafkaContainer(TestUtils.kafkaImageName);
public KafkaContainer kafka = new KafkaContainer(TestUtils.KAFKA_IMAGE_NAME);

private String topicName;
private KafkaEventSender kafkaEventSender;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

public class StateIT {
@Rule
public KafkaContainer kafka = new KafkaContainer(TestUtils.kafkaImageName);
public KafkaContainer kafka = new KafkaContainer(TestUtils.KAFKA_IMAGE_NAME);

private final ObjectMapper mapper = new ObjectMapper();
private final ObjectNode configuration = mapper.createObjectNode();
Expand Down

0 comments on commit 1496a30

Please sign in to comment.