You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2008/05/21 09:48:25 UTC

svn commit: r658577 [2/2] - in /geronimo/gshell/trunk: ./ gshell-assembly/ gshell-assembly/src/main/assembly/ gshell-bootstrap/ gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/ gshell-cli/src/main/resources/META-INF/plexus/ gshell-command-api/ ...

Copied: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginDiscoverer.java (from r653220, geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoverer.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginDiscoverer.java?p2=geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginDiscoverer.java&p1=geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoverer.java&r1=653220&r2=658577&rev=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoverer.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginDiscoverer.java Wed May 21 00:48:22 2008
@@ -19,47 +19,44 @@
 
 package org.apache.geronimo.gshell.plugin;
 
-import java.io.Reader;
-
-import com.thoughtworks.xstream.XStreamException;
-import org.apache.geronimo.gshell.descriptor.CommandSetDescriptor;
 import org.codehaus.plexus.component.discovery.AbstractComponentDiscoverer;
 import org.codehaus.plexus.component.repository.ComponentSetDescriptor;
 import org.codehaus.plexus.configuration.PlexusConfigurationException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.apache.geronimo.gshell.model.plugin.PluginMarshaller;
+import org.apache.geronimo.gshell.model.plugin.Plugin;
+
+import java.io.Reader;
 
 /**
- * Plexus component discovery for GShell commands.
+ * ???
  *
  * @version $Rev$ $Date$
  */
-public class CommandDiscoverer
+public class PluginDiscoverer
     extends AbstractComponentDiscoverer
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    public CommandDiscoverer() {}
+    private final PluginMarshaller marshaller = new PluginMarshaller();
+
+    public PluginDiscoverer() {}
 
     protected String getComponentDescriptorLocation() {
-        return "META-INF/gshell/commands.xml";
+        return "META-INF/gshell/plugin.xml";
     }
 
     protected ComponentSetDescriptor createComponentDescriptors(final Reader reader, final String source) throws PlexusConfigurationException {
         assert reader != null;
         assert source != null;
 
-        log.debug("Loading descriptors from: {}", source);
+        log.debug("Discovered plugin: {}", source);
 
-        try {
-            CommandSetDescriptor commands = CommandSetDescriptor.fromXML(reader);
+        Plugin plugin = marshaller.unmarshal(reader);
 
-            log.debug("Loaded command set: {}", commands.getId());
+        // TODO: Build plexus component set descriptor
 
-            return new ComponentSetDescriptorAdapter(commands);
-        }
-        catch (XStreamException e) {
-            throw new PlexusConfigurationException("Failed to load descriptors from: " + source, e);
-        }
+        return null;
     }
 }
\ No newline at end of file

