maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Seddon <rsed...@sonatype.com>
Subject Re: Settings properties not resolved when used in repository element.
Date Thu, 14 Feb 2013 23:59:48 GMT
If I recall correctly, property definitions within a settings.xml profile can't be interpolated
outside the profile within the settings.xml.   And the rationale for this was that profile
elements are a subset of pom files, not settings.xml files.  

See here for the comment accompanying the original implementation, which says that this was
explicitly disallowed:

http://jira.codehaus.org/browse/MNG-2577?focusedCommentId=100862&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-100862

Rich


On Feb 14, 2013, at 5:14 PM, Tonio Caputo <tonioc@exeo.com.ar> wrote:

> Hi Wayne,
> 
> Thanks for your answer,
> 
> I'll try the _ version tomorrow, and let you know how it worked.
> 
> 
> Regarding your question
> 
>>        <repository>
>>            <id>company.repo</id>
>>            <name>Archiva Managed Internal Repository</name>
>>            <url>${company.maven.repo}</url>
>>        </repository>
> 
>>> What's the reason that you can't simply specify the url here, and
>>> instead are using this property approach?
> 
> You are right, it doesn't make sense in this single sample I've sent, but if
> you read my previous email the idea was to define this property
> *company.maven.repo  *in the *settings.xml*.
> 
> This way you can customize the repo URL for example if you are working
> in the office (local NETWORK) or at home (with a public URL), or easy
> to change if URL changes, or whatever..... :-)
> 
> Using properties, instead of definining the full repository entry
> helps in a couple of ways:
> 
> - if you need to define the same repository in different profiles
>  (to make sure the order in which repositories are searched)
> 
> - Some times repository and distributionManagement (which you cannot define
>  in the settings profile) uses the same URL.
> 
> But of course may be I'm not following a good approach
> 
> Thanks again
> tonio
> 
> 
> 
> 
> 
> 
> On Thu, Feb 14, 2013 at 6:23 PM, Wayne Fay <waynefay@gmail.com> wrote:
> 
>>>    <properties>
>>>        <company.maven.repo>http://maven:8080/repo/</company.maven.repo>
>>>    </properties>
>> 
>> Try company_maven_repo instead. I know at one point, there was an
>> issue with dotted properties, but that was a while back.
>> 
>>>        <repository>
>>>            <id>company.repo</id>
>>>            <name>Archiva Managed Internal Repository</name>
>>>            <url>${company.maven.repo}</url>
>>>        </repository>
>> 
>> What's the reason that you can't simply specify the url here, and
>> instead are using this property approach?
>> 
>> Wayne
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message