RepositoryPolicy repoPolicy =
EnumUtil.valueOf(model.getRepoPolicy(), RepositoryPolicy.class);
repository.adaptToFacet(MavenRepository.class).setRepositoryPolicy(repoPolicy);
if (repository.getRepositoryKind().isFacetAvailable(MavenProxyRepository.class)) {
ChecksumPolicy checksum =
EnumUtil.valueOf(model.getChecksumPolicy(), ChecksumPolicy.class);
MavenProxyRepository pRepository = repository.adaptToFacet(MavenProxyRepository.class);
pRepository.setChecksumPolicy(checksum);