in src/main/java/org/apache/maven/report/projectinfo/LicensesReport.java [92:129]
public boolean canGenerateReport() throws MavenReportException {
boolean result = super.canGenerateReport();
if (result && skipEmptyReport) {
result = !isEmpty(getProject().getModel().getLicenses());
}
if (!result) {
return false;
}
if (!offline) {
return true;
}
for (License license : project.getModel().getLicenses()) {
String url = license.getUrl();
URL licenseUrl = null;
try {
licenseUrl = getLicenseURL(project, url);
} catch (IOException e) {
getLog().error(e.getMessage());
}
if (licenseUrl != null && licenseUrl.getProtocol().equals("file")) {
return true;
}
if (licenseUrl != null
&& (licenseUrl.getProtocol().equals("http")
|| licenseUrl.getProtocol().equals("https"))) {
linkOnly = true;
return true;
}
}
return false;
}