class OptionsValidator {

    public void validate(Options options) {
        if (isBlank(options.getNewApiPath())) {
            throw new IllegalArgumentException(format("%s must be provided.", getNewApiPathName()));
        }
        if (isBlank(options.getOldApiPath()) && !isAnyMavenConfigurationSet(options)) {
            throw new IllegalArgumentException(format("Either %s must be provided or a Maven configuration.", getOldApiPathName()));
        }
        if (isBlank(options.getOldApiPath()) && isAnyMavenConfigurationSet(options)) {
            if (!isFullMavenConfigurationSet(options)) {
                Collection<String> missingMavenCliOptions = findMissingMavenConfiguration(options);
                if (isAnyRepoSet(options)) {
                    missingMavenCliOptions.remove(getMavenRepoUrlName());
                    missingMavenCliOptions.remove(getMavenSnapshotRepoUrlName());
                }
                if (CollectionUtils.isNotEmpty(missingMavenCliOptions)) {
                    String joinedMavenCliOptions = StringUtils.join(missingMavenCliOptions, ",");
                    throw new IllegalArgumentException(format("Partial Maven configuration detected, make sure you set %s as well.", joinedMavenCliOptions));
                }
            }
        }
    }

    public  OptionsValidator();

}