jira-importer opened a new issue, #295: URL: https://github.com/apache/maven-dependency-analyzer/issues/295
**[Jakub Bochenski](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jbochenski)** opened **[MDEP-977](https://issues.apache.org/jira/browse/MDEP-977?redirect=false)** and commented PostgreSQLContainer extends GenericContainer which is a FailureDetectingExernalResource which then implements org.junit.rules.TestRule. I think the case when you use Testcontainers in your main sources, while also have JUnit tests in your test sources is not handled correctly: If you declare in pom.xml ``` <dependency> <groupId>org.testcontainers</groupId> <artifactId>postgresql</artifactId> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> <dependency> <groupId>org.testcontainers</groupId> <artifactId>testcontainers</artifactId> </dependency> ``` then the analyze will fail with: ``` [INFO] --- dependency:3.8.1:analyze-only (analyze-only) @ persistence-test --- [ERROR] Non-test scoped test only dependencies found: [ERROR] junit:junit:jar:4.13.2:compile ``` This is wrong - Junit needs to be in compile scope because of the Testcontainers classes extending it. --- **Affects:** 3.8.1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
