[ 
https://issues.apache.org/jira/browse/IVY-1122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gintas Grigelionis updated IVY-1122:
------------------------------------
    Description: 
Calling 
{code]
    String partiallyResolvedPattern = 
IvyPatternHelper.substituteTokens(pattern, tokenValues);
{code}
where 
{code}
   pattern = 
"<sandbox>/test/repositories/IVY-1115/[organisation]/[module](/[att])/ivy-[revision].xml"
   tokenValues = {revision=1, module=a, organisation=test, branch=trunk, 
type=ivy, ext=xml}
{code}
returns 
{code}
  
/Project/hudsontools/admin/ivystatus/test/repositories/IVY-1115/test/a/ivy-1.xml
{code}
instead of 
{code}
  
/Project/hudsontools/admin/ivystatus/test/repositories/IVY-1115/test/a(/[att])/ivy-1.xml
{code}
Extra attributes are resolved after this partial pattern is resolved so the 
current behavior will never correctly resolve an optional extra attribute.  See 
AbstractPatternsBase.resolveTokenValues(...).


  was:
Calling 
    String partiallyResolvedPattern = 
IvyPatternHelper.substituteTokens(pattern, tokenValues);

where 
   pattern = 
"<sandbox>/test/repositories/IVY-1115/[organisation]/[module](/[att])/ivy-[revision].xml"
   tokenValues = {revision=1, module=a, organisation=test, branch=trunk, 
type=ivy, ext=xml}

returns 
  
/Project/hudsontools/admin/ivystatus/test/repositories/IVY-1115/test/a/ivy-1.xml

instead of 
  
/Project/hudsontools/admin/ivystatus/test/repositories/IVY-1115/test/a(/[att])/ivy-1.xml

Extra attributes are resolved after this partial pattern is resolved so the 
current behavior will never correctly resolve an optional extra attribute.  See 
AbstractPatternsBase.resolveTokenValues(...).



> Ivy pattern with optional extra attribute is not resolved correctly
> -------------------------------------------------------------------
>
>                 Key: IVY-1122
>                 URL: https://issues.apache.org/jira/browse/IVY-1122
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.1.0-RC2
>         Environment: Ivy 2.1.0-RC2
> Apache Ant version 1.7.0 compiled on December 13 2006 
>            Reporter: Michael Scheetz
>            Priority: Minor
>
> Calling 
> {code]
>     String partiallyResolvedPattern = 
> IvyPatternHelper.substituteTokens(pattern, tokenValues);
> {code}
> where 
> {code}
>    pattern = 
> "<sandbox>/test/repositories/IVY-1115/[organisation]/[module](/[att])/ivy-[revision].xml"
>    tokenValues = {revision=1, module=a, organisation=test, branch=trunk, 
> type=ivy, ext=xml}
> {code}
> returns 
> {code}
>   
> /Project/hudsontools/admin/ivystatus/test/repositories/IVY-1115/test/a/ivy-1.xml
> {code}
> instead of 
> {code}
>   
> /Project/hudsontools/admin/ivystatus/test/repositories/IVY-1115/test/a(/[att])/ivy-1.xml
> {code}
> Extra attributes are resolved after this partial pattern is resolved so the 
> current behavior will never correctly resolve an optional extra attribute.  
> See AbstractPatternsBase.resolveTokenValues(...).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to