protected URL getFileURL(License license, String filename) throws IOException { URL licenseBaseURL = license.getBaseURL(); URL result = MojoHelper.getUrl(licenseBaseURL, filename); if (!checkExists(result)) { // let's try with a .ftl suffix URL resultWithFtlSuffix = MojoHelper.getUrl(licenseBaseURL, filename + License.TEMPLATE_SUFFIX); if (checkExists(resultWithFtlSuffix)) { result = resultWithFtlSuffix; } else { throw new IllegalArgumentException( "Could not find license (" + license + ") content file at [" + result + "], nor at [" + resultWithFtlSuffix + "] for resolver " + this); } } return result; }