kandi background
Explore Kits

testcontainers-java | Java library that supports JUnit tests, providing lightweight | Functional Testing library

 by   testcontainers Java Version: 1.17.1 License: MIT

 by   testcontainers Java Version: 1.17.1 License: MIT

Download this library from

kandi X-RAY | testcontainers-java Summary

testcontainers-java is a Java library typically used in Testing, Functional Testing, Spring Boot, Docker, Selenium applications. testcontainers-java has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub, Maven.
Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • testcontainers-java has a medium active ecosystem.
  • It has 5847 star(s) with 1162 fork(s). There are 134 watchers for this library.
  • There were 2 major release(s) in the last 6 months.
  • There are 391 open issues and 1304 have been closed. On average issues are closed in 62 days. There are 155 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of testcontainers-java is 1.17.1
testcontainers-java Support
Best in #Functional Testing
Average in #Functional Testing
testcontainers-java Support
Best in #Functional Testing
Average in #Functional Testing

quality kandi Quality

  • testcontainers-java has 0 bugs and 0 code smells.
testcontainers-java Quality
Best in #Functional Testing
Average in #Functional Testing
testcontainers-java Quality
Best in #Functional Testing
Average in #Functional Testing

securitySecurity

  • testcontainers-java has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • testcontainers-java code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
testcontainers-java Security
Best in #Functional Testing
Average in #Functional Testing
testcontainers-java Security
Best in #Functional Testing
Average in #Functional Testing

license License

  • testcontainers-java is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
testcontainers-java License
Best in #Functional Testing
Average in #Functional Testing
testcontainers-java License
Best in #Functional Testing
Average in #Functional Testing

buildReuse

  • testcontainers-java releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • testcontainers-java saves you 12983 person hours of effort in developing the same functionality from scratch.
  • It has 28460 lines of code, 2508 functions and 549 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
testcontainers-java Reuse
Best in #Functional Testing
Average in #Functional Testing
testcontainers-java Reuse
Best in #Functional Testing
Average in #Functional Testing
Top functions reviewed by kandi - BETA

kandi has reviewed testcontainers-java and discovered the below as its top functions. This is intended to give you an instant insight into testcontainers-java implemented functionality, and help decide if they suit your requirements.

  • Synchronously sends the messages in the queue .
  • Get an object from the cache .
  • Get the total number of issues in this project .
  • enqueue a mail message
  • Creates a search result from the given query response .
  • Search by term .
  • Simple name space .
  • set value
  • Gets the demo entity .
  • Set a value

testcontainers-java Key Features

Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.

nexus-staging-maven-plugin: maven deploy failed: An API incompatibility was encountered while executing

copy iconCopydownload iconDownload
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
mvn deploy
<plugin>
  <groupId>org.sonatype.plugins</groupId>
  <artifactId>nexus-staging-maven-plugin</artifactId>
  <version>1.6.8</version>
  <extensions>true</extensions>
  <configuration>
    <serverId>ossrh</serverId>
    <nexusUrl>https://s01.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>
-----------------------
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
mvn deploy
<plugin>
  <groupId>org.sonatype.plugins</groupId>
  <artifactId>nexus-staging-maven-plugin</artifactId>
  <version>1.6.8</version>
  <extensions>true</extensions>
  <configuration>
    <serverId>ossrh</serverId>
    <nexusUrl>https://s01.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>

Uploading a file to testcontainer FTP server fails with Connection refused after being connected

copy iconCopydownload iconDownload
    private static final int PASSIVE_MODE_PORT = 21000;
    ...
    private static final FixedHostPortGenericContainer ftp = new FixedHostPortGenericContainer<>(
            "delfer/alpine-ftp-server:latest")
            .withFixedExposedPort(PASSIVE_MODE_PORT, PASSIVE_MODE_PORT)
            .withExposedPorts(PORT)
            .withEnv("USERS", USER + "|" + PASSWORD)
            .withEnv("MIN_PORT", String.valueOf(PASSIVE_MODE_PORT))
            .withEnv("MAX_PORT", String.valueOf(PASSIVE_MODE_PORT));
    private static FixedHostPortGenericContainer ftp = new FixedHostPortGenericContainer<>(
            "delfer/alpine-ftp-server:latest")
            .withExposedPorts(PORT)
            .withEnv("USERS", USER + "|" + PASSWORD);

    @BeforeAll
    public static void staticSetup() throws Exception {
        Integer freePort = 0;
        try (ServerSocket socket = new ServerSocket(0)) {
            freePort = socket.getLocalPort();
        }
        ftp = (FixedHostPortGenericContainer)ftp.withFixedExposedPort(freePort, freePort)
                .withEnv("MIN_PORT", String.valueOf(freePort))
                .withEnv("MAX_PORT", String.valueOf(freePort));

        ftp.start();
    }
