in src/main/java/org/apache/maven/plugin/doap/options/ASFExtOptionsUtil.java [213:280]
public static boolean isASFProject(MavenProject project) {
if (project == null) {
throw new IllegalArgumentException("project is required");
}
// check organization name
if (project.getOrganization() != null
&& StringUtils.isNotEmpty(project.getOrganization().getName())
&& project.getOrganization().getName().trim().equals("The Apache Software Foundation"))
// see org.apache:apache artifact
{
return true;
}
// check domain name
if (project.getOrganization() != null
&& isHostedAtASF(project.getOrganization().getUrl())) {
return true;
}
if (isHostedAtASF(project.getUrl())) {
return true;
}
if (project.getScm() != null) {
if (StringUtils.isNotEmpty(project.getScm().getUrl())
&& project.getScm().getUrl().contains(APACHE_DOMAIN_NAME)) {
return true;
}
if (StringUtils.isNotEmpty(project.getScm().getConnection())
&& project.getScm().getConnection().contains(APACHE_DOMAIN_NAME)) {
return true;
}
if (StringUtils.isNotEmpty(project.getScm().getDeveloperConnection())
&& project.getScm().getDeveloperConnection().contains(APACHE_DOMAIN_NAME)) {
return true;
}
}
if (project.getDistributionManagement() != null) {
if (isHostedAtASF(project.getDistributionManagement().getDownloadUrl())) {
return true;
}
if (project.getDistributionManagement().getRepository() != null
&& isHostedAtASF(
project.getDistributionManagement().getRepository().getUrl())) {
return true;
}
if (project.getDistributionManagement().getSnapshotRepository() != null
&& isHostedAtASF(project.getDistributionManagement()
.getSnapshotRepository()
.getUrl())) {
return true;
}
if (project.getDistributionManagement().getSite() != null
&& isHostedAtASF(
project.getDistributionManagement().getSite().getUrl())) {
return true;
}
}
return false;
}