Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Waibel2017-01-25 05:03:24 -0500
committerFlorian Waibel2017-01-25 05:03:24 -0500
commit77702525b12fb92630940f1f96bda9c01efb0236 (patch)
tree7308cde2d1fe44f6a696e911c0adf22fed61bdea
parent7b2f5d4b444309f525e1d839432556d3bc54004f (diff)
downloadorg.eclipse.virgo.medic-3.7.0.M04.tar.gz
org.eclipse.virgo.medic-3.7.0.M04.tar.xz
org.eclipse.virgo.medic-3.7.0.M04.zip
511015 - Remove SLF4J API fragment511015_slf4japifragment3.7.0.M04
This should resolve the warning: SLF4J: Class path contains multiple SLF4J bindings.
-rw-r--r--build.gradle9
-rw-r--r--org.eclipse.virgo.medic.slf4japifragment/src/main/java/org/slf4j/impl/StaticLoggerBinder.java115
-rw-r--r--org.eclipse.virgo.medic.slf4japifragment/src/main/java/org/slf4j/impl/StaticMDCBinder.java48
-rw-r--r--org.eclipse.virgo.medic.slf4japifragment/src/main/java/org/slf4j/impl/StaticMarkerBinder.java57
-rw-r--r--org.eclipse.virgo.medic.slf4japifragment/src/main/resources/about.html28
-rw-r--r--org.eclipse.virgo.medic.slf4japifragment/template.mf16
6 files changed, 0 insertions, 273 deletions
diff --git a/build.gradle b/build.gradle
index ee7fc52..986b213 100644
--- a/build.gradle
+++ b/build.gradle
@@ -31,15 +31,6 @@ project(':medic:org.eclipse.virgo.medic.core') {
}
}
-project(':medic:org.eclipse.virgo.medic.slf4japifragment') {
- dependencies {
- compile group: "org.slf4j", name: "slf4j-api", version: slf4jVersion
-
- compile "ch.qos.logback:logback-core:${logbackVersion}"
- compile "ch.qos.logback:logback-classic:${logbackVersion}"
- }
-}
-
project(':medic:org.eclipse.virgo.medic.test') {
dependencies {
compile project(':medic:org.eclipse.virgo.medic')
diff --git a/org.eclipse.virgo.medic.slf4japifragment/src/main/java/org/slf4j/impl/StaticLoggerBinder.java b/org.eclipse.virgo.medic.slf4japifragment/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
deleted file mode 100644
index fe80bb7..0000000
--- a/org.eclipse.virgo.medic.slf4japifragment/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2009, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package org.slf4j.impl;
-
-import org.slf4j.ILoggerFactory;
-import org.slf4j.LoggerFactory;
-import org.slf4j.helpers.Util;
-import org.slf4j.spi.LoggerFactoryBinder;
-
-import ch.qos.logback.classic.LoggerContext;
-import ch.qos.logback.classic.util.ContextInitializer;
-import ch.qos.logback.classic.util.ContextSelectorStaticBinder;
-import ch.qos.logback.core.CoreConstants;
-import ch.qos.logback.core.joran.spi.JoranException;
-import ch.qos.logback.core.util.StatusPrinter;
-
-/**
- *
- * The binding of {@link LoggerFactory} class with an actual instance of
- * {@link ILoggerFactory} is performed using information returned by this class.
- *
- * @author <a href="http://www.qos.ch/shop/products/log4jManual">Ceki
- * G&uuml;lc&uuml;</a>
- */
-public class StaticLoggerBinder implements LoggerFactoryBinder {
-
- /**
- * Declare the version of the SLF4J API this implementation is compiled
- * against. The value of this field is usually modified with each release.
- */
- // to avoid constant folding by the compiler, this field must *not* be final
- public static String REQUESTED_API_VERSION = "1.6"; // !final
-
- final static String NULL_CS_URL = CoreConstants.CODES_URL + "#null_CS";
-
- /**
- * The unique instance of this class.
- */
- private static StaticLoggerBinder SINGLETON = new StaticLoggerBinder();
-
- private static Object KEY = new Object();
-
- static {
- SINGLETON.init();
- }
-
- private boolean initialized = false;
- private LoggerContext defaultLoggerContext = new LoggerContext();
- private final ContextSelectorStaticBinder contextSelectorBinder = ContextSelectorStaticBinder
- .getSingleton();
-
- private StaticLoggerBinder() {
- defaultLoggerContext.setName(CoreConstants.DEFAULT_CONTEXT_NAME);
- }
-
- public static StaticLoggerBinder getSingleton() {
- return SINGLETON;
- }
-
- /**
- * Package access for testing purposes.
- */
- static void reset() {
- SINGLETON = new StaticLoggerBinder();
- SINGLETON.init();
- }
-
- /**
- * Package access for testing purposes.
- */
- void init() {
- try {
- try {
- new ContextInitializer(defaultLoggerContext).autoConfig();
- } catch (JoranException je) {
- Util.report("Failed to auto configure default logger context", je);
- }
- StatusPrinter.printInCaseOfErrorsOrWarnings(defaultLoggerContext);
- contextSelectorBinder.init(defaultLoggerContext, KEY);
- initialized = true;
- } catch (Throwable t) {
- // we should never get here
- Util.report("Failed to instantiate [" + LoggerContext.class.getName()
- + "]", t);
- }
- }
-
- public ILoggerFactory getLoggerFactory() {
- if (!initialized) {
- return defaultLoggerContext;
- }
-
- if (contextSelectorBinder.getContextSelector() == null) {
- throw new IllegalStateException(
- "contextSelector cannot be null. See also " + NULL_CS_URL);
- }
- return contextSelectorBinder.getContextSelector().getLoggerContext();
- }
-
- public String getLoggerFactoryClassStr() {
- return contextSelectorBinder.getContextSelector().getClass().getName();
- }
-
-}
diff --git a/org.eclipse.virgo.medic.slf4japifragment/src/main/java/org/slf4j/impl/StaticMDCBinder.java b/org.eclipse.virgo.medic.slf4japifragment/src/main/java/org/slf4j/impl/StaticMDCBinder.java
deleted file mode 100644
index 70c13b0..0000000
--- a/org.eclipse.virgo.medic.slf4japifragment/src/main/java/org/slf4j/impl/StaticMDCBinder.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2009, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package org.slf4j.impl;
-
-import org.slf4j.spi.MDCAdapter;
-
-import ch.qos.logback.classic.util.LogbackMDCAdapter;
-
-
-/**
- * This implementation is bound to {@link LogbackMDCAdapter}.
- *
- * @author Ceki G&uuml;lc&uuml;
- */
-public class StaticMDCBinder {
-
-
- /**
- * The unique instance of this class.
- */
- public static final StaticMDCBinder SINGLETON = new StaticMDCBinder();
-
- private StaticMDCBinder() {
- }
-
- /**
- * Currently this method always returns an instance of
- * {@link StaticMDCBinder}.
- */
- public MDCAdapter getMDCA() {
- return new LogbackMDCAdapter();
- }
-
- public String getMDCAdapterClassStr() {
- return LogbackMDCAdapter.class.getName();
- }
-}
diff --git a/org.eclipse.virgo.medic.slf4japifragment/src/main/java/org/slf4j/impl/StaticMarkerBinder.java b/org.eclipse.virgo.medic.slf4japifragment/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
deleted file mode 100644
index 8be32ee..0000000
--- a/org.eclipse.virgo.medic.slf4japifragment/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2009, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package org.slf4j.impl;
-
-import org.slf4j.IMarkerFactory;
-import org.slf4j.MarkerFactory;
-import org.slf4j.helpers.BasicMarkerFactory;
-import org.slf4j.spi.MarkerFactoryBinder;
-
-/**
- *
- * The binding of {@link MarkerFactory} class with an actual instance of
- * {@link IMarkerFactory} is performed using information returned by this class.
- *
- * @author Ceki G&uuml;lc&uuml;
- */
-public class StaticMarkerBinder implements MarkerFactoryBinder {
-
- /**
- * The unique instance of this class.
- */
- public static final StaticMarkerBinder SINGLETON = new StaticMarkerBinder();
-
- final IMarkerFactory markerFactory = new BasicMarkerFactory();
-
- private StaticMarkerBinder() {
- }
-
- /**
- * Currently this method always returns an instance of
- * {@link BasicMarkerFactory}.
- */
- public IMarkerFactory getMarkerFactory() {
- return markerFactory;
- }
-
- /**
- * Currently, this method returns the class name of
- * {@link BasicMarkerFactory}.
- */
- public String getMarkerFactoryClassStr() {
- return BasicMarkerFactory.class.getName();
- }
-
-
-}
diff --git a/org.eclipse.virgo.medic.slf4japifragment/src/main/resources/about.html b/org.eclipse.virgo.medic.slf4japifragment/src/main/resources/about.html
deleted file mode 100644
index c258ef5..0000000
--- a/org.eclipse.virgo.medic.slf4japifragment/src/main/resources/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.virgo.medic.slf4japifragment/template.mf b/org.eclipse.virgo.medic.slf4japifragment/template.mf
deleted file mode 100644
index 0316a5e..0000000
--- a/org.eclipse.virgo.medic.slf4japifragment/template.mf
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Vendor: fake
-Bundle-Localization: fragment
-Fragment-Host: slf4j.api;bundle-version="${slf4jVersion:[=.=.=, +1.0.0)}"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6,JavaSE-1.7
-Bundle-Name: fake
-Bundle-SymbolicName: org.eclipse.virgo.medic.slf4japifragment
-Require-Bundle: ch.qos.logback.core;bundle-version="${logbackVersion:[=.=.=, +1.0.0)}",ch.
- qos.logback.classic;bundle-version="${logbackVersion:[=.=.=, +1.0.0)}"
-Export-Package: org.slf4j.impl; uses:="org.slf4j.spi,ch.qos.logback.cl
- assic.util,org.slf4j.helpers,ch.qos.logback.classic,ch.qos.logback.co
- re,ch.qos.logback.classic.selector,ch.qos.logback.core.joran.spi,org.
- slf4j,ch.qos.logback.core.util";version="${slf4jVersion}"
-Bundle-Version: ${version}
-Bundle-ManifestVersion: 2
-Excluded-Imports: *

Back to the top