You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Maarten Coene (JIRA)" <ji...@apache.org> on 2008/10/22 00:02:44 UTC

[jira] Updated: (IVY-940) unable to resolve snapshot versions depending on xml elements order

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

Maarten Coene updated IVY-940:
------------------------------

    Fix Version/s:     (was: trunk)
                   2.0-RC2

> unable to resolve snapshot versions depending on xml elements order
> -------------------------------------------------------------------
>
>                 Key: IVY-940
>                 URL: https://issues.apache.org/jira/browse/IVY-940
>             Project: Ivy
>          Issue Type: Bug
>          Components: Maven Compatibility
>    Affects Versions: 2.0-RC1
>            Reporter: Andreas Dejung
>            Assignee: Maarten Coene
>             Fix For: 2.0-RC2
>
>
> Depending on the order of the timestamp and buildnumber elements the fix done in IVY-501 does not work.
> Here a possible fix
> In IBiblioResolver.java line 171
> {noformat} 
>                     XMLHelper.parse(metadataStream, null, new ContextualSAXHandler() {
>                         String buildNumber="";
>                         boolean timestampFound;	
>                         boolean buildNumberFound;	
>                         public void endElement(String uri, String localName, String qName) 
>                                 throws SAXException {
>                             if ("metadata/versioning/snapshot/timestamp".equals(getContext())) {
>                                 snapshotRev.append(getText()).append("-");
>                                 timestampFound=true;
>                                 if(buildNumberFound){
>                             		snapshotRev.append(buildNumber);
>                                 }
>                             }
>                             if ("metadata/versioning/snapshot/buildNumber"
>                                     .equals(getContext())) {
>                             	buildNumberFound=true;
>                             	if(timestampFound){
>                             		snapshotRev.append(getText());
>                             	}else{
>                             		buildNumber=getText();
>                             	}
>                             }
>                             super.endElement(uri, localName, qName);
>                         }
>                     }, null);
> {noformat} 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.