PackagingFacet facet = project.getFacet(PackagingFacet.class);
BuildResult buildResult = facet.getBuildResult();
if (!buildResult.isSuccess())
{
UIOutput output = uiContext.getProvider().getOutput();
PrintStream err = output.err();
output.error(err, String.format("Project '%s' has errors", project.getRoot()));
for (BuildMessage message : buildResult.getMessages())
{
switch (message.getSeverity())
{