ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Dejung (JIRA)" <j...@apache.org>
Subject [jira] Created: (IVY-940) unable to resolve snapshot versions depending on xml elements order
Date Sun, 12 Oct 2008 22:22:44 GMT
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


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.


Mime
View raw message