Added: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginManager.java?rev=658577&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginManager.java (added)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginManager.java Wed May 21 00:48:22 2008
@@ -0,0 +1,32 @@
+/*
+ * 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.plugin;
+
+import org.apache.geronimo.gshell.model.plugin.Plugin;
+
+/**
+ * ???
+ *
+ * @version $Rev$ $Date$
+ */
+public interface PluginManager
+{
+    void addPlugin(Plugin plugin);
+}
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginManager.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginManager.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java?rev=658577&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java (added)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java Wed May 21 00:48:22 2008
@@ -0,0 +1,77 @@
+/*
+ * 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.settings;
+
+import org.codehaus.plexus.component.annotations.Component;
+import org.codehaus.plexus.component.annotations.Requirement;
+import org.apache.geronimo.gshell.model.settings.Settings;
+import org.apache.geronimo.gshell.model.common.SourceRepository;
+import org.apache.geronimo.gshell.artifact.ArtifactManager;
+import org.apache.maven.artifact.UnknownRepositoryLayoutException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.net.URL;
+import java.net.MalformedURLException;
+
+/**
+ * Default implementation of the {@link SettingsManager} component.
+ *
+ * @version $Rev$ $Date$
+ */
+@Component(role=SettingsManager.class)
+public class DefaultSettingsManager
+    implements SettingsManager
+{
+    private final Logger log = LoggerFactory.getLogger(getClass());
+    
+    @Requirement
+    private ArtifactManager artifactManager;
+
+    private Settings settings;
+
+    public void setSettings(final Settings settings) {
+        assert settings != null;
+
+        this.settings = settings;
+    }
+
+    public Settings getSettings() {
+        return settings;
+    }
+
+    public void configure() throws Exception {
+        log.debug("Configuring");
+
+        List<SourceRepository> sourceRepositories = settings.sourceRepositories();
+        if (sourceRepositories != null) {
+            for (SourceRepository repo : sourceRepositories) {
+                String loc = repo.getLocation();
+                URL url = new URL(loc);
+                String id = url.getHost(); // FIXME: Need to expose the repo id in the model, for now assume the id is the hostname
+
+                artifactManager.addRemoteRepository(id, url);
+            }
+        }
+        
+        // TODO: apply other artifact related settings (proxy, auth, whatever)
+    }
+}
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/SettingsManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/SettingsManager.java?rev=658577&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/SettingsManager.java (added)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/SettingsManager.java Wed May 21 00:48:22 2008
@@ -0,0 +1,39 @@
+/*
+ * 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.settings;
+
+import org.apache.geronimo.gshell.model.settings.Settings;
+import org.apache.maven.artifact.UnknownRepositoryLayoutException;
+
+import java.net.MalformedURLException;
+
+/**
+ * ???
+ *
+ * @version $Rev$ $Date$
+ */
+public interface SettingsManager
+{
+    void setSettings(Settings settings);
+
+    Settings getSettings();
+
+    void configure() throws Exception;
+}
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/SettingsManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/SettingsManager.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/SettingsManager.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/GShellBuilderTest.java (from r653220, geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/DefaultVariablesTest.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/GShellBuilderTest.java?p2=geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/GShellBuilderTest.java&p1=geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/DefaultVariablesTest.java&r1=653220&r2=658577&rev=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/DefaultVariablesTest.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/GShellBuilderTest.java Wed May 21 00:48:22 2008
@@ -19,209 +19,58 @@
 
 package org.apache.geronimo.gshell;
 
-import java.util.Iterator;
-
 import junit.framework.TestCase;
-import org.apache.geronimo.gshell.command.Variables;
+import org.apache.geronimo.gshell.model.application.ApplicationMarshaller;
+import org.apache.geronimo.gshell.model.application.Application;
+import org.apache.geronimo.gshell.model.settings.SettingsMarshaller;
+import org.apache.geronimo.gshell.model.settings.Settings;
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.classworlds.realm.ClassRealm;
+import org.codehaus.plexus.classworlds.ClassWorld;
+
+import java.net.URL;
+import java.util.Collection;
 
 /**
- * Unit tests for the {@link DefaultVariables} class.
+ * Unit tests for the {@link GShellBuilder} class.
  *
  * @version $Rev$ $Date$
  */
-public class DefaultVariablesTest
+public class GShellBuilderTest
     extends TestCase
 {
-    public void testSet() throws Exception {
-        DefaultVariables vars = new DefaultVariables();
-        String name = "a";
-        Object value = new Object();
-
-        assertFalse(vars.contains(name));
-        vars.set(name, value);
-        assertTrue(vars.contains(name));
-
-        Object obj = vars.get(name);
-        assertEquals(value, obj);
-
-        String str = vars.names().next();
-        assertEquals(name, str);
-    }
-
-    public void testSetAsImmutable() throws Exception {
-        DefaultVariables vars = new DefaultVariables();
-        String name = "a";
-        Object value = new Object();
-
-        assertTrue(vars.isMutable(name));
-        vars.set(name, value, false);
-        assertFalse(vars.isMutable(name));
-
-        try {
-            vars.set(name, value);
-            fail("Set an immutable variable");
-        }
-        catch (Variables.ImmutableVariableException expected) {
-            // ignore
-        }
-    }
-
-    public void testSetAsImmutableInParent() throws Exception {
-        Variables parent = new DefaultVariables();
-        DefaultVariables vars = new DefaultVariables(parent);
-        String name = "a";
-        Object value = new Object();
-
-        parent.set(name, value, false);
-        assertFalse(parent.isMutable(name));
-        assertFalse(vars.isMutable(name));
-
-        try {
-            vars.set(name, value);
-            fail("Set an immutable variable");
-        }
-        catch (Variables.ImmutableVariableException expected) {
-            // ignore
-        }
-    }
-
-    public void testSetParentFromChild() throws Exception {
-        Variables parent = new DefaultVariables();
-        DefaultVariables vars = new DefaultVariables(parent);
-        String name = "a";
-        Object value = new Object();
-
-        // Make sure we can add to parent's scope from child
-        vars.parent().set(name, value);
-        assertEquals(value, parent.get(name));
-
-        // Make sure the iter sees it
-        assertTrue(vars.names().hasNext());
-    }
+    private GShellBuilder builder;
 
-    public void testGet() throws Exception {
-        DefaultVariables vars = new DefaultVariables();
-        String name = "a";
-        Object value = new Object();
-
-        Object obj1 = vars.get(name);
-        assertNull(obj1);
-
-        vars.set(name, value);
-        Object obj2 = vars.get(name);
-        assertSame(value, obj2);
+    protected void setUp() throws Exception {
+        builder = new GShellBuilder();
     }
 
-    public void testGetUsingDefault() throws Exception {
-        DefaultVariables vars = new DefaultVariables();
-        String name = "a";
-        Object value = new Object();
-
-        Object obj1 = vars.get(name);
-        assertNull(obj1);
-
-        Object obj2 = vars.get(name, value);
-        assertSame(value, obj2);
-    }
-
-    public void testGetCloaked() throws Exception {
-        Variables parent = new DefaultVariables();
-        DefaultVariables vars = new DefaultVariables(parent);
-        String name = "a";
-        Object value = new Object();
-
-        parent.set(name, value);
-        Object obj1 = vars.get(name);
-        assertEquals(value, obj1);
-
-        Object value2 = new Object();
-        vars.set(name, value2);
-
-        Object obj2 = vars.get(name);
-        assertSame(value2, obj2);
-        assertNotSame(value, obj2);
-    }
-
-    public void testUnsetAsImmutable() throws Exception {
-        DefaultVariables vars = new DefaultVariables();
-        String name = "a";
-        Object value = new Object();
-
-        assertTrue(vars.isMutable(name));
-        vars.set(name, value, false);
-        assertFalse(vars.isMutable(name));
-
-        try {
-            vars.unset(name);
-            fail("Unset an immutable variable");
-        }
-        catch (Variables.ImmutableVariableException expected) {
-            // ignore
-        }
+    protected void tearDown() throws Exception {
+        super.tearDown();
     }
 
-    public void testUnsetAsImmutableInParent() throws Exception {
-        Variables parent = new DefaultVariables();
-        DefaultVariables vars = new DefaultVariables(parent);
-        String name = "a";
-        Object value = new Object();
-
-        parent.set(name, value, false);
-        assertFalse(parent.isMutable(name));
-        assertFalse(vars.isMutable(name));
-
-        try {
-            vars.unset(name);
-            fail("Unset an immutable variable");
-        }
-        catch (Variables.ImmutableVariableException expected) {
-            // ignore
-        }
-    }
-
-    public void testCloaking() throws Exception {
-        Variables parent = new DefaultVariables();
-        DefaultVariables vars = new DefaultVariables(parent);
-        String name = "a";
-        Object value = new Object();
-
-        parent.set(name, value);
-        assertFalse(parent.isCloaked(name));
-        assertFalse(vars.isCloaked(name));
-
-        vars.set(name, new Object());
-        assertTrue(vars.isCloaked(name));
-    }
+    public void testBuild1() throws Exception {
+        SettingsMarshaller settingsMarshaller = new SettingsMarshaller();
+        URL settingsUrl = getClass().getResource("settings1.xml");
+        assertNotNull(settingsUrl);
 
-    public void testParent() throws Exception {
-        Variables parent = new DefaultVariables();
-        assertNull(parent.parent());
+        Settings settings = settingsMarshaller.unmarshal(settingsUrl);
+        assertNotNull(settings);
+        System.out.println(settings);
+        
+        builder.setSettings(settings);
 
-        DefaultVariables vars = new DefaultVariables(parent);
-        assertNotNull(vars.parent());
+        ApplicationMarshaller applicationMarshaller = new ApplicationMarshaller();
+        URL applicationUrl = getClass().getResource("application1.xml");
+        assertNotNull(applicationUrl);
 
-        assertEquals(parent, vars.parent());
-    }
+        Application application = applicationMarshaller.unmarshal(applicationUrl);
+        assertNotNull(application);
+        System.out.println(application);
 
-    public void testNames() throws Exception {
-        DefaultVariables vars = new DefaultVariables();
-        Iterator<String> iter = vars.names();
-        assertNotNull(iter);
-        assertFalse(iter.hasNext());
-    }
+        builder.setApplication(application);
 
-    public void testNamesImmutable() throws Exception {
-        DefaultVariables vars = new DefaultVariables();
-        vars.set("a", "b");
-
-        Iterator<String> iter = vars.names();
-        iter.next();
-
-        try {
-            iter.remove();
-        }
-        catch (UnsupportedOperationException expected) {
-            // ignore
-        }
+        GShell shell = builder.build();
+        // assertNotNull(shell);
     }
-}
+}
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/layout/DefaultLayoutManagerTest.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/layout/DefaultLayoutManagerTest.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/layout/DefaultLayoutManagerTest.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/layout/DefaultLayoutManagerTest.java Wed May 21 00:48:22 2008
@@ -21,7 +21,7 @@
 
 import junit.framework.TestCase;
 import org.apache.geronimo.gshell.DefaultEnvironment;
-import org.apache.geronimo.gshell.command.IO;
+import org.apache.geronimo.gshell.io.IO;
 import org.apache.geronimo.gshell.layout.loader.DummyLayoutLoader;
 import org.apache.geronimo.gshell.layout.model.CommandNode;
 import org.apache.geronimo.gshell.layout.model.GroupNode;

Added: geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/application1.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/application1.xml?rev=658577&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/application1.xml (added)
+++ geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/application1.xml Wed May 21 00:48:22 2008
@@ -0,0 +1,25 @@
+<?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$ -->
+
+<application>
+    
+</application>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/application1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/application1.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/application1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/settings1.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/settings1.xml?rev=658577&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/settings1.xml (added)
+++ geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/settings1.xml Wed May 21 00:48:22 2008
@@ -0,0 +1,25 @@
+<?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$ -->
+
+<settings>
+    
+</settings>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/settings1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/settings1.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-core/src/test/resources/org/apache/geronimo/gshell/settings1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: geronimo/gshell/trunk/gshell-diet/gshell-diet-log4j/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Propchange: geronimo/gshell/trunk/gshell-maven-plugin/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Modified: geronimo/gshell/trunk/gshell-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-maven-plugin/pom.xml?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-maven-plugin/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-maven-plugin/pom.xml Wed May 21 00:48:22 2008
@@ -36,6 +36,34 @@
         Provides build integration with GShell.
     </description>
 
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.maven</groupId>
+                <artifactId>maven-project</artifactId>
+                <version>2.0.5</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.maven</groupId>
+                <artifactId>maven-artifact</artifactId>
+                <version>2.0.5</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.maven</groupId>
+                <artifactId>maven-plugin-api</artifactId>
+                <version>2.0.5</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.maven</groupId>
+                <artifactId>maven-model</artifactId>
+                <version>2.0.5</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+    
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>

Propchange: geronimo/gshell/trunk/gshell-model/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/Application.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/Application.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/Application.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/Application.java Wed May 21 00:48:22 2008
@@ -29,6 +29,7 @@
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Properties;
+import java.io.File;
 
 /**
  * Application model root element.
@@ -47,7 +48,7 @@
 
     private Properties properties;
 
-    private String repository;
+    private File repository;
 
     private List<SourceRepository> sourceRepositories;
 
@@ -93,11 +94,11 @@
         this.properties = properties;
     }
 
-    public String getRepository() {
+    public File getRepository() {
         return repository;
     }
 
-    public void setRepository(final String repository) {
+    public void setRepository(final File repository) {
         this.repository = repository;
     }
 
@@ -115,6 +116,14 @@
         sourceRepositories.add(repository);
     }
 
+    //
+    // TODO: Change to Plugin*
+    //
+
+    //
+    // TODO: Provide accessor to aggregate dependencies w/group dependencies
+    //
+
     public List<Dependency> dependencies() {
         return dependencies;
     }

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationMarshaller.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationMarshaller.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationMarshaller.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationMarshaller.java Wed May 21 00:48:22 2008
@@ -29,7 +29,7 @@
 public class ApplicationMarshaller
     extends MarshallerSupport<Application>
 {
-    protected ApplicationMarshaller() {
+    public ApplicationMarshaller() {
         super(Application.class);
     }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/Dependency.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/Dependency.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/Dependency.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/Dependency.java Wed May 21 00:48:22 2008
@@ -39,4 +39,56 @@
     public void setDependencyGroup(final DependencyGroup group) {
         this.dependencyGroup = group;
     }
+
+    // Return configuration detals from the group if not directly configured
+    
+    public String getGroupId() {
+        String tmp = super.getGroupId();
+
+        if (tmp == null && dependencyGroup != null) {
+            tmp = dependencyGroup.getGroupId();
+        }
+
+        return tmp;
+    }
+
+    public String getArtifactId() {
+        String tmp = super.getArtifactId();
+
+        if (tmp == null && dependencyGroup != null) {
+            tmp = dependencyGroup.getArtifactId();
+        }
+
+        return tmp;
+    }
+
+    public String getClassifier() {
+        String tmp = super.getClassifier();
+
+        if (tmp == null && dependencyGroup != null) {
+            tmp = dependencyGroup.getClassifier();
+        }
+
+        return tmp;
+    }
+
+    public String getType() {
+        String tmp = super.getType();
+
+        if (tmp == null && dependencyGroup != null) {
+            tmp = dependencyGroup.getType();
+        }
+
+        return tmp;
+    }
+
+    public String getVersion() {
+        String tmp = super.getVersion();
+
+        if (tmp == null && dependencyGroup != null) {
+            tmp = dependencyGroup.getVersion();
+        }
+
+        return tmp;
+    }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/SourceRepository.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/SourceRepository.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/SourceRepository.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/SourceRepository.java Wed May 21 00:48:22 2008
@@ -34,6 +34,7 @@
 
     // Name
 
+    // TODO: Change to URI
     private String location;
 
     // Layout

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/marshal/MarshallerSupport.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/marshal/MarshallerSupport.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/marshal/MarshallerSupport.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/marshal/MarshallerSupport.java Wed May 21 00:48:22 2008
@@ -25,6 +25,7 @@
 
 import java.io.InputStream;
 import java.io.IOException;
+import java.io.Reader;
 import java.net.URL;
 
 /**
@@ -73,6 +74,13 @@
         return (T)createXStream().fromXML(input);
     }
 
+    public T unmarshal(final Reader reader) {
+        assert reader != null;
+
+        //noinspection unchecked
+        return (T)createXStream().fromXML(reader);
+    }
+    
     //
     // Helpers
     //

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/plugin/Plugin.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/plugin/Plugin.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/plugin/Plugin.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/plugin/Plugin.java Wed May 21 00:48:22 2008
@@ -39,6 +39,12 @@
 {
     private String id;
 
+    // groupId
+
+    // artifactId
+
+    // version
+
     private String name;
 
     private String description;

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/plugin/PluginMarshaller.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/plugin/PluginMarshaller.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/plugin/PluginMarshaller.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/plugin/PluginMarshaller.java Wed May 21 00:48:22 2008
@@ -29,7 +29,7 @@
 public class PluginMarshaller
     extends MarshallerSupport<Plugin>
 {
-    protected PluginMarshaller() {
+    public PluginMarshaller() {
         super(Plugin.class);
     }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsMarshaller.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsMarshaller.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsMarshaller.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsMarshaller.java Wed May 21 00:48:22 2008
@@ -29,7 +29,7 @@
 public class SettingsMarshaller
     extends MarshallerSupport<Settings>
 {
-    protected SettingsMarshaller() {
+    public SettingsMarshaller() {
         super(Settings.class);
     }
 }
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-parser/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Modified: geronimo/gshell/trunk/gshell-parser/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-parser/pom.xml?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-parser/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-parser/pom.xml Wed May 21 00:48:22 2008
@@ -75,7 +75,6 @@
             <plugin>
                 <groupId>org.apache.geronimo.gshell</groupId>
                 <artifactId>javacc-maven-plugin</artifactId>
-                <version>${version}</version>
                 <executions>
                     <execution>
                         <id>jjtree</id>

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/pom.xml?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/pom.xml Wed May 21 00:48:22 2008
@@ -54,7 +54,6 @@
             <plugin>
                 <groupId>org.apache.geronimo.gshell</groupId>
                 <artifactId>gshell-maven-plugin</artifactId>
-                <version>${version}</version>
                 <executions>
                     <execution>
                         <goals>

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshCommand.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshCommand.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshCommand.java Wed May 21 00:48:22 2008
@@ -25,12 +25,12 @@
 
 import jline.Terminal;
 import org.apache.geronimo.gshell.ExitNotification;
+import org.apache.geronimo.gshell.io.PromptReader;
 import org.apache.geronimo.gshell.clp.Argument;
 import org.apache.geronimo.gshell.clp.Option;
 import org.apache.geronimo.gshell.command.CommandSupport;
 import org.apache.geronimo.gshell.command.annotation.CommandComponent;
 import org.apache.geronimo.gshell.command.annotation.Requirement;
-import org.apache.geronimo.gshell.console.PromptReader;
 import org.apache.geronimo.gshell.remote.client.proxy.RemoteShellProxy;
 
 /**

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteEnvironmentProxy.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteEnvironmentProxy.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteEnvironmentProxy.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteEnvironmentProxy.java Wed May 21 00:48:22 2008
@@ -19,7 +19,7 @@
 
 package org.apache.geronimo.gshell.remote.client.proxy;
 
-import org.apache.geronimo.gshell.command.IO;
+import org.apache.geronimo.gshell.io.IO;
 import org.apache.geronimo.gshell.command.Variables;
 import org.apache.geronimo.gshell.remote.client.RshClient;
 import org.apache.geronimo.gshell.shell.Environment;

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellProxy.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellProxy.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellProxy.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellProxy.java Wed May 21 00:48:22 2008
@@ -23,8 +23,8 @@
 
 import jline.Terminal;
 import org.apache.geronimo.gshell.ExitNotification;
+import org.apache.geronimo.gshell.io.IO;
 import org.apache.geronimo.gshell.ansi.Renderer;
-import org.apache.geronimo.gshell.command.IO;
 import org.apache.geronimo.gshell.console.Console;
 import org.apache.geronimo.gshell.console.JLineConsole;
 import org.apache.geronimo.gshell.remote.RemoteShell;

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-common/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/pom.xml?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/pom.xml Wed May 21 00:48:22 2008
@@ -54,7 +54,6 @@
             <plugin>
                 <groupId>org.apache.geronimo.gshell</groupId>
                 <artifactId>gshell-maven-plugin</artifactId>
-                <version>${version}</version>
                 <executions>
                     <execution>
                         <goals>

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RemoteIO.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RemoteIO.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RemoteIO.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RemoteIO.java Wed May 21 00:48:22 2008
@@ -19,7 +19,7 @@
 
 package org.apache.geronimo.gshell.remote.server;
 
-import org.apache.geronimo.gshell.command.IO;
+import org.apache.geronimo.gshell.io.IO;
 import org.apache.geronimo.gshell.whisper.stream.SessionInputStream;
 import org.apache.geronimo.gshell.whisper.stream.SessionOutputStream;
 import org.apache.geronimo.gshell.whisper.transport.Session;

Propchange: geronimo/gshell/trunk/gshell-support/gshell-ansi/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Modified: geronimo/gshell/trunk/gshell-support/gshell-artifact/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact/pom.xml?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact/pom.xml Wed May 21 00:48:22 2008
@@ -51,6 +51,11 @@
 
         <dependency>
             <groupId>org.apache.geronimo.gshell.support</groupId>
+            <artifactId>gshell-io</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.gshell.support</groupId>
             <artifactId>gshell-plexus</artifactId>
         </dependency>
 

Modified: geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/ArtifactManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/ArtifactManager.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/ArtifactManager.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/ArtifactManager.java Wed May 21 00:48:22 2008
@@ -49,6 +49,7 @@
 
     void addRemoteRepository(ArtifactRepository repository);
 
+    // TODO: Change to URI
     void addRemoteRepository(String id, URL url) throws UnknownRepositoryLayoutException;
 
     ArtifactFactory getArtifactFactory();

Modified: geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinnerMonitor.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinnerMonitor.java?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinnerMonitor.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinnerMonitor.java Wed May 21 00:48:22 2008
@@ -22,6 +22,7 @@
 import static org.apache.maven.wagon.WagonConstants.UNKNOWN_LENGTH;
 import org.apache.maven.wagon.events.TransferEvent;
 import static org.apache.maven.wagon.events.TransferEvent.REQUEST_PUT;
+import org.apache.geronimo.gshell.io.IO;
 
 /**
  * A download monitor providing a simple spinning progress interface.
@@ -31,13 +32,17 @@
 public class ProgressSpinnerMonitor
     extends TransferListenerSupport
 {
-    private long complete;
+    private IO io;
 
     private ProgressSpinner spinner = new ProgressSpinner();
 
-    //
-    // FIXME: Need to abstract the actualy IO here... But IO is not accessible ATM
-    //
+    private long complete;
+
+    public ProgressSpinnerMonitor(final IO io) {
+        assert io != null;
+
+        this.io = io;
+    }
 
     public void transferInitiated(TransferEvent event) {
         complete = 0;
@@ -48,7 +53,7 @@
 
         String url = event.getWagon().getRepository().getUrl();
 
-        System.out.println(message + ": " + url + "/" + event.getResource().getName());
+        io.info("{}: {}/{}", message, url, event.getResource().getName());
     }
 
     public void transferProgress(final TransferEvent event, final byte[] buffer, final int length) {
@@ -64,7 +69,7 @@
             message = complete + "/" + (total == UNKNOWN_LENGTH ? "?" : total + "b");
         }
 
-        System.out.print(spinner.spin(message));
+        io.info(spinner.spin(message));
     }
 
     public void transferCompleted(final TransferEvent event) {
@@ -73,8 +78,8 @@
         if (length != UNKNOWN_LENGTH) {
             String type = (event.getRequestType() == REQUEST_PUT ? "uploaded" : "downloaded");
             String l = length >= 1024 ? (length / 1024) + "K" : length + "b";
-            
-            System.out.println(l + " " + type);
+
+            io.info("{} {}", l, type);
         }
     }
 }
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-support/gshell-clp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Propchange: geronimo/gshell/trunk/gshell-support/gshell-common/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Propchange: geronimo/gshell/trunk/gshell-support/gshell-i18n/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Propchange: geronimo/gshell/trunk/gshell-support/gshell-io/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Added: geronimo/gshell/trunk/gshell-support/gshell-io/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-io/pom.xml?rev=658577&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-io/pom.xml (added)
+++ geronimo/gshell/trunk/gshell-support/gshell-io/pom.xml Wed May 21 00:48:22 2008
@@ -0,0 +1,78 @@
+<?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-io</artifactId>
+    <name>GShell Support :: IO</name>
+    
+    <description>
+        Provides support for working with Input/Output muck.
+    </description>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>test</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.gshell.support</groupId>
+            <artifactId>gshell-common</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.gshell.support</groupId>
+            <artifactId>gshell-ansi</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.codehaus.plexus</groupId>
+            <artifactId>plexus-container-default</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.plexus</groupId>
+            <artifactId>plexus-utils</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.plexus</groupId>
+            <artifactId>plexus-component-annotations</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>
\ No newline at end of file

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

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

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

Copied: geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/IO.java (from r653220, geronimo/gshell/trunk/gshell-command-api/src/main/java/org/apache/geronimo/gshell/command/IO.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/IO.java?p2=geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/IO.java&p1=geronimo/gshell/trunk/gshell-command-api/src/main/java/org/apache/geronimo/gshell/command/IO.java&r1=653220&r2=658577&rev=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-command-api/src/main/java/org/apache/geronimo/gshell/command/IO.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/IO.java Wed May 21 00:48:22 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.command;
+package org.apache.geronimo.gshell.io;
 
 import java.io.IOException;
 import java.io.InputStream;

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

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

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

Copied: geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/PromptReader.java (from r653220, geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/PromptReader.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/PromptReader.java?p2=geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/PromptReader.java&p1=geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/PromptReader.java&r1=653220&r2=658577&rev=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/PromptReader.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-io/src/main/java/org/apache/geronimo/gshell/io/PromptReader.java Wed May 21 00:48:22 2008
@@ -17,14 +17,13 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.console;
+package org.apache.geronimo.gshell.io;
 
 import java.io.PrintWriter;
 import java.io.IOException;
 
 import jline.ConsoleReader;
 import jline.Terminal;
-import org.apache.geronimo.gshell.command.IO;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;

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

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

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

Added: geronimo/gshell/trunk/gshell-support/gshell-io/src/test/java/org/apache/geronimo/gshell/io/IOTest.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-io/src/test/java/org/apache/geronimo/gshell/io/IOTest.java?rev=658577&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-io/src/test/java/org/apache/geronimo/gshell/io/IOTest.java (added)
+++ geronimo/gshell/trunk/gshell-support/gshell-io/src/test/java/org/apache/geronimo/gshell/io/IOTest.java Wed May 21 00:48:22 2008
@@ -0,0 +1,61 @@
+/*
+ * 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.io;
+
+import junit.framework.TestCase;
+import org.apache.geronimo.gshell.io.IO;
+
+/**
+ * Unit tests for the {@link IO} class.
+ *
+ * @version $Rev$ $Date$
+ */
+public class IOTest
+    extends TestCase
+{
+    public void testConstructorArgs() throws Exception {
+        try {
+            new IO(null, null, null);
+            fail("Accepted null value");
+        }
+        catch (AssertionError expected) {
+            // ignore
+        }
+
+        try {
+            new IO(System.in, null, null);
+            fail("Accepted null value");
+        }
+        catch (AssertionError expected) {
+            // ignore
+        }
+
+        try {
+            new IO(System.in, System.out, null);
+            fail("Accepted null value");
+        }
+        catch (AssertionError expected) {
+            // ignore
+        }
+
+        // Happy day...
+        new IO(System.in, System.out, System.err);
+    }
+}

Propchange: geronimo/gshell/trunk/gshell-support/gshell-io/src/test/java/org/apache/geronimo/gshell/io/IOTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-support/gshell-io/src/test/java/org/apache/geronimo/gshell/io/IOTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-support/gshell-io/src/test/java/org/apache/geronimo/gshell/io/IOTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: geronimo/gshell/trunk/gshell-support/gshell-plexus/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Modified: 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=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-plexus/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-plexus/pom.xml Wed May 21 00:48:22 2008
@@ -39,6 +39,11 @@
     
     <dependencies>
         <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        
+        <dependency>
             <groupId>org.codehaus.plexus</groupId>
             <artifactId>plexus-container-default</artifactId>
         </dependency>

Added: geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/GShellPlexusContainer.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/GShellPlexusContainer.java?rev=658577&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/GShellPlexusContainer.java (added)
+++ geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/GShellPlexusContainer.java Wed May 21 00:48:22 2008
@@ -0,0 +1,115 @@
+/*
+ * 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.DefaultPlexusContainer;
+import org.codehaus.plexus.PlexusContainerException;
+import org.codehaus.plexus.ContainerConfiguration;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.DefaultContainerConfiguration;
+import org.codehaus.plexus.DuplicateChildContainerException;
+import org.codehaus.plexus.classworlds.ClassWorld;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.codehaus.plexus.classworlds.realm.ClassRealm;
+
+/**
+ * And extention of the default Plexus container.
+ *
+ * @version $Rev$ $Date$
+ */
+public class GShellPlexusContainer
+    extends DefaultPlexusContainer
+{
+    public GShellPlexusContainer() throws PlexusContainerException {
+        super();
+    }
+
+    public GShellPlexusContainer(final ContainerConfiguration config) throws PlexusContainerException {
+        super(config);
+    }
+
+    public GShellPlexusContainer createChild(final String name, final ClassRealm realm) throws PlexusContainerException {
+        assert name != null;
+        assert realm != null;
+
+        if (hasChildContainer(name)) {
+            throw new DuplicateChildContainerException(getName(), name);
+        }
+
+        ContainerConfiguration config = new DefaultContainerConfiguration();
+        config.setName(name);
+        config.setParentContainer(this);
+        config.setClassWorld(new ClassWorld(name, realm));
+
+        GShellPlexusContainer childContainer = new GShellPlexusContainer(config);
+
+        //noinspection unchecked
+        childContainers.put(name, childContainer);
+
+        return childContainer;
+    }
+
+    public GShellPlexusContainer createChild(final ContainerConfiguration config) throws PlexusContainerException {
+        assert config != null;
+
+        String name = config.getName();
+
+        if (hasChildContainer(name)) {
+            throw new DuplicateChildContainerException(getName(), name);
+        }
+
+        config.setParentContainer(this);
+
+        GShellPlexusContainer childContainer = new GShellPlexusContainer(config);
+
+        //noinspection unchecked
+        childContainers.put(name, childContainer);
+
+        return childContainer;
+    }
+
+    @Override
+    public PlexusContainer createChildContainer(final String name, final ClassRealm realm) throws PlexusContainerException {
+        return createChild(name, realm);
+    }
+
+    //
+    // Add type-safe lookups based on class roles
+    //
+    
+    @SuppressWarnings("unchecked")
+    public <T> T lookupComponent(final Class<T> role) throws ComponentLookupException {
+        assert role != null;
+
+        return (T) super.lookup(role);
+    }
+
+    @SuppressWarnings("unchecked")
+    public <T> T lookupComponent(final Class<T> role, final String roleHint) throws ComponentLookupException {
+        assert role != null;
+        assert roleHint != null;
+
+        return (T) super.lookup(role, roleHint);
+    }
+
+    //
+    // TODO: lookupComponentList, lookupComponentMap, createChildContainer
+    //
+}

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

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

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

Added: geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/LookupFactorySupport.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/LookupFactorySupport.java?rev=658577&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/LookupFactorySupport.java (added)
+++ geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/LookupFactorySupport.java Wed May 21 00:48:22 2008
@@ -0,0 +1,81 @@
+/*
+ * 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.PlexusContainer;
+import org.codehaus.plexus.classworlds.realm.ClassRealm;
+import org.codehaus.plexus.component.factory.ComponentInstantiationException;
+import org.codehaus.plexus.component.factory.ComponentFactory;
+import org.codehaus.plexus.component.repository.ComponentDescriptor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Support for lookup factory implementations.
+ *
+ * @version $Rev$ $Date$
+ */
+public class LookupFactorySupport<T>
+    implements ComponentFactory
+{
+    protected Logger log = LoggerFactory.getLogger(getClass());
+
+    protected final ThreadLocal<T> holder = new ThreadLocal<T>();
+
+    public synchronized void set(final T obj) {
+        if (obj == null) {
+            throw new IllegalArgumentException("Instance can not be null");
+        }
+
+        Object prev = get();
+        if (prev == null) {
+            log.trace("Registered instance: {}", obj);
+        }
+        else {
+            log.trace("Replacing previous instance with: {}", obj);
+        }
+        
+        holder.set(obj);
+    }
+
+    public synchronized T get() {
+        return holder.get();
+    }
+
+    //
+    // ComponentFactory
+    //
+    
+    public String getId() {
+        return getClass().getSimpleName();
+    }
+
+    public Object newInstance(final ComponentDescriptor descriptor, final ClassRealm classRealm, final PlexusContainer container) throws ComponentInstantiationException {
+        Object obj = get();
+
+        if (obj == null) {
+            throw new IllegalStateException("Instance not registered");
+        }
+        
+        log.trace("Handing out: {}", obj);
+
+        return obj;
+    }
+}
\ No newline at end of file

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

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

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

Propchange: geronimo/gshell/trunk/gshell-support/gshell-prefs/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Modified: geronimo/gshell/trunk/gshell-support/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/pom.xml?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-support/pom.xml Wed May 21 00:48:22 2008
@@ -41,9 +41,11 @@
     
     <modules>
         <module>gshell-ansi</module>
+        <module>gshell-artifact</module>
         <module>gshell-clp</module>
         <module>gshell-common</module>
         <module>gshell-i18n</module>
+        <module>gshell-io</module>
         <module>gshell-prefs</module>
         <module>gshell-plexus</module>
     </modules>

Propchange: geronimo/gshell/trunk/gshell-whisper/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed May 21 00:48:22 2008
@@ -0,0 +1 @@
+target-eclipse

Modified: geronimo/gshell/trunk/javacc-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/javacc-maven-plugin/pom.xml?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/javacc-maven-plugin/pom.xml (original)
+++ geronimo/gshell/trunk/javacc-maven-plugin/pom.xml Wed May 21 00:48:22 2008
@@ -36,6 +36,34 @@
         Provides integration with JavaCC.
     </description>
 
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.maven</groupId>
+                <artifactId>maven-project</artifactId>
+                <version>2.0.5</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.maven</groupId>
+                <artifactId>maven-artifact</artifactId>
+                <version>2.0.5</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.maven</groupId>
+                <artifactId>maven-plugin-api</artifactId>
+                <version>2.0.5</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.maven</groupId>
+                <artifactId>maven-model</artifactId>
+                <version>2.0.5</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+    
     <dependencies>
         <dependency>
             <groupId>org.codehaus.groovy.maven</groupId>

Modified: geronimo/gshell/trunk/javacc-maven-plugin/src/main/groovy/org/apache/geronimo/gshell/maven/javacc/JavaccMojoSupport.groovy
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/javacc-maven-plugin/src/main/groovy/org/apache/geronimo/gshell/maven/javacc/JavaccMojoSupport.groovy?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/javacc-maven-plugin/src/main/groovy/org/apache/geronimo/gshell/maven/javacc/JavaccMojoSupport.groovy (original)
+++ geronimo/gshell/trunk/javacc-maven-plugin/src/main/groovy/org/apache/geronimo/gshell/maven/javacc/JavaccMojoSupport.groovy Wed May 21 00:48:22 2008
@@ -70,6 +70,10 @@
         def builder = new JavaDocBuilder()
         builder.addSourceTree(sourceDir)
         
+        //
+        // FIXME: Install generated sources into the proper package
+        //
+        
         // Install generated classes which were not overridden in some source root
         ant.mkdir(dir: outputDirectory)
         ant.copy(todir: outputDirectory) {

Modified: geronimo/gshell/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/pom.xml?rev=658577&r1=658576&r2=658577&view=diff
==============================================================================
--- geronimo/gshell/trunk/pom.xml (original)
+++ geronimo/gshell/trunk/pom.xml Wed May 21 00:48:22 2008
@@ -97,21 +97,36 @@
                 <groupId>org.codehaus.plexus</groupId>
                 <artifactId>plexus-component-annotations</artifactId>
                 <version>1.0-alpha-13</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>junit</groupId>
+                        <artifactId>junit</artifactId>
+                    </exclusion>
+                </exclusions>
             </dependency>
 
             <dependency>
                 <groupId>org.codehaus.plexus</groupId>
                 <artifactId>plexus-classworlds</artifactId>
                 <version>1.2-alpha-12</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>junit</groupId>
+                        <artifactId>junit</artifactId>
+                    </exclusion>
+                </exclusions>
             </dependency>
 
-            <!--
-            NOTE: 1.0-alpha-44 does not have sources published, which is a huge PITA, so use the previous for now.
-            -->
             <dependency>
                 <groupId>org.codehaus.plexus</groupId>
                 <artifactId>plexus-container-default</artifactId>
-                <version>1.0-alpha-43</version>
+                <version>1.0-alpha-45</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>junit</groupId>
+                        <artifactId>junit</artifactId>
+                    </exclusion>
+                </exclusions>
             </dependency>
 
             <dependency>
@@ -124,18 +139,46 @@
                 <groupId>org.apache.maven.artifact</groupId>
                 <artifactId>maven-artifact</artifactId>
                 <version>3.0-SNAPSHOT</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.maven</groupId>
+                <artifactId>maven-project</artifactId>
+                <version>2.1-SNAPSHOT</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.maven.wagon</groupId>
+                <artifactId>wagon-http-lightweight</artifactId>
+                <version>1.0-beta-2</version>
                 <exclusions>
                     <exclusion>
-                        <groupId>net.sf.retrotranslator</groupId>
-                        <artifactId>retrotranslator-runtime</artifactId>
+                        <groupId>jtidy</groupId>
+                        <artifactId>jtidy</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>xml-apis</groupId>
+                        <artifactId>xml-apis</artifactId>
                     </exclusion>
                 </exclusions>
             </dependency>
-
+            
+            <dependency>
+                <groupId>org.apache.maven.wagon</groupId>
+                <artifactId>wagon-provider-api</artifactId>
+                <version>1.0-beta-2</version>
+            </dependency>
+            
             <dependency>
                 <groupId>commons-vfs</groupId>
                 <artifactId>commons-vfs</artifactId>
                 <version>1.0</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>commons-logging</groupId>
+                        <artifactId>commons-logging</artifactId>
+                    </exclusion>
+                </exclusions>
             </dependency>
             
             <dependency>
@@ -144,6 +187,10 @@
                 <version>1.1</version>
                 <exclusions>
                     <exclusion>
+                        <groupId>junit</groupId>
+                        <artifactId>junit</artifactId>
+                    </exclusion>
+                    <exclusion>
                         <groupId>commons-logging</groupId>
                         <artifactId>commons-logging</artifactId>
                     </exclusion>
@@ -154,6 +201,12 @@
                 <groupId>jline</groupId>
                 <artifactId>jline</artifactId>
                 <version>0.9.94</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>junit</groupId>
+                        <artifactId>junit</artifactId>
+                    </exclusion>
+                </exclusions>
             </dependency>
 
             <dependency>
@@ -203,7 +256,13 @@
                 <artifactId>gmaven-runtime-default</artifactId>
                 <version>1.0-rc-1</version>
             </dependency>
-            
+
+            <!--
+            FIXME: Have to move this to each plugin, cause these conflict with the 
+                   bits we need from Maven 2.1
+                   
+                   Need to create a gshell-buildsupport module to hold this Maven specific crapksi
+                   
             <dependency>
                 <groupId>org.apache.maven</groupId>
                 <artifactId>maven-project</artifactId>
@@ -227,13 +286,20 @@
                 <artifactId>maven-model</artifactId>
                 <version>2.0.5</version>
             </dependency>
-            
+            -->
+
             <dependency>
                 <groupId>org.apache.maven.shared</groupId>
                 <artifactId>file-management</artifactId>
                 <version>1.1</version>
             </dependency>
             
+            <dependency>
+                <groupId>org.beanshell</groupId>
+                <artifactId>bsh</artifactId>
+                <version>2.0b4</version>
+            </dependency>
+            
             <!-- INTERNAL -->
             
             <dependency>
@@ -273,6 +339,18 @@
             </dependency>
 
             <dependency>
+                <groupId>org.apache.geronimo.gshell.support</groupId>
+                <artifactId>gshell-artifact</artifactId>
+                <version>1.0-alpha-2-SNAPSHOT</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.geronimo.gshell.support</groupId>
+                <artifactId>gshell-io</artifactId>
+                <version>1.0-alpha-2-SNAPSHOT</version>
+            </dependency>
+
+            <dependency>
                 <groupId>org.apache.geronimo.gshell</groupId>
                 <artifactId>gshell-command-api</artifactId>
                 <version>1.0-alpha-2-SNAPSHOT</version>
@@ -352,6 +430,12 @@
 
             <dependency>
                 <groupId>org.apache.geronimo.gshell.commands</groupId>
+                <artifactId>gshell-repository</artifactId>
+                <version>1.0-alpha-2-SNAPSHOT</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.geronimo.gshell.commands</groupId>
                 <artifactId>gshell-bsf</artifactId>
                 <version>1.0-alpha-2-SNAPSHOT</version>
             </dependency>
@@ -384,6 +468,23 @@
         </dependency>
     </dependencies>
 
+    <modules>
+        <module>gshell-diet</module>
+        <module>gshell-support</module>
+        <module>gshell-bootstrap</module>
+        <module>gshell-model</module>
+        <module>gshell-command-api</module>
+        <module>javacc-maven-plugin</module>
+        <module>gshell-parser</module>
+        <module>gshell-core</module>
+        <module>gshell-maven-plugin</module>
+        <module>gshell-cli</module>
+        <module>gshell-whisper</module>
+        <module>gshell-commands</module>
+        <module>gshell-remote</module>
+        <module>gshell-assembly</module>
+    </modules>
+    
     <build>
         <pluginManagement>
             <plugins>
@@ -529,6 +630,20 @@
                     <artifactId>shitty-maven-plugin</artifactId>
                     <version>1.0-alpha-2</version>
                 </plugin>
+                
+                <!-- INTERNAL -->
+                
+                <plugin>
+                    <groupId>org.apache.geronimo.gshell</groupId>
+                    <artifactId>gshell-maven-plugin</artifactId>
+                    <version>1.0-alpha-2-SNAPSHOT</version>
+                </plugin>
+                
+                <plugin>
+                    <groupId>org.apache.geronimo.gshell</groupId>
+                    <artifactId>javacc-maven-plugin</artifactId>
+                    <version>1.0-alpha-2-SNAPSHOT</version>
+                </plugin>
             </plugins>
         </pluginManagement>
 
@@ -549,9 +664,9 @@
                                     <version>[1.5,1.6)</version>
                                 </requireJavaVersion>
                                 
-                                <!-- Allow any Maven >= 2.0.5 -->
+                                <!-- Allow any Maven >= 2.0.9 -->
                                 <requireMavenVersion>
-                                    <version>[2.0.5,)</version>
+                                    <version>[2.0.9,)</version>
                                 </requireMavenVersion>
                             </rules>
                         </configuration>
@@ -617,24 +732,6 @@
         </plugins>
     </build>
 
-    <modules>
-        <module>gshell-diet</module>
-        <module>gshell-support</module>
-        <module>gshell-bootstrap</module>
-        <module>gshell-model</module>
-        <module>gshell-command-api</module>
-        <module>javacc-maven-plugin</module>
-        <module>gshell-parser</module>
-        <module>gshell-core</module>
-        <module>gshell-maven-plugin</module>
-        <module>gshell-cli</module>
-        <module>gshell-whisper</module>
-        <module>gshell-commands</module>
-        <module>gshell-remote</module>
-        <module>gshell-embeddable</module>
-        <module>gshell-assembly</module>
-    </modules>
-
     <distributionManagement>
         <site>
             <id>geronimo-website</id>
@@ -721,10 +818,8 @@
     <profiles>
         <profile>
             <id>idea</id>
-
             <build>
                 <defaultGoal>validate</defaultGoal>
-
                 <plugins>
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
@@ -750,14 +845,12 @@
 
         <profile>
             <id>super-helpful-integration-tests</id>
-
             <activation>
                 <property>
                     <name>shit</name>
                     <value>true</value>
                 </property>
             </activation>
-
             <build>
                 <plugins>
                     <plugin>
@@ -779,13 +872,11 @@
 
         <profile>
             <id>stage-distribution</id>
-
             <activation>
                 <property>
                     <name>stage.distributionUrl</name>
                 </property>
             </activation>
-
             <distributionManagement>
                 <repository>
                     <id>stage-repository</id>