final String desc = tag.getAttributeValue("description");
final String preReqsValue = tag.getAttributeValue("prereqs");
final String[] preReqs = preReqsValue == null ? EMPTY_STRING_ARRAY : preReqsValue.split(
",");
final DefaultPluginGoal goal = new DefaultPluginGoal();
goal.setName(name);
goal.setDescription(desc);
goal.setContainer(plugin);
goal.setPrereqs(preReqs);
goals[i] = goal;
}
plugin.setGoals(goals);
return plugin;