if ((_organisation != null && _module != null && _revision != null) && _md.getModuleRevisionId() == null) { ModuleRevisionId mrid = ModuleRevisionId.newInstance(_organisation, _module, _revision); _properties.put("pom.version", _revision); _md.setModuleRevisionId(mrid); _md.addArtifact("master", new DefaultArtifact(mrid, getDefaultPubDate(),_module, "jar", "jar")); _organisation = null; _module = null; _revision = null;
if (_md.getModuleRevisionId() == null  && ("project".equals(getContext()))) { fillMrid();
        public void endElement(String uri, String localName, String qName) throws SAXException {            if ((_organisation != null && _module != null && _revision != null) && _md.getModuleRevisionId() == null) {                ModuleRevisionId mrid = ModuleRevisionId.newInstance(_organisation, _module, _revision);                _properties.put("pom.version", _revision);                _md.setModuleRevisionId(mrid);                _md.addArtifact("master", new DefaultArtifact(mrid, getDefaultPubDate(),_module, "jar", "jar"));                _organisation = null;                _module = null;                _revision = null;            } else if (((_organisation != null && _module != null && _revision != null) || _dd != null) && "project/dependencies/dependency".equals(getContext())) {                if (_dd == null) {                    _dd = new DefaultDependencyDescriptor(_md, ModuleRevisionId.newInstance(_organisation, _module, _revision), true, false, true);                }                _scope = _scope == null ? "compile" : _scope;                if (_optional && "compile".equals(_scope)) {                    _scope = "runtime";                }                String mapping = (String)MAVEN2_CONF_MAPPING.get(_scope);                if (mapping == null) {                    Message.verbose("unknown scope "+_scope+" in "+getResource());                    mapping = (String)MAVEN2_CONF_MAPPING.get("compile");                }                if (_optional) {                    mapping = mapping.replaceAll(_scope+"\\-\\>", "optional->");                    if (_md.getConfiguration("optional") == null) {                        _md.addConfiguration(OPTIONAL_CONFIGURATION);                    }                }                parseDepsConfs(mapping, _dd);                                for (Iterator iter = _exclusions.iterator(); iter.hasNext();) {                    ModuleId mid = (ModuleId)iter.next();                    String[] confs = _dd.getModuleConfigurations();                    for (int i = 0; i < confs.length; i++) {                        _dd.addDependencyArtifactExcludes(confs[i], new DefaultDependencyArtifactDescriptor(_dd, new ArtifactId(mid, PatternMatcher.ANY_EXPRESSION, PatternMatcher.ANY_EXPRESSION, PatternMatcher.ANY_EXPRESSION), false, ExactPatternMatcher.getInstance()));                    }                }                _md.addDependency(_dd);                _dd = null;            } else if ((_organisation != null && _module != null) && "project/dependencies/dependency/exclusions/exclusion".equals(getContext())) {                _exclusions.add(new ModuleId(_organisation, _module));                _organisation = null;                _module = null;            }            if ("dependency".equals(qName)) {                _organisation = null;                _module = null;                _revision = null;                _scope = null;                _optional = false;                _exclusions.clear();            }            _contextStack.pop();        }