Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 2.4.0
* Update to Testcontainers v2

# 2.3.0
* Use Virtual Threads on Java 21+
* Minor optimizations
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>software.xdev</groupId>
<artifactId>testcontainers-advanced-imagebuilder-root</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
<packaging>pom</packaging>

<organization>
Expand Down Expand Up @@ -46,7 +46,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>11.1.0</version>
<version>12.0.1</version>
</dependency>
</dependencies>
<configuration>
Expand All @@ -71,7 +71,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.27.0</version>
<version>3.28.0</version>
<configuration>
<analysisCache>true</analysisCache>
<includeTests>true</includeTests>
Expand Down
4 changes: 2 additions & 2 deletions testcontainers-advanced-imagebuilder-demo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1-labs
# Stage 1: Build the dummy app
ARG JAVA_VERSION=21
ARG JAVA_VERSION=25
FROM eclipse-temurin:$JAVA_VERSION-jdk-alpine AS build-env

RUN apk add --no-cache bash
Expand All @@ -26,7 +26,7 @@ RUN echo "Executing '$MAVEN_BUILD_COMMAND'"
RUN ${MAVEN_BUILD_COMMAND}

# Stage 2: Build the executable image
FROM eclipse-temurin:21-jre-alpine
FROM eclipse-temurin:$JAVA_VERSION-jre-alpine

ARG user=dummy-app
ARG group=dummy-app
Expand Down
4 changes: 2 additions & 2 deletions testcontainers-advanced-imagebuilder-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<groupId>software.xdev</groupId>
<artifactId>testcontainers-advanced-imagebuilder-root</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
</parent>

<artifactId>testcontainers-advanced-imagebuilder-demo</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
<packaging>jar</packaging>

<organization>
Expand Down
4 changes: 2 additions & 2 deletions testcontainers-advanced-imagebuilder-dummy-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>software.xdev</groupId>
<artifactId>testcontainers-advanced-imagebuilder-dummy-app</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
<packaging>jar</packaging>

<organization>
Expand Down Expand Up @@ -82,7 +82,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>11.1.0</version>
<version>12.0.1</version>
</dependency>
</dependencies>
<configuration>
Expand Down
28 changes: 12 additions & 16 deletions testcontainers-advanced-imagebuilder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>software.xdev</groupId>
<artifactId>testcontainers-advanced-imagebuilder</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>testcontainers-advanced-imagebuilder</name>
Expand Down Expand Up @@ -56,19 +56,7 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.21.3</version>
<exclusions>
<!-- No JUnit 4 -->
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>software.xdev</groupId>
<artifactId>testcontainers-junit4-mock</artifactId>
<version>1.0.2</version>
<version>2.0.0</version>
</dependency>
<!-- Testcontainers is using outdated v1 -->
<dependency>
Expand All @@ -77,6 +65,14 @@
<version>2.0.17</version>
</dependency>

<!-- Explicitly declared to prevent incompatibilities -->
<!-- Original comes transitively from Testcontainers -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.20.0</version>
</dependency>

<!-- Tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down Expand Up @@ -295,7 +291,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>11.1.0</version>
<version>12.0.1</version>
</dependency>
</dependencies>
<configuration>
Expand All @@ -320,7 +316,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.27.0</version>
<version>3.28.0</version>
<configuration>
<analysisCache>true</analysisCache>
<includeTests>true</includeTests>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
import java.util.zip.GZIPOutputStream;

import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.function.TriFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.DockerClientFactory;
Expand All @@ -53,8 +55,6 @@
import org.testcontainers.images.builder.traits.DockerfileTrait;
import org.testcontainers.images.builder.traits.FilesTrait;
import org.testcontainers.images.builder.traits.StringsTrait;
import org.testcontainers.shaded.org.apache.commons.io.FileUtils;
import org.testcontainers.shaded.org.apache.commons.lang3.function.TriFunction;
import org.testcontainers.utility.Base58;
import org.testcontainers.utility.DockerImageName;
import org.testcontainers.utility.DockerLoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.shaded.org.apache.commons.io.FileUtils;
import org.testcontainers.shaded.org.apache.commons.io.IOUtils;

import software.xdev.testcontainers.imagebuilder.jgit.ignore.FastIgnoreRule;
import software.xdev.testcontainers.imagebuilder.jgit.ignore.IgnoreNode;
Expand Down Expand Up @@ -177,7 +177,7 @@ protected static Stream<Path> findFiles(
: Files.find(start, maxDepth, matcher, options);
}

@SuppressWarnings("java:S2789")
@SuppressWarnings({"java:S2789", "OptionalAssignedToNull"})
protected Map.Entry<Path, String> determineFileForTransfer(
final IgnoreNode ignoreNode,
final Set<String> alwaysIncludedRelativePaths,
Expand Down Expand Up @@ -213,7 +213,7 @@ protected Map.Entry<Path, String> determineFileForTransfer(
return outcomeDirs;
}

@SuppressWarnings("java:S2789")
@SuppressWarnings({"java:S2789", "OptionalAssignedToNull"})
protected Map.Entry<Path, String> determineParentDirectoryForTransfer(
final IgnoreNode ignoreNode,
final Set<String> alwaysIncludedRelativePaths,
Expand Down Expand Up @@ -261,7 +261,7 @@ protected String parentDirectory(final String dir)
: null;
}

@SuppressWarnings("java:S2789")
@SuppressWarnings({"java:S2789", "OptionalAssignedToNull"})
protected Optional<Map.Entry<Path, String>> shouldIgnore(
final IgnoreNode ignoreNode,
final Set<String> alwaysIncludedRelativePaths,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
import org.testcontainers.shaded.org.apache.commons.io.FileUtils;
import org.testcontainers.shaded.org.apache.commons.io.IOUtils;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;

import software.xdev.testcontainers.imagebuilder.transfer.fcm.FileContentModifier;

Expand Down