yeikel commented on code in PR #1065: URL: https://github.com/apache/maven/pull/1065#discussion_r1142851675
########## maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java: ########## @@ -49,10 +49,18 @@ public class TestRepositoryConnector implements RepositoryConnector { public TestRepositoryConnector(RemoteRepository repository) { this.repository = repository; - try { - basedir = FileUtils.toFile(new URL(repository.getUrl())); - } catch (MalformedURLException e) { - throw new IllegalStateException(e); + String repositoryUrl = repository.getUrl(); + if (repositoryUrl.contains("${")) { + // the repository url contains unresolved properties and getting the basedir is not possible + // in JDK 20+ 'new URL(string)' will fail if the string contains a curly brace + this.basedir = null; + } else { + try { + basedir = FileUtils.toFile(new URL(repositoryUrl)); + System.out.println(basedir); + } catch (MalformedURLException e) { + throw new IllegalStateException(e); + } Review Comment: You probably did not mean to include the println ```suggestion } else { try { basedir = FileUtils.toFile(new URL(repositoryUrl)); } catch (MalformedURLException e) { throw new IllegalStateException(e); } ``` -- 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: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org