load advanced plugin configuration from plugin directory and from root of scm home

This commit is contained in:
Sebastian Sdorra
2014-11-26 20:10:36 +01:00
parent d898b311b2
commit 264fa5fe0c

View File

@@ -102,6 +102,9 @@ public class DefaultPluginManager
private static final String ADVANCED_CONFIGURATION = private static final String ADVANCED_CONFIGURATION =
"advanced-configuration.xml"; "advanced-configuration.xml";
/** Field description */
private static final String DIRECTORY_PLUGINS = "plugins";
/** the logger for DefaultPluginManager */ /** the logger for DefaultPluginManager */
private static final Logger logger = private static final Logger logger =
LoggerFactory.getLogger(DefaultPluginManager.class); LoggerFactory.getLogger(DefaultPluginManager.class);
@@ -153,7 +156,7 @@ public class DefaultPluginManager
throw new ConfigurationException(ex); throw new ConfigurationException(ex);
} }
File file = new File(context.getBaseDirectory(), ADVANCED_CONFIGURATION); File file = findAdvancedConfiguration();
if (file.exists()) if (file.exists())
{ {
@@ -541,6 +544,25 @@ public class DefaultPluginManager
} }
} }
/**
* Method description
*
*
* @return
*/
private File findAdvancedConfiguration()
{
File directory = new File(context.getBaseDirectory(), DIRECTORY_PLUGINS);
File file = new File(directory, ADVANCED_CONFIGURATION);
if (!file.exists())
{
file = new File(context.getBaseDirectory(), ADVANCED_CONFIGURATION);
}
return file;
}
/** /**
* Method description * Method description
* *