Which plugin to be used for com.atlassian.confluence.setup. Need to execute below statements to get the path for confluence home directory
BootstrapManager bootstrapManager = new DefaultBootstrapManager();
confluenceHome = bootstrapManager.getSharedHome();
Getting below error while using com.atlassian.confluence.setup
cannot find symbol
[ERROR] symbol: class setup
[ERROR] location: package com.atlassian.confluence
I have also used the below code snippet to get the confluence directory path , but getting null as return from method getApplicationHome()
AtlassianBootstrapManager bootstrapManager = new DefaultAtlassianBootstrapManager();
String confluenceHome = bootstrapManager.getApplicationHome();
How about:
String baseUrl = settingsManager.getGlobalSettings().getBaseUrl()
From this link
how-do-i-get-the-base-url-and-contextpath-of-a-confluence-installation/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tried to use the below code as per the link provided by you :
SettingsManager settingsMngr = new DefaultSettingsManager();
String confluenceHome = settingsManager.getGlobalSettings().getBaseUrl();
For SettingsManager added the package import com.atlassian.confluence.setup.settings;
But got below error while compiling:
cannot find symbol
[ERROR] symbol: class settings
[ERROR] location: package com.atlassian.confluence.setup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srijani,
You can follow the document.
Thanks,
Mehmet Sirin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have tried using the same. It gives me below error while compiling :
BootstrapManager bootstrapManager = new DefaultBootstrapManager();
confluenceHome = bootstrapManager.getSharedHome();
Getting below error while using com.atlassian.confluence.setup
cannot find symbol
[ERROR] symbol: class setup
[ERROR] location: package com.atlassian.confluence
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.