geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r680933 - in /geronimo/gshell/trunk/gshell-wisdom/src/test: java/org/apache/geronimo/gshell/wisdom/ resources/org/apache/geronimo/gshell/wisdom/
Date Wed, 30 Jul 2008 08:06:18 GMT
Author: jdillon
Date: Wed Jul 30 01:06:17 2008
New Revision: 680933

URL: http://svn.apache.org/viewvc?rev=680933&view=rev
Log:
Got the basics working

Added:
    geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MyPlexusComponent.java
  (with props)
    geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MySpringComponent.java
  (with props)
Removed:
    geronimo/gshell/trunk/gshell-wisdom/src/test/resources/org/apache/geronimo/gshell/wisdom/PlexusSpringTest.xml
Modified:
    geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/PlexusSpringTest.java
    geronimo/gshell/trunk/gshell-wisdom/src/test/resources/org/apache/geronimo/gshell/wisdom/PlexusSpringTest-context.xml

Added: geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MyPlexusComponent.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MyPlexusComponent.java?rev=680933&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MyPlexusComponent.java
(added)
+++ geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MyPlexusComponent.java
Wed Jul 30 01:06:17 2008
@@ -0,0 +1,33 @@
+/*
+ * 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.wisdom;
+
+import org.codehaus.plexus.component.annotations.Component;
+
+/**
+ * ???
+ *
+ * @version $Rev$ $Date$
+ */
+@Component(role=MyPlexusComponent.class)
+public class MyPlexusComponent
+{
+    // ???
+}
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MyPlexusComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MyPlexusComponent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MySpringComponent.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MySpringComponent.java?rev=680933&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MySpringComponent.java
(added)
+++ geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MySpringComponent.java
Wed Jul 30 01:06:17 2008
@@ -0,0 +1,38 @@
+/*
+ * 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.wisdom;
+
+/**
+ * ???
+ *
+ * @version $Rev$ $Date$
+ */
+public class MySpringComponent
+{
+    private MyPlexusComponent plexusComponent;
+
+    public void setPlexusComponent(final MyPlexusComponent plexusComponent) {
+        this.plexusComponent = plexusComponent;
+    }
+
+    public MyPlexusComponent getPlexusComponent() {
+        return plexusComponent;
+    }
+}
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MySpringComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/MySpringComponent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/PlexusSpringTest.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/PlexusSpringTest.java?rev=680933&r1=680932&r2=680933&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/PlexusSpringTest.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/src/test/java/org/apache/geronimo/gshell/wisdom/PlexusSpringTest.java
Wed Jul 30 01:06:17 2008
@@ -20,6 +20,7 @@
 package org.apache.geronimo.gshell.wisdom;
 
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
+import org.codehaus.plexus.spring.PlexusToSpringUtils;
 
 /**
  * ???
@@ -29,7 +30,19 @@
 public class PlexusSpringTest
     extends PlexusInSpringTestCase
 {
-    public void testSimple() throws Exception {
-        System.out.println("Testing");
+    public void testIdConvert() throws Exception {
+        System.out.println("ID: " + PlexusToSpringUtils.buildSpringId(MyPlexusComponent.class,
"foo"));
+    }
+
+    public void testListBeans() throws Exception {
+        for (String name : applicationContext.getBeanDefinitionNames()) {
+            System.out.println(name);
+        }
+    }
+
+    public void testSpringBean() throws Exception {
+        MySpringComponent springComponent = (MySpringComponent) applicationContext.getBean("springComponent");
+        assertNotNull(springComponent);
+        assertNotNull(springComponent.getPlexusComponent());
     }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-wisdom/src/test/resources/org/apache/geronimo/gshell/wisdom/PlexusSpringTest-context.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/src/test/resources/org/apache/geronimo/gshell/wisdom/PlexusSpringTest-context.xml?rev=680933&r1=680932&r2=680933&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/src/test/resources/org/apache/geronimo/gshell/wisdom/PlexusSpringTest-context.xml
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/src/test/resources/org/apache/geronimo/gshell/wisdom/PlexusSpringTest-context.xml
Wed Jul 30 01:06:17 2008
@@ -26,5 +26,9 @@
        xsi:schemaLocation="
             http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
             http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
-    
+
+    <bean id="springComponent" class="org.apache.geronimo.gshell.wisdom.MySpringComponent">
+        <property name="plexusComponent" ref="myPlexusComponent"/>
+    </bean>
+
 </beans>
\ No newline at end of file



Mime
View raw message