org.jboss.forge.project.dependencies.Dependency to = DependencyBuilder.create(
depFacet.resolveProperties(
new MavenDependencyAdapter(dependency)
)).setVersion(version);
UpdatingDependency preEvent = new UpdatingDependency(
project, from, to);
manager.fireEvent(preEvent);
if (!preEvent.isVetoed())
{
if (isExpression(dependency.getVersion()))
{
for (Properties properties : propertySets)
{
if (properties.containsKey(propertyName))
{
properties.put(propertyName, version);
}
}
}
else
{
dependency.setVersion(version);
}
UpdatedDependency event = new UpdatedDependency(project, from, to);
manager.fireEvent(event);
return true;
}
else
{
shell.println("Update attempt vetoed by other Plugin");
for (String message : preEvent.getMessages())
{
shell.println("\t" + message);
}
return false;
}