You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2018/07/02 12:00:00 UTC
[jira] [Comment Edited] (MNG-6437) Generic .uri suffix to get the
URI representation of any file property
[ https://issues.apache.org/jira/browse/MNG-6437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16529768#comment-16529768 ]
Michael Osipov edited comment on MNG-6437 at 7/2/18 11:59 AM:
--------------------------------------------------------------
I highgly second that. I have so much crap custom code in our modules and plugins handling URIs (e.g., SCM). It is just a pain to maintain. We should remove as much as possible and solely rely on {{.uri}} interpolation, and what Claude recommends: {{Path#toUri()}} only.
was (Author: michael-o):
I highgly second that. I have so much crap custom code in our modules and plugins handling URIs. It is just a pain to maintain. We should remove as much as possible and solely rely on {{.uri}} interpolation, and what Claude recommends: {{Path#toUri()}} only.
> Generic .uri suffix to get the URI representation of any file property
> ----------------------------------------------------------------------
>
> Key: MNG-6437
> URL: https://issues.apache.org/jira/browse/MNG-6437
> Project: Maven
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.5.4
> Reporter: Claude Brisson
> Priority: Major
>
> It's impossible to properly generate, for instance, a java policy file which needs files URIs, using either Cargo properties and filtered config files, or just filtered resources.
> In both cases, the problem is the impossibility to generate proper URIs when expanding Maven properties (see also MNG-3760).
> The candidate feature is to add a way to explicitly request the URI when expanding a property by means of a {{.uri}} suffix. The underlying {{getUri()}} method should rely on the correct {{Path#toUri()}} and neither {{File#toUri()}} nor {{File#toString()}}, see the SO reference in MNG-6386.
> For instance:
> * {{${project.basedir.uri}}} instead of the broken {{${project.baseUri}}} (and of course fix MNG-6436 otherwise it's useless)
> * {{${project.build.directory.uri}}}
> * {{${settings.localRepository.uri}}}
> * etc
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)