Skip to content

Commit 12f7ce5

Browse files
bmuschkobsideup
authored andcommitted
Dependencies should apply to the proper scope/configuration (#969)
Only test case implementations use TestContainer dependencies, not production source code. Those dependencies need to be made available for src/test/java.
1 parent 25ad069 commit 12f7ce5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/usage.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,14 @@ Maven style:
5151
<groupId>org.testcontainers</groupId>
5252
<artifactId>--artifact name--</artifactId>
5353
<version>--latest version--</version>
54+
<scope>test</scope>
5455
</dependency>
5556
```
5657

5758
Gradle style:
5859

5960
```
60-
compile group: 'org.testcontainers', name: '--artifact name--', version: '--latest version--'
61+
testImplementation group: 'org.testcontainers', name: '--artifact name--', version: '--latest version--'
6162
```
6263

6364

@@ -70,6 +71,7 @@ Use the following dependency description instead:
7071
<groupId>com.github.testcontainers.testcontainers-java</groupId>
7172
<artifactId>--artifact name--</artifactId>
7273
<version>-SNAPSHOT</version>
74+
<scope>test</scope>
7375
</dependency>
7476

7577
A specific git revision (such as `093a3a4628`) can be used as a fixed version instead. The JitPack maven repository must also be declared, e.g.:

0 commit comments

Comments
 (0)