// get repository by identifier
Repository repository = getBuild().getConfig().getRepository(repositoryId);
if (repository == null) {
throw new MoxieException("Failed to find repositoryId: {0}", repositoryId);
}
if (isSnapshot && !repository.allowSnapshots()) {
if (allowSnapshots) {
getConsole().warn("Repository \"{0}\" prohibits snapshots! Overridden by \"allowSnapshots\" attribute!", repository.toString());
} else {
throw new MoxieException("Repository \"{0}\" prohibits installation or deployment of snapshots!",
repository.toString(), repository.getRepositoryUrl());