-----------------------
    private static final int PASSIVE_MODE_PORT = 21000;
    ...
    private static final FixedHostPortGenericContainer ftp = new FixedHostPortGenericContainer<>(
            "delfer/alpine-ftp-server:latest")
            .withFixedExposedPort(PASSIVE_MODE_PORT, PASSIVE_MODE_PORT)
            .withExposedPorts(PORT)
            .withEnv("USERS", USER + "|" + PASSWORD)
            .withEnv("MIN_PORT", String.valueOf(PASSIVE_MODE_PORT))
            .withEnv("MAX_PORT", String.valueOf(PASSIVE_MODE_PORT));
    private static FixedHostPortGenericContainer ftp = new FixedHostPortGenericContainer<>(
            "delfer/alpine-ftp-server:latest")
            .withExposedPorts(PORT)
            .withEnv("USERS", USER + "|" + PASSWORD);

    @BeforeAll
    public static void staticSetup() throws Exception {
        Integer freePort = 0;
        try (ServerSocket socket = new ServerSocket(0)) {
            freePort = socket.getLocalPort();
        }
        ftp = (FixedHostPortGenericContainer)ftp.withFixedExposedPort(freePort, freePort)
                .withEnv("MIN_PORT", String.valueOf(freePort))
                .withEnv("MAX_PORT", String.valueOf(freePort));

        ftp.start();
    }

Community Discussions

Trending Discussions on testcontainers-java
  • nexus-staging-maven-plugin: maven deploy failed: An API incompatibility was encountered while executing
  • Uploading a file to testcontainer FTP server fails with Connection refused after being connected
  • Testcontainers in Windows environment on GitHub Actions: &quot;Could not find a valid Docker environment. Please see logs and check configuration&quot;
Trending Discussions on testcontainers-java

QUESTION

nexus-staging-maven-plugin: maven deploy failed: An API incompatibility was encountered while executing

Asked 2022-Feb-11 at 22:39

This worked fine for me be building under Java 8. Now under Java 17.01 I get this when I do mvn deploy.

mvn install works fine. I tried 3.6.3 and 3.8.4 and updated (I think) all my plugins to the newest versions.

Any ideas?

