public void endElement(final String uri,
final String localName,
final String qname) throws SAXException {
if ( "project".equals( qname ) ) {
ReleaseId parentReleaseId = model.getParentReleaseId();
model.setReleaseId(new ReleaseIdImpl(pomGroupId != null ? pomGroupId : parentReleaseId.getGroupId(),
pomArtifactId,
pomVersion != null ? pomVersion : parentReleaseId.getVersion()));
} else if ( "parent".equals( qname ) ) {
if ( currentGroupId != null && currentArtifactId != null && currentVersion != null ) {
model.setParentReleaseId(new ReleaseIdImpl(currentGroupId, currentArtifactId, currentVersion));
}
currentGroupId = null;
currentArtifactId = null;
currentVersion = null;
} else if ( "dependency".equals( qname ) ) {
if ( !"provided".equals(currentScope) && !"test".equals(currentScope) &&
currentGroupId != null && currentArtifactId != null && currentVersion != null ) {
model.addDependency(new ReleaseIdImpl(currentGroupId, currentArtifactId, currentVersion));
}
currentGroupId = null;
currentArtifactId = null;
currentVersion = null;
currentScope = null;