/** * Finalize the project configuration * * <ul> * <li>Initialize the license URLs if not set * </ul> * * @param projectConfig Project configuration to finalize */ @Finalize public void finalizeProjectConfig(ProjectConfig projectConfig) { License license = projectConfig.getLicense(); String licenseId = license.getId(); if (licenseId != null) { if (license.getUrl() == null) { license.setUrl("https://opensource.org/licenses/" + licenseId.replace(' ', '-')); } if (license.getSourceUrl() == null) { license.setSourceUrl( "https://raw.githubusercontent.com/github/choosealicense.com/gh-pages/_licenses/" + licenseId.toLowerCase().replace(' ', '-') + ".txt"); } } }
/** * Finalize the project configuration * * <ul> * <li>Initialize the license URLs if not set * </ul> * * @param projectConfig Project configuration to finalize */ @Finalize public void finalizeProjectConfig(ProjectConfig projectConfig) { License license = projectConfig.getLicense(); String licenseId = license.getId(); if (licenseId != null) { if (license.getUrl() == null) { license.setUrl("https://opensource.org/licenses/" + licenseId.replace(' ', '-')); } if (license.getSourceUrl() == null) { license.setSourceUrl( "https://raw.githubusercontent.com/github/choosealicense.com/gh-pages/_licenses/" + licenseId.toLowerCase().replace(' ', '-') + ".txt"); } } }