Replace :
private RepositorySystem newRepositorySystem() {
final var locator = MavenRepositorySystemUtils.newServiceLocator();
locator.addService(RepositoryConnectorFactory.class, BasicRepositoryConnectorFactory.class);
locator.addService(TransporterFactory.class, FileTransporterFactory.class);
locator.addService(TransporterFactory.class, HttpTransporterFactory.class);
return locator.getService(RepositorySystem.class);
}
with
private RepositorySystem newRepositorySystem() {
RepositorySystemSupplier repositorySystemSupplier = new RepositorySystemSupplier();
return repositorySystemSupplier.get();
}
hope this saves your precious time for discovering other alternatives