You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2015/04/27 15:18:08 UTC

svn commit: r1676254 - in /sling/trunk/bundles/commons/log: ./ src/main/java/org/apache/sling/commons/log/logback/internal/ src/main/resources/res/ui/ src/test/resources/

Author: cziegeler
Date: Mon Apr 27 13:18:07 2015
New Revision: 1676254

URL: http://svn.apache.org/r1676254
Log:
Add missing licence headers and excludes for rat

Modified:
    sling/trunk/bundles/commons/log/pom.xml
    sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackManager.java
    sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackResetListener.java
    sling/trunk/bundles/commons/log/src/main/resources/res/ui/log.css
    sling/trunk/bundles/commons/log/src/main/resources/res/ui/slinglog.js
    sling/trunk/bundles/commons/log/src/test/resources/test-config-provider.xml

Modified: sling/trunk/bundles/commons/log/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/log/pom.xml?rev=1676254&r1=1676253&r2=1676254&view=diff
==============================================================================
--- sling/trunk/bundles/commons/log/pom.xml (original)
+++ sling/trunk/bundles/commons/log/pom.xml Mon Apr 27 13:18:07 2015
@@ -230,7 +230,20 @@
           </systemPropertyVariables>
         </configuration>
       </plugin>
-    </plugins>
+           <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>src/main/resources/res/ui/jquery.autocomplete.css</exclude>
+                        <exclude>src/main/resources/res/ui/jquery.autocomplete.min.js</exclude>
+                        <exclude>src/main/resources/res/ui/prettify.css</exclude>
+                        <exclude>src/main/resources/res/ui/prettify.js</exclude>
+                        <exclude>README.md</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+     </plugins>
   </build>
 
 

Modified: sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackManager.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackManager.java?rev=1676254&r1=1676253&r2=1676254&view=diff
==============================================================================
--- sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackManager.java (original)
+++ sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackManager.java Mon Apr 27 13:18:07 2015
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.sling.commons.log.logback.internal;
 
 import java.io.File;
@@ -14,6 +32,20 @@ import java.util.Properties;
 import java.util.concurrent.Semaphore;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.sling.commons.log.logback.internal.AppenderTracker.AppenderInfo;
+import org.apache.sling.commons.log.logback.internal.util.SlingRollingFileAppender;
+import org.apache.sling.commons.log.logback.internal.util.SlingStatusPrinter;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceFactory;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.LoggerFactory;
+import org.slf4j.bridge.SLF4JBridgeHandler;
+
 import ch.qos.logback.classic.Level;
 import ch.qos.logback.classic.Logger;
 import ch.qos.logback.classic.LoggerContext;
@@ -34,19 +66,6 @@ import ch.qos.logback.core.status.OnCons
 import ch.qos.logback.core.status.StatusListener;
 import ch.qos.logback.core.status.StatusListenerAsList;
 import ch.qos.logback.core.status.StatusUtil;
-import org.apache.sling.commons.log.logback.internal.AppenderTracker.AppenderInfo;
-import org.apache.sling.commons.log.logback.internal.util.SlingRollingFileAppender;
-import org.apache.sling.commons.log.logback.internal.util.SlingStatusPrinter;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceFactory;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.util.tracker.ServiceTracker;
-import org.slf4j.LoggerFactory;
-import org.slf4j.bridge.SLF4JBridgeHandler;
 
 public class LogbackManager extends LoggerContextAwareBase {
     private static final String JUL_SUPPORT = "org.apache.sling.commons.log.julenabled";
@@ -454,6 +473,7 @@ public class LogbackManager extends Logg
 
     private class OsgiIntegrationListener implements LoggerContextListener {
 
+        @Override
         public boolean isResetResistant() {
             // The integration listener has to survive resets from other causes
             // like reset when Logback detects change in config file and reloads
@@ -462,9 +482,11 @@ public class LogbackManager extends Logg
             return true;
         }
 
+        @Override
         public void onStart(LoggerContext context) {
         }
 
+        @Override
         public void onReset(LoggerContext context) {
             addInfo("OsgiIntegrationListener : context reset detected. Adding LogManager to context map and firing"
                 + " listeners");
@@ -491,9 +513,11 @@ public class LogbackManager extends Logg
             }
         }
 
+        @Override
         public void onStop(LoggerContext context) {
         }
 
+        @Override
         public void onLevelChange(Logger logger, Level level) {
         }
 
@@ -578,6 +602,7 @@ public class LogbackManager extends Logg
             this.configFile = configFile;
         }
 
+        @Override
         public void perform(JoranConfigurator configurator) throws JoranException {
             final String path = configFile.getAbsolutePath();
             addInfo("Configuring from " + path);
@@ -608,6 +633,7 @@ public class LogbackManager extends Logg
     }
 
     private class DefaultCallback extends ConfiguratorCallback {
+        @Override
         public void perform(JoranConfigurator configurator) throws JoranException {
             configurator.doConfigure(getMainUrl());
         }
@@ -754,6 +780,7 @@ public class LogbackManager extends Logg
     private class PluginServiceFactory implements ServiceFactory {
         private Object instance;
 
+        @Override
         public Object getService(Bundle bundle, ServiceRegistration registration) {
             synchronized (this) {
                 if (this.instance == null) {
@@ -763,6 +790,7 @@ public class LogbackManager extends Logg
             }
         }
 
+        @Override
         public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) {
         }
     }

Modified: sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackResetListener.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackResetListener.java?rev=1676254&r1=1676253&r2=1676254&view=diff
==============================================================================
--- sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackResetListener.java (original)
+++ sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogbackResetListener.java Mon Apr 27 13:18:07 2015
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package org.apache.sling.commons.log.logback.internal;
 
 import ch.qos.logback.classic.LoggerContext;

Modified: sling/trunk/bundles/commons/log/src/main/resources/res/ui/log.css
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/log/src/main/resources/res/ui/log.css?rev=1676254&r1=1676253&r2=1676254&view=diff
==============================================================================
--- sling/trunk/bundles/commons/log/src/main/resources/res/ui/log.css (original)
+++ sling/trunk/bundles/commons/log/src/main/resources/res/ui/log.css Mon Apr 27 13:18:07 2015
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 .warn  { font-weight: bold; color: #FF6600;}
 .error { font-weight: bold; color: #CC0000;}
 

Modified: sling/trunk/bundles/commons/log/src/main/resources/res/ui/slinglog.js
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/log/src/main/resources/res/ui/slinglog.js?rev=1676254&r1=1676253&r2=1676254&view=diff
==============================================================================
--- sling/trunk/bundles/commons/log/src/main/resources/res/ui/slinglog.js (original)
+++ sling/trunk/bundles/commons/log/src/main/resources/res/ui/slinglog.js Mon Apr 27 13:18:07 2015
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *	  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 /**
  * Removes the editor (toggles all displayfields/editables).
  */

Modified: sling/trunk/bundles/commons/log/src/test/resources/test-config-provider.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/log/src/test/resources/test-config-provider.xml?rev=1676254&r1=1676253&r2=1676254&view=diff
==============================================================================
--- sling/trunk/bundles/commons/log/src/test/resources/test-config-provider.xml (original)
+++ sling/trunk/bundles/commons/log/src/test/resources/test-config-provider.xml Mon Apr 27 13:18:07 2015
@@ -1,3 +1,21 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 <included>
   <appender name="FOO2FILE" class="ch.qos.logback.core.FileAppender">
     <file>${sling.home}/logs/foo2.log</file>