Invalid license

Your Atlassian commercial license has expired. To keep using the app, renew or purchase a license from the Atlassian Marketplace or a Partner.

This is how:

import com.atlassian.jira.component.ComponentAccessor

String baseUrl = ComponentAccessor.getApplicationProperties().getString("jira.baseurl")


I often use it like:

if (baseUrl.contains("test"))
{
	//We are in test environment
}
else
{
	//We are in prod environment
}