*/
private String resolveVersionFromPOM(Class<?> classUnderTest, String name)
{
if (dependencyMap == null)
{
ProjectHelper projectHelper = new ProjectHelper();
dependencyMap = new HashMap<String, String>();
File pomFile = getPomFileFor(classUnderTest);
try
{
// Needed for single-project addons
Model model = projectHelper.loadPomFromFile(pomFile);
String thisAddonName = (model.getGroupId() == null) ? model.getParent().getGroupId() : model.getGroupId()
+ ":" + model.getArtifactId();
String thisVersion = model.getVersion();
dependencyMap.put(thisAddonName, thisVersion);
List<Dependency> dependencies = projectHelper.resolveDependenciesFromPOM(pomFile);
for (Dependency dependency : dependencies)
{
Artifact artifact = dependency.getArtifact();
String addonName = artifact.getGroupId() + ":" + artifact.getArtifactId();
String version = artifact.getBaseVersion();