All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netflix.gradle.plugins.rpm.validation.RpmTaskPropertiesValidator.groovy Maven / Gradle / Ivy

There is a newer version: 11.10.0
Show newest version
package com.netflix.gradle.plugins.rpm.validation

import com.netflix.gradle.plugins.packaging.validation.SystemPackagingAttributeValidator
import com.netflix.gradle.plugins.packaging.validation.SystemPackagingTaskPropertiesValidator
import com.netflix.gradle.plugins.rpm.Rpm
import org.gradle.api.InvalidUserDataException

class RpmTaskPropertiesValidator implements SystemPackagingTaskPropertiesValidator {
    private final SystemPackagingAttributeValidator packageNameValidator = new RpmPackageNameAttributeValidator()

    @Override
    void validate(Rpm task) {
        if(!packageNameValidator.validate(task.getPackageName())) {
            throw new InvalidUserDataException(packageNameValidator.getErrorMessage(task.getPackageName()))
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy