ModifiedClassPathExtensionOverridesTests Reported When Compiling and Installing Spring Boot
Symptom
During the Spring Boot compilation and installation, the message "ModifiedClassPathExtensionOverridesTests" is displayed when you access the Internet from the compilation environment through a proxy.
The detailed information is as follows:

Key Process and Cause Analysis
The annotation ClassPathOverrides does not properly pull the dependency.
Conclusion and Solution
- Open the ModifiedClassPathClassLoader.java file.
vim ./spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/classpath/ModifiedClassPathClassLoader.java
- Press i to enter the insert mode and modify the following content:
- Add the following content below line 42:
import org.eclipse.aether.repository.Proxy;

- Modify the code in lines 202 to 203.
CollectRequest collectRequest = new CollectRequest(null, Arrays.asList( new RemoteRepository.Builder("central", "default", "https://repo.maven.apache.org/maven2").build()));Modify the file as the following:
RemoteRepository.Builder builder = new RemoteRepository.Builder("central", "default","https://repo.maven.apache.org/maven2"); RemoteRepository remoteRepository = builder.setProxy(new Proxy("https", "127.0.0.1", 3128)).build(); CollectRequest collectRequest = new CollectRequest(null, Arrays.asList(remoteRepository));In the preceding example, 127.0.0.1 and 3128 indicate the IP address and port number of the proxy host. Replace them with the actual ones.

Run the :set list command to check the format. Spaces are not allowed. Use Tab to indent the code.
- Add the following content below line 42:
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Run the compile command again.
mvn spring-javaformat:apply clean install
Parent topic: Troubleshooting