final XmlFile pomPsi = PsiUtils.findXmlFile(project, pluginPom);
if (pomPsi == null)
return null;
plugin.setId(new XmlTagPath(pomPsi, POM_ID_XPATH).getStringValue());
plugin.setGroupId(new XmlTagPath(pomPsi, POM_GROUP_ID_XPATH).getStringValue());
plugin.setArtifactId(new XmlTagPath(pomPsi, POM_ARTIFACT_ID_XPATH).getStringValue());
plugin.setVersion(new XmlTagPath(pomPsi, POM_VERSION_XPATH).getStringValue());
plugin.setName(new XmlTagPath(pomPsi, POM_NAME_XPATH).getStringValue());
plugin.setDescription(new XmlTagPath(pomPsi, POM_DESC_XPATH).getStringValue());
//
//parse plugin Jelly script
//
final VirtualFile jellyFile = pPluginDir.findChild("plugin.jelly");
if (jellyFile != null && jellyFile.isValid() && FileUtils.exists(jellyFile))
plugin.setScriptFile(jellyFile);
else
return null;
final XmlFile jellyPsi = PsiUtils.findXmlFile(project, jellyFile);
final XmlTagPath goalsPath = new XmlTagPath(jellyPsi, "project/goal");
final XmlTag[] goalTags = goalsPath.getAllTags();
final PluginGoal[] goals = new PluginGoal[goalTags.length];
for (int i = 0; i < goalTags.length; i++) {
XmlTag tag = goalTags[i];
final String name = tag.getAttributeValue("name");
final String lcName = name.toLowerCase();