geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r719823 - in /geronimo/gshell/trunk: ./ gshell-support/ gshell-support/gshell-plexus/ gshell-support/gshell-plexus/src/ gshell-support/gshell-plexus/src/main/ gshell-support/gshell-plexus/src/main/java/ gshell-support/gshell-plexus/src/main...
Date Sat, 22 Nov 2008 07:30:10 GMT
Author: jdillon
Date: Fri Nov 21 23:30:09 2008
New Revision: 719823

URL: http://svn.apache.org/viewvc?rev=719823&view=rev
Log:
Bring gshell-plexus back to life

Added:
    geronimo/gshell/trunk/gshell-support/gshell-plexus/
    geronimo/gshell/trunk/gshell-support/gshell-plexus/pom.xml   (with props)
    geronimo/gshell/trunk/gshell-support/gshell-plexus/src/
    geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/
    geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/
    geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/
    geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/
    geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/
    geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/
    geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/
    geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java
  (with props)
Modified:
    geronimo/gshell/trunk/gshell-support/pom.xml
    geronimo/gshell/trunk/pom.xml

Added: geronimo/gshell/trunk/gshell-support/gshell-plexus/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-plexus/pom.xml?rev=719823&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-plexus/pom.xml (added)
+++ geronimo/gshell/trunk/gshell-support/gshell-plexus/pom.xml Fri Nov 21 23:30:09 2008
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    
+    <modelVersion>4.0.0</modelVersion>
+    
+    <parent>
+        <groupId>org.apache.geronimo.gshell.support</groupId>
+        <artifactId>gshell-support</artifactId>
+        <version>1.0-alpha-2-SNAPSHOT</version>
+    </parent>
+    
+    <artifactId>gshell-plexus</artifactId>
+    <name>GShell Support :: Plexus</name>
+    
+    <description>
+        Customizations of Plexus for GShell.
+    </description>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.plexus</groupId>
+            <artifactId>plexus-container-default</artifactId>
+            <version>1.0-beta-1</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>junit</groupId>
+                    <artifactId>junit</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.plexus</groupId>
+            <artifactId>plexus-component-annotations</artifactId>
+            <version>1.0-beta-1</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>junit</groupId>
+                    <artifactId>junit</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+    </dependencies>
+
+</project>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-support/gshell-plexus/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-support/gshell-plexus/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-support/gshell-plexus/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java?rev=719823&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java
(added)
+++ geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java
Fri Nov 21 23:30:09 2008
@@ -0,0 +1,91 @@
+/*
+ * 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.geronimo.gshell.plexus;
+
+import org.codehaus.plexus.logging.AbstractLogger;
+import org.codehaus.plexus.logging.BaseLoggerManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Adapts the Plexus logging system to SLF4J.
+ *
+ * @version $Rev$ $Date$
+ */
+public class Slf4jLoggingManager
+    extends BaseLoggerManager
+{
+    //
+    // FIXME: Probably need to change this to avoid picking up the BaseLoggerManager, just
implement everything ourselves
+    //        Might be able to use AbstractLoggerManager
+
+    protected org.codehaus.plexus.logging.Logger createLogger(final String key) {
+        return new LoggerImpl(getThreshold(), LoggerFactory.getLogger(key));
+    }
+
+    public org.codehaus.plexus.logging.Logger getLoggerForComponent(final String role, final
String roleHint) {
+        return createLogger(toMapKey(role, roleHint));
+    }
+
+    public void returnComponentLogger(final String role, final String roleHint) {
+        // Ignore
+    }
+    
+    /**
+     * Adapts the Plexus {@link org.codehaus.plexus.logging.Logger} interface to SLF4J
+     */
+    public static class LoggerImpl
+        extends AbstractLogger
+    {
+        private final Logger log;
+
+        public LoggerImpl(final int threshold, final Logger logger) {
+            super(threshold, logger.getName());
+
+            this.log = logger;
+        }
+
+        public void debug(final String message, final Throwable throwable) {
+            log.debug( message, throwable );
+        }
+
+        public void error(final String message, final Throwable throwable) {
+            log.error(message, throwable);
+        }
+
+        public void fatalError(final String message, final Throwable throwable) {
+            log.error(message, throwable);
+        }
+
+        public org.codehaus.plexus.logging.Logger getChildLogger(final String name) {
+            String childName = log.getName() + "." + name;
+
+            return new LoggerImpl(getThreshold(), LoggerFactory.getLogger(childName));
+        }
+
+        public void info(String message, final Throwable throwable) {
+            log.info(message, throwable);
+        }
+
+        public void warn(String message, final Throwable throwable) {
+            log.warn(message, throwable);
+        }
+    }
+}
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-support/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/pom.xml?rev=719823&r1=719822&r2=719823&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-support/pom.xml Fri Nov 21 23:30:09 2008
@@ -55,8 +55,9 @@
         <module>gshell-vfs-meta</module>
         <module>gshell-vfs-truezip</module>
         <module>gshell-security</module>
+        <module>gshell-plexus</module>
         <module>gshell-artifact</module>
-        <!--<module>gshell-artifact-maven</module>-->
+        <module>gshell-artifact-maven</module>
         <module>gshell-artifact-ivy</module>
         <module>gshell-marshal</module>
         <module>gshell-xstore</module>

Modified: geronimo/gshell/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/pom.xml?rev=719823&r1=719822&r2=719823&view=diff
==============================================================================
--- geronimo/gshell/trunk/pom.xml (original)
+++ geronimo/gshell/trunk/pom.xml Fri Nov 21 23:30:09 2008
@@ -266,7 +266,13 @@
                 <artifactId>gshell-marshal</artifactId>
                 <version>1.0-alpha-2-SNAPSHOT</version>
             </dependency>
-            
+
+            <dependency>
+                <groupId>org.apache.geronimo.gshell.support</groupId>
+                <artifactId>gshell-plexus</artifactId>
+                <version>1.0-alpha-2-SNAPSHOT</version>
+            </dependency>
+
             <dependency>
                 <groupId>org.apache.geronimo.gshell.support</groupId>
                 <artifactId>gshell-xstore</artifactId>



Mime
View raw message