mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
disable remote plugins for early 2.0.0-SNAPSHOT versions
This commit is contained in:
@@ -36,6 +36,7 @@ package sonia.scm.plugin;
|
|||||||
//~--- non-JDK imports --------------------------------------------------------
|
//~--- non-JDK imports --------------------------------------------------------
|
||||||
|
|
||||||
import com.github.legman.Subscribe;
|
import com.github.legman.Subscribe;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.google.common.io.Files;
|
import com.google.common.io.Files;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
@@ -51,6 +52,7 @@ import sonia.scm.SCMContextProvider;
|
|||||||
import sonia.scm.cache.Cache;
|
import sonia.scm.cache.Cache;
|
||||||
import sonia.scm.cache.CacheManager;
|
import sonia.scm.cache.CacheManager;
|
||||||
import sonia.scm.config.ScmConfiguration;
|
import sonia.scm.config.ScmConfiguration;
|
||||||
|
import sonia.scm.config.ScmConfigurationChangedEvent;
|
||||||
import sonia.scm.io.ZipUnArchiver;
|
import sonia.scm.io.ZipUnArchiver;
|
||||||
import sonia.scm.net.HttpClient;
|
import sonia.scm.net.HttpClient;
|
||||||
import sonia.scm.util.AssertUtil;
|
import sonia.scm.util.AssertUtil;
|
||||||
@@ -80,15 +82,13 @@ import javax.xml.bind.JAXB;
|
|||||||
import javax.xml.bind.JAXBContext;
|
import javax.xml.bind.JAXBContext;
|
||||||
import javax.xml.bind.JAXBException;
|
import javax.xml.bind.JAXBException;
|
||||||
import javax.xml.bind.Unmarshaller;
|
import javax.xml.bind.Unmarshaller;
|
||||||
import sonia.scm.config.ScmConfigurationChangedEvent;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Sebastian Sdorra
|
* @author Sebastian Sdorra
|
||||||
*/
|
*/
|
||||||
@Singleton
|
@Singleton
|
||||||
public class DefaultPluginManager
|
public class DefaultPluginManager implements PluginManager
|
||||||
implements PluginManager
|
|
||||||
{
|
{
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
@@ -101,6 +101,9 @@ public class DefaultPluginManager
|
|||||||
private static final Logger logger =
|
private static final Logger logger =
|
||||||
LoggerFactory.getLogger(DefaultPluginManager.class);
|
LoggerFactory.getLogger(DefaultPluginManager.class);
|
||||||
|
|
||||||
|
/** enable or disable remote plugins */
|
||||||
|
private static final boolean REMOTE_PLUGINS_ENABLED = false;
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
public static final PluginFilter FILTER_UPDATES =
|
public static final PluginFilter FILTER_UPDATES =
|
||||||
new StatePluginFilter(PluginState.UPDATE_AVAILABLE);
|
new StatePluginFilter(PluginState.UPDATE_AVAILABLE);
|
||||||
@@ -613,7 +616,11 @@ public class DefaultPluginManager
|
|||||||
logger.info("fetch plugin informations from {}", pluginUrl);
|
logger.info("fetch plugin informations from {}", pluginUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Util.isNotEmpty(pluginUrl))
|
/**
|
||||||
|
* remote plugins are disabled for early 2.0.0-SNAPSHOTS
|
||||||
|
* TODO enable remote plugins later
|
||||||
|
*/
|
||||||
|
if (REMOTE_PLUGINS_ENABLED && Util.isNotEmpty(pluginUrl))
|
||||||
{
|
{
|
||||||
InputStream input = null;
|
InputStream input = null;
|
||||||
|
|
||||||
@@ -743,19 +750,19 @@ public class DefaultPluginManager
|
|||||||
//~--- fields ---------------------------------------------------------------
|
//~--- fields ---------------------------------------------------------------
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
private Cache<String, PluginCenter> cache;
|
private final Cache<String, PluginCenter> cache;
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
private Provider<HttpClient> clientProvider;
|
private final Provider<HttpClient> clientProvider;
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
private ScmConfiguration configuration;
|
private final ScmConfiguration configuration;
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
private SCMContextProvider context;
|
private final SCMContextProvider context;
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
private Map<String, Plugin> installedPlugins;
|
private final Map<String, Plugin> installedPlugins;
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
private AetherPluginHandler pluginHandler;
|
private AetherPluginHandler pluginHandler;
|
||||||
|
|||||||
Reference in New Issue
Block a user