[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:de
ploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null


[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @149f5761
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sona
type.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.son
atype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null

POM:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>io.github.sproket</groupId>
    <artifactId>persism</artifactId>
    <version>2.0.0</version>
    <packaging>jar</packaging>


    <build>
        <sourceDirectory>./src</sourceDirectory>
        <testSourceDirectory>./test</testSourceDirectory>
        <testResources>
            <testResource>
                <directory>./test</directory>
                <!--                <includes>-->
                <!--                    <include>*.*</include>-->
                <!--                </includes>-->
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <!-- MSSQL does not seem to able to connect with 16 -->
                <configuration>
                    <source>17</source>
                    <target>17</target>
<!--                    <compilerArgs>-->
<!--                        <arg>-parameters</arg>-->
<!--                    </compilerArgs>-->
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Automatic-Module-Name>sproket.github.io.persism</Automatic-Module-Name>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <excludePackageNames>net.sf.persism.log*;net.sf.persism.logging.*</excludePackageNames>
                    <source>17</source>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M5</version>
                <configuration>
                    <excludedGroups>net.sf.persism.categories.ExternalDB,net.sf.persism.categories.TestContainerDB
                    </excludedGroups>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <name>persism</name>
    <description>A zero ceremony ORM for Java</description>
    <url>https://github.com/sproket/Persism</url>

    <properties>
        <java.version>17</java.version>
        <maven.compiler.release>17</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <licenses>
        <license>
            <name>BSD-3-Clause License</name>
            <url>https://github.com/sproket/Persism/blob/master/license.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Dan Howard</name>
            <email>--------------------------</email>
            <organization>io.github</organization>
            <organizationUrl>https://sproket.github.io/Persism/</organizationUrl>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <scm>
        <connection>scm:git:git://github.com/sproket/Persism.git</connection>
        <developerConnection>scm:git:ssh://github.com/sproket/Persism.git</developerConnection>
        <url>https://github.com/sproket/Persism</url>
    </scm>

    <profiles>
        <profile>
            <id>include-test-containers-db</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>3.0.0-M5</version>
                        <configuration>
                            <excludedGroups>net.sf.persism.categories.ExternalDB</excludedGroups>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>exclude-test-containers-db</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>3.0.0-M5</version>
                        <configuration>
                            <excludedGroups>net.sf.persism.categories.TestContainerDB</excludedGroups>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>3.2.0</version>
                        <configuration>
                            <archive>
                                <manifestEntries>
                                    <Automatic-Module-Name>sproket.github.io.persism</Automatic-Module-Name>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.2.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <release>17</release>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>


    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.carrotsearch</groupId>
            <artifactId>junit-benchmarks</artifactId>
            <version>0.7.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
            <version>1.15.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.2.7</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.14.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.14.1</version>
            <scope>provided</scope>
        </dependency>


        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.4</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.firebirdsql.jdbc</groupId>
            <artifactId>jaybird</artifactId>
            <version>4.0.2.java8</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.firebirdsql</groupId>
            <artifactId>firebird-testcontainers-java</artifactId>
            <version>1.1.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.200</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <!-- using older version as 2.5.1 collides with ucanaccess -->
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>2.5.1</version>
            <scope>test</scope>
            <!--            <classifier>debug</classifier>-->
        </dependency>

        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
            <version>10.8.2.2</version>
            <scope>test</scope>
        </dependency>

        <!-- OR -Djdk.tls.client.protocols=TLSv1 -->
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>8.4.1.jre8</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>mssqlserver</artifactId>
            <version>1.15.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.23</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>mysql</artifactId>
            <version>1.15.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>net.sourceforge.jtds</groupId>
            <artifactId>jtds</artifactId>
            <version>1.3.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.oracle.database.jdbc</groupId>
            <artifactId>ojdbc8</artifactId>
            <version>21.3.0.0</version>
            <scope>test</scope>
        </dependency>

        <!--        <dependency>-->
        <!--            <groupId>com.oracle</groupId>-->
        <!--            <artifactId>ojdbc6</artifactId>-->
        <!--            <version>11.2.0.4</version>-->
        <!--            <scope>test</scope>-->
        <!--        </dependency>-->

        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>9.2-1004-jdbc41</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>postgresql</artifactId>
            <version>1.15.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
            <version>3.34.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>net.sf.ucanaccess</groupId>
            <artifactId>ucanaccess</artifactId>
            <version>5.0.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.ibm.informix</groupId>
            <artifactId>informix-jdbc-complete</artifactId>
            <version>4.50.4.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.toddfast.typeconverter</groupId>
            <artifactId>typeconverter</artifactId>
            <version>1.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.reflections</groupId>
            <artifactId>reflections</artifactId>
            <version>0.9.11</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api -->
        <dependency>
            <groupId>javax.persistence</groupId>
            <artifactId>javax.persistence-api</artifactId>
            <version>2.2</version>
            <scope>test</scope>
        </dependency>


        <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/cobertura-maven-plugin -->
        <!-- DOES NOT WORK with JAVA 8 + -->
        <!--        <dependency>-->
        <!--            <groupId>org.codehaus.mojo</groupId>-->
        <!--            <artifactId>cobertura-maven-plugin</artifactId>-->
        <!--            <version>2.7</version>-->
        <!--            <scope>test</scope>-->
        <!--            <exclusions>-->
        <!--                <exclusion>-->
        <!--                    <groupId>com.sun</groupId>-->
        <!--                    <artifactId>tools</artifactId>-->
        <!--                </exclusion>-->
        <!--            </exclusions>-->
        <!--        </dependency>-->


    </dependencies>

</project>

ANSWER

Answered 2022-Feb-11 at 22:39

Update: Version 1.6.9 has been released and should fix this issue! 🎉


This is actually a known bug, which is now open for quite a while: OSSRH-66257. There are two known workarounds:

1. Open Modules

As a workaround, use --add-opens to give the library causing the problem access to the required classes:

export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
mvn deploy

2. Manage Upstream Dependencies

Or you can update the library that causes the problem:

<plugin>
  <groupId>org.sonatype.plugins</groupId>
  <artifactId>nexus-staging-maven-plugin</artifactId>
  <version>1.6.8</version>
  <extensions>true</extensions>
  <configuration>
    <serverId>ossrh</serverId>
    <nexusUrl>https://s01.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>

Source https://stackoverflow.com/questions/70153962

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install testcontainers-java

You can download it from GitHub, Maven.
You can use testcontainers-java like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the testcontainers-java component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Share this Page

share link
Compare Functional Testing Libraries with Highest Support
Compare Functional Testing Libraries with Permissive License
Compare Functional Testing Libraries with Highest Reuse
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.