{
// check to make sure that the project packaging type is appropriate
List<PackagingType> compatiblePackagingTypes = ConstraintInspector.getCompatiblePackagingTypes(type);
if (!compatiblePackagingTypes.isEmpty())
{
PackagingType currentPackagingType = currentProject.getFacet(PackagingFacet.class).getPackagingType();
if (!compatiblePackagingTypes.contains(currentPackagingType))
{
throw new UnsatisfiedPackagingTypeException("Oops! The [" + plugin.getName()
+ "] plugin requires one of the following packaging types " + compatiblePackagingTypes
+ ", but the current packaging type is [" + currentPackagingType + "]");