* The type of the returned value.
* @return The value associated with the given {@link ProjectProperty}, or
* null if none exists.
*/
public <T> T getProjectProperty(final ProjectProperty property, final Class<T> type) {
final ConfigurationFacet config = project.getFacet(ConfigurationFacet.class);
final Object rawPropertyValue = config.getConfiguration().getProperty(getProjectAttribute(property));
if (rawPropertyValue != null) {
if (!type.equals(property.valueType))
throw new RuntimeException(String.format("Expected type %s for property %s. Found type %s.",
property.valueType, property.name(), type));