Long.toString(md.getPublicationDate().getTime()));
}
Map extra = mrid.getExtraAttributes();
for (Iterator iter = extra.entrySet().iterator(); iter.hasNext();) {
Entry entry = (Entry) iter.next();
getProject().setProperty(property + ".extra." + entry.getKey(),
(String) entry.getValue());
}
getProject().setProperty(property + ".configurations",
mergeConfs(md.getConfigurationsNames()));
// store the public configurations in a separate property
Configuration[] configs = md.getConfigurations();
List publicConfigsList = new ArrayList();
for (int i = 0; i < configs.length; i++) {
String name = configs[i].getName();
if (Visibility.PUBLIC.equals(configs[i].getVisibility())) {
publicConfigsList.add(name);
}
if (configs[i].getDescription() != null) {
getProject().setProperty(property + ".configuration." + name + ".desc",
configs[i].getDescription());
}
}
String[] publicConfigs = (String[]) publicConfigsList.toArray(new String[publicConfigsList
.size()]);
getProject().setProperty(property + ".public.configurations", mergeConfs(publicConfigs));
Artifact[] artifacts = md.getAllArtifacts();
for (int i = 0; i < artifacts.length; i++) {
int id = i + 1;
getProject()
.setProperty(property + ".artifact." + id + ".name", artifacts[i].getName());
getProject()
.setProperty(property + ".artifact." + id + ".type", artifacts[i].getType());
getProject().setProperty(property + ".artifact." + id + ".ext", artifacts[i].getExt());
getProject().setProperty(property + ".artifact." + id + ".conf",
mergeConfs(artifacts[i].getConfigurations()));
Map artiExtra = artifacts[i].getExtraAttributes();
for (Iterator iter = artiExtra.entrySet().iterator(); iter.hasNext();) {
Entry entry = (Entry) iter.next();
getProject().setProperty(property + ".artifact." + id + ".extra." + entry.getKey(),
(String) entry.getValue());
}
}
}