public void addCommunityLicense(User u, String projectHome) throws ServiceException {
LicenseDao licenseDao = DaoFactory.getLicenseDao();
LOGGER.info("adding community license to user " + u.getLogin());
try {
CommunityLicense l = licenseDao.createCommunity();
l.setProjectHomeUrl(projectHome);
addFreeLicense(u, l);
} catch (DaoException e) {
throw new ServiceException("failed to add community license to user " + u.getLogin(), e);
}