You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "psiroky (via GitHub)" <gi...@apache.org> on 2023/03/18 20:51:19 UTC

[GitHub] [maven] psiroky commented on a diff in pull request #1065: [MNG-7743] Make the build work on JDK 20

psiroky commented on code in PR #1065:
URL: https://github.com/apache/maven/pull/1065#discussion_r1141155979


##########
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("${")) {

Review Comment:
   This is somewhat ugly, but I haven't really found a better way at this point (without some major changes in how the `TestRepositoryConnector` is being used.
   
   Basically either the `TestRepositoryConnector` would need to resolve the properties in the URL, or the constructor would have to be called with the `repository` which already has these resolved.



-- 
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-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org