}
return hierarchy;
}
Site site = project.getDistributionManagement().getSite();
if (site == null) {
if (!ignoreMissingSiteUrl) {
throw new MojoFailureException(
"Missing site information in the distribution management element in the project: '"
+ project.getName() + "'.");
}
return null;
}
if (StringUtils.isEmpty(site.getUrl())) {
if (!ignoreMissingSiteUrl) {
throw new MojoFailureException(
"The URL in the site is missing in the project descriptor.");
}
return null;
}
Repository repository = new Repository(site.getId(), site.getUrl());
StringBuffer hierarchy = new StringBuffer(1024);
hierarchy.append(repository.getHost());
if (!StringUtils.isEmpty(repository.getBasedir())) {
if (!repository.getBasedir().startsWith("/")) {
hierarchy.append('/');