Search in sources :

Example 1 with Product

use of org.mule.runtime.api.deployment.meta.Product in project mule by mulesoft.

the class MuleProductArtifactDescriptorValidator method validate.

@Override
public void validate(ArtifactDescriptor descriptor) {
    Product requiredProduct = descriptor.getRequiredProduct();
    Product runtimeProduct = getProductByName(getProductName());
    if (!runtimeProduct.supports(requiredProduct)) {
        throw new MuleRuntimeException(createStaticMessage("The artifact %s requires a different runtime. The artifact required runtime is %s and the runtime is %s", descriptor.getName(), descriptor.getRequiredProduct().name(), runtimeProduct.name()));
    }
}
Also used : MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) Product(org.mule.runtime.api.deployment.meta.Product)

Aggregations

Product (org.mule.runtime.api.deployment.meta.Product)1 MuleRuntimeException (org.mule.runtime.api.exception.MuleRuntimeException)1