Issue
An error is thrown when running a single test:
Failed to resolve org.junit.platform:junit-platform-launcher:1.7.0
The test is launched by clicking on the button in the form of a green triangle next to the name of the method.
But if you run testing of the whole project through maven (lifecycle -> test), then such an error is not visible, and all tests work quietly.
To use JUnit, this dependency is used:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
The rest of the team who work on this project (one repository, different branches) do not have such problems. What can be causing this error? IDE used - IntelliJ IDEA
UPD: I've tried everything. Deleting the .idea folder had no effect, nor did re-downloading all dependencies. Clearing the cache also had no effect
UPD 2: Proxy is already specified
Solution
The issue was resolved by manually adding JUnit Platform Launcher files to the local repository. This is probably not the optimal solution, but it worked for me
Answered By - Alex
Answer Checked By - David Goodson (JavaFixing Volunteer)