[ 
https://issues.apache.org/jira/browse/MNG-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17044213#comment-17044213
 ] 

Arnaud Rivero commented on MNG-6870:
------------------------------------

[~michael-o] We wanted to use variable interpolation in order to inject the URL 
pointing to our repository using an environment variable. The idea was to make 
it easier to change it if needed. We thought about putting it in the parent pom 
at first, but it must be used to get the parent too, so it kind of defeated the 
purpose

 

[~rfscholte] I understand your point and it makes sense. But in that case, 
shouldn't interpolation be entirely disabled for repositories? As of now, if we 
use interpolation in the repository definition and declare a dependency that 
exists only in that repository, it will be working. I updated my Github example 
to show it. Isn't it making the pom unreliable as well? Or am I missing a point?

> A maven project can't fetch its parent when its repository is configured with 
> an interpolated variable
> ------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-6870
>                 URL: https://issues.apache.org/jira/browse/MNG-6870
>             Project: Maven
>          Issue Type: Bug
>          Components: Artifacts and Repositories, Inheritance and Interpolation
>    Affects Versions: 3.6.3
>            Reporter: Arnaud Rivero
>            Priority: Major
>             Fix For: waiting-for-feedback, wontfix-candidate
>
>
> Maven seems to be unable to fetch its parent pom.xml on a remote repository 
> when it uses an interpolated variable in its repositories configuration.
> However, if no parent is declared in the same project pom.xml and the parent 
> is declared as a dependency instead, then it is downloaded. 
> If we have both the parent configured and declared as a dependency, the same 
> problem occurs : Maven can't download the parent from the remote repository
> Lastly, if we replace the variable by its value, there are no problem 
> downloading the parent pom.xml
> The problem occurs whether the variable is a property defined in the pom.xml 
> or is an environment variable
>  
> It seems maven can only interpolate a variable value in a pom.xml after the 
> parent has been resolved
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to