I have a plugin with licensing, which works fine with the timebomb licences. But when I do a fresh install on my developer instance, I get the “Free Trial” licence - by my thinking, in free trial everything should work just like in the paid version.
But here comes my problem, how do I actually determine that the plugin is in the free trial? I use this function to determine if the plugin is licensed:
That should work as long as the evaluation license isn’t expired… You might want to add in some logging about the details about the contents that getError() returns.
I dont even get to the getError() part - the biggest problem seems to be that pluginLicenseManager.getLicense() returns none() and pluginLicenseManager.getLicense().isDefined() returns false.
I dont even know how would I simulate license expiration - I have it on my own development environment and every time I start the server, it says “Try jiraPlugin free for 30 days.” and shows it as a free trial, unless I add a license key.
I think I know where the problem is - because I install the plugin through the atlassian scripts and not through the marketplace, there is no license and yet it still shows it is in free trial on my development machine.
So when it will be installed through the marketplace, the license will be provided and it will work.
It is a weird thing though, that the plugin says Unlicensed and Free Trial at the same time.
I’m assuming that the ”Atlassian scripts” you’re referring to is the sdk? The sdk only installs the license for the host product. You’ll need to paste in the app specific license yourself (you could do this through curl if you want to or take a Data snapshot through atlas-create-home-zip afterwards ).