Closed juangon closed 3 years ago
@juangon could you prepare a simple reproducer? Thanks.
I thought we removed it...
I can confirm that there are various testcontainers entries in the universe BOM: https://repo1.maven.org/maven2/io/quarkus/quarkus-universe-bom/1.5.2.Final/quarkus-universe-bom-1.5.2.Final.pom
I had a litte "fun" with https://github.com/quarkusio/quarkus-platform/blob/master/bom/runtime/pom.xml and I was able to narrow it down. The following listing shows which BOM is dragging in which testcontainers dependency:
quarkus-hazelcast-client-bom:
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.12.4</version>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.12.4</version>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.12.4</version>
kogito-bom:
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.12.4</version>
<groupId>org.testcontainers</groupId>
<artifactId>kafka</artifactId>
<version>1.12.4</version>
cassandra-quarkus-bom:
<groupId>org.testcontainers</groupId>
<artifactId>cassandra</artifactId>
<version>1.12.4</version>
I am not sure whether the cassandra
bit is problematic since it doesn't pull in the main testcontainers artifact.
And now another "fun" part: https://issues.apache.org/jira/browse/MNG-5600 Meaning no exclusions for BOM imports and that means (AFAICS) that testcontainers has to be removed from the respective upstream BOMs.
Edit: Or the maven-replacer-plugin
is utilized to remove all testcontainers deps...
testcontainers
won't be removed from the BOM as we rely on it for DevServices
Describe the bug It seems that it isn't possible to upgrade org.testcontainers:mariadb or other container dependencies to 1.14.3 in a custom project.
Workaround is to explicitely add root org.test.container dependency in pom.xml
Expected behavior No errors when using any container
getJdbcUrl()
method after upgrading org.testcontainers:mariadb to 1.14.3Actual behavior Error while executing tests are thrown:
To Reproduce Steps to reproduce the behavior:
container.getJdbcUrl()
in overridenstart
method asquarkus.datasource.jdbc.url
property.Configuration
Screenshots (If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
uname -a
orver
: 5.3.0-51-generic #44~18.04.2-Ubuntujava -version
: openjdk version "11.0.7mvnw --version
orgradlew --version
):Additional context (Add any other context about the problem here.)