The only way to set the license is currently to define the property 'sonarsource.identity.license.secured' in the file conf/sonar.properties.