geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcco...@apache.org
Subject svn commit: r661911 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src: main/java/org/apache/geronimo/st/core/internal/ test/java/org/apache/geronimo/st/core/internal/ test/resources/dependencyhelper/
Date Fri, 30 May 2008 23:12:18 GMT
Author: mcconne
Date: Fri May 30 16:12:18 2008
New Revision: 661911

URL: http://svn.apache.org/viewvc?rev=661911&view=rev
Log:
GERONIMODEVTOOLS-347 Properly handle circular dependency on self

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-12.xml
  (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-13.xml
  (with props)
Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java?rev=661911&r1=661910&r2=661911&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java
Fri May 30 16:12:18 2008
@@ -311,7 +311,8 @@
         }
         for (Iterator ii = parents.iterator(); ii.hasNext();) {
             Artifact artifact = (Artifact)ii.next();
-            if (dm.getParents(artifact).size() > 0 && !artifact.equals(terminatingArtifact))
{
+            if (dm.getParents(artifact).size() > 0 && !artifact.equals(terminatingArtifact)
&&
+               !dm.getParents(artifact).contains(artifact) && !dm.getChildren(artifact).contains(artifact))
{
                 // Keep processing parents (as long as no circular dependencies)
                 processParents(dm.getParents(artifact), terminatingArtifact);
                 // Move self 
@@ -534,7 +535,8 @@
         }
         for (Iterator ii = parents.iterator(); ii.hasNext();) {
             Artifact artifact = (Artifact)ii.next();
-            if (dm.getParents(artifact).size() > 0 && !artifact.equals(terminatingArtifact))
{
+            if (dm.getParents(artifact).size() > 0 && !artifact.equals(terminatingArtifact)
&&
+               !dm.getParents(artifact).contains(artifact) && !dm.getChildren(artifact).contains(artifact))
{
                 // Keep processing parents (as long as no circular dependencies)
                 processJaxbParents(dm.getParents(artifact), terminatingArtifact);
                 // Move self 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java?rev=661911&r1=661910&r2=661911&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java
Fri May 30 16:12:18 2008
@@ -55,6 +55,8 @@
     private Object jaxbElement9;
     private Object jaxbElement10;
     private Object jaxbElement11;
+    private Object jaxbElement12;
+    private Object jaxbElement13;
     private List<JAXBElement> jaxbElements = new ArrayList<JAXBElement>();
     private List<JAXBElement> jaxbReordered = new ArrayList<JAXBElement>();
 
@@ -111,6 +113,8 @@
         InputStream inputStream9 = this.getClass().getClassLoader().getResourceAsStream("dependencyhelper/openejb-jar-example-9.xml");
         InputStream inputStream10 = this.getClass().getClassLoader().getResourceAsStream("dependencyhelper/openejb-jar-example-10.xml");
         InputStream inputStream11 = this.getClass().getClassLoader().getResourceAsStream("dependencyhelper/geronimo-ra-example-11.xml");
+        InputStream inputStream12 = this.getClass().getClassLoader().getResourceAsStream("dependencyhelper/geronimo-web-example-12.xml");
+        InputStream inputStream13 = this.getClass().getClassLoader().getResourceAsStream("dependencyhelper/geronimo-web-example-13.xml");
         String file1 = readContent(inputStream1);
         String file2 = readContent(inputStream2);
         String file3 = readContent(inputStream3);
@@ -122,6 +126,8 @@
         String file9 = readContent(inputStream9);
         String file10 = readContent(inputStream10);
         String file11 = readContent(inputStream11);
+        String file12 = readContent(inputStream12);
+        String file13 = readContent(inputStream13);
 
         // 
         // Unmarshall all files
@@ -137,6 +143,8 @@
         jaxbElement9 = unmarshaller.unmarshal(new InputSource(new ByteArrayInputStream(file9.getBytes())));
         jaxbElement10 = unmarshaller.unmarshal(new InputSource(new ByteArrayInputStream(file10.getBytes())));
         jaxbElement11 = unmarshaller.unmarshal(new InputSource(new ByteArrayInputStream(file11.getBytes())));
+        jaxbElement12 = unmarshaller.unmarshal(new InputSource(new ByteArrayInputStream(file12.getBytes())));
+        jaxbElement13 = unmarshaller.unmarshal(new InputSource(new ByteArrayInputStream(file13.getBytes())));
 
         jaxbElements.clear();
         jaxbReordered.clear();
@@ -153,6 +161,7 @@
     public void testSingleParent() {
 
         //---------+--------------------------------+-----------------------------------------------
+        //  JAXB   |                                | 
         // ELEMENT | ARTIFACT                       | PARENTS
         //---------+--------------------------------+-----------------------------------------------
         //    3    | default/geronimo-web-1/1.0/car | 
@@ -180,6 +189,7 @@
         dh.close();
 
         //---------+--------------------------------+-----------------------------------------------
+        //  JAXB   |                                | 
         // ELEMENT | ARTIFACT                       | PARENTS
         //---------+--------------------------------+-----------------------------------------------
         //    5    | default/geronimo-web-3/1.0/car | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
@@ -210,6 +220,7 @@
     public void testMultipleParents() throws Exception {
 
         //---------+--------------------------------+-----------------------------------------------
+        //  JAXB   |                                | 
         // ELEMENT | ARTIFACT                       | PARENTS
         //---------+--------------------------------+-----------------------------------------------
         //    3    | default/geronimo-web-1/1.0/car |
@@ -268,6 +279,7 @@
     public void testMultipleChildrenAndParents1() throws Exception {
 
         //---------+--------------------------------+-----------------------------------------------
+        //  JAXB   |                                | 
         // ELEMENT | ARTIFACT                       | PARENTS
         //---------+--------------------------------+-----------------------------------------------
         //    1    | default/geronimo-app-1/2.2/ear | org.apache.geronimo.configs/system-database//car
@@ -354,6 +366,7 @@
     public void testMultipleChildrenAndParents2() throws Exception {
 
         //---------+--------------------------------+-----------------------------------------------
+        //  JAXB   |                                | 
         // ELEMENT | ARTIFACT                       | PARENTS
         //---------+--------------------------------+-----------------------------------------------
         //    1    | default/geronimo-app-1/2.2/ear | org.apache.geronimo.configs/system-database//car
@@ -448,6 +461,7 @@
     public void testCircularDependency() throws Exception {
 
         //---------+--------------------------------+-----------------------------------------------
+        //  JAXB   |                                | 
         // ELEMENT | ARTIFACT                       | PARENTS
         //---------+--------------------------------+-----------------------------------------------
         //    1    | default/geronimo-app-1/2.2/ear | org.apache.geronimo.configs/system-database//car
@@ -481,7 +495,7 @@
         //         |                                | default/geronimo-ra-2/1.0/car 
         //         |                                | default/geronimo-web-2/1.0/car
         //---------+--------------------------------+-----------------------------------------------
-        //   11    | default/geronimo-ra-2/1.0/car  | org.apache.derby/ erby//jar 
+        //   11    | default/geronimo-ra-2/1.0/car  | org.apache.derby/derby//jar 
         //         |                                | default/openejb-jar-2/2.0/ear
         //---------+--------------------------------+-----------------------------------------------
         jaxbElements.add( (JAXBElement)jaxbElement1 );                  // Element 0
@@ -570,6 +584,234 @@
     }
 
 
+    public void testCircularDependencyOnSelf() throws Exception {
+
+        //---------+--------------------------------+-----------------------------------------------
+        //  JAXB   |                                | 
+        // ELEMENT | ARTIFACT                       | PARENTS
+        //---------+--------------------------------+-----------------------------------------------
+        //   12    | default/geronimo-web-7/1.0/car | default/geronimo-web-7/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        jaxbElements.add( (JAXBElement)jaxbElement12 );                 // Element 0
+        jaxbReordered = dh.reorderJAXBElements( jaxbElements );
+        assertEquals( jaxbReordered.size(),jaxbElements.size() );
+        assertEquals( jaxbReordered.get(0),jaxbElements.get(0) );       // jaxbElement12
+        jaxbElements.clear();
+        jaxbReordered.clear();
+        dh.close();
+
+        //---------+--------------------------------+-----------------------------------------------
+        //  JAXB   |                                | 
+        // ELEMENT | ARTIFACT                       | PARENTS
+        //---------+--------------------------------+-----------------------------------------------
+        //    3    | default/geronimo-web-1/1.0/car |
+        //---------+--------------------------------+-----------------------------------------------
+        //   12    | default/geronimo-web-7/1.0/car | default/geronimo-web-7/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        jaxbElements.add( (JAXBElement)jaxbElement3 );                  // Element 0
+        jaxbElements.add( (JAXBElement)jaxbElement12 );                 // Element 1
+        jaxbReordered = dh.reorderJAXBElements( jaxbElements );
+        assertEquals( jaxbReordered.size(),jaxbElements.size() );
+        assertEquals( jaxbReordered.get(0),jaxbElements.get(0) );       // jaxbElement3
+        assertEquals( jaxbReordered.get(1),jaxbElements.get(1) );       // jaxbElement12
+        jaxbElements.clear();
+        jaxbReordered.clear();
+        dh.close();
+
+        //---------+--------------------------------+-----------------------------------------------
+        //  JAXB   |                                | 
+        // ELEMENT | ARTIFACT                       | PARENTS
+        //---------+--------------------------------+-----------------------------------------------
+        //    1    | default/geronimo-app-1/2.2/ear | org.apache.geronimo.configs/system-database//car
+        //         |                                | default/geronimo-web-3/1.0/car
+        //         |                                | default/geronimo-web-2/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    2    | null                           | org.apache.derby/derby//jar
+        //---------+--------------------------------+-----------------------------------------------
+        //    3    | default/geronimo-web-1/1.0/car |
+        //---------+--------------------------------+-----------------------------------------------
+        //    4    | default/geronimo-web-2/1.0/car | default/geronimo-web-1/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    5    | default/geronimo-web-3/1.0/car | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    6    | default/geronimo-web-4/1.0/car | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //         |                                | default/geronimo-web-3/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    7    | default/geronimo-web-5/1.0/car | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    8    | default/geronimo-web-6/1.0/car | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //         |                                | default/geronimo-web-5/1.0/car
+        //         |                                | default/geronimo-web-4/1.0/car
+        //         |                                | default/geronimo-web-2/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    9    | default/openejb-jar-1/2.0/ear  | org.apache.geronimo.testsuite/agent-ds/2.2-SNAPSHOT/car
+        //         |                                | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //---------+--------------------------------+-----------------------------------------------
+        //   10    | default/openejb-jar-2/2.0/ear  | org.apache.geronimo.testsuite/agent-ds/2.2-SNAPSHOT/car
+        //         |                                | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //         |                                | default/geronimo-web-5/1.0/car
+        //         |                                | default/geronimo-ra-2/1.0/car 
+        //         |                                | default/geronimo-web-2/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        //   11    | default/geronimo-ra-2/1.0/car  | org.apache.derby/derby//jar 
+        //         |                                | default/openejb-jar-2/2.0/ear
+        //---------+--------------------------------+-----------------------------------------------
+        //   12    | default/geronimo-web-7/1.0/car | default/geronimo-web-7/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        jaxbElements.add( (JAXBElement)jaxbElement1 );                  // Element 0
+        jaxbElements.add( (JAXBElement)jaxbElement2 );                  // Element 1
+        jaxbElements.add( (JAXBElement)jaxbElement3 );                  // Element 2
+        jaxbElements.add( (JAXBElement)jaxbElement4 );                  // Element 3
+        jaxbElements.add( (JAXBElement)jaxbElement5 );                  // Element 4
+        jaxbElements.add( (JAXBElement)jaxbElement6 );                  // Element 5
+        jaxbElements.add( (JAXBElement)jaxbElement7 );                  // Element 6
+        jaxbElements.add( (JAXBElement)jaxbElement8 );                  // Element 7
+        jaxbElements.add( (JAXBElement)jaxbElement9 );                  // Element 8
+        jaxbElements.add( (JAXBElement)jaxbElement10 );                 // Element 9
+        jaxbElements.add( (JAXBElement)jaxbElement11 );                 // Element 10
+        jaxbElements.add( (JAXBElement)jaxbElement12 );                 // Element 11
+        jaxbReordered = dh.reorderJAXBElements( jaxbElements );
+        assertEquals( jaxbReordered.size(),jaxbElements.size() );
+        assertEquals( jaxbReordered.get(0),jaxbElements.get(0) );       // jaxbElement1
+        assertEquals( jaxbReordered.get(1),jaxbElements.get(1) );       // jaxbElement2
+        assertEquals( jaxbReordered.get(2),jaxbElements.get(2) );       // jaxbElement3
+        assertEquals( jaxbReordered.get(3),jaxbElements.get(3) );       // jaxbElement4
+        assertEquals( jaxbReordered.get(4),jaxbElements.get(4) );       // jaxbElement5
+        assertEquals( jaxbReordered.get(5),jaxbElements.get(5) );       // jaxbElement6
+        assertEquals( jaxbReordered.get(6),jaxbElements.get(6) );       // jaxbElement7
+        assertEquals( jaxbReordered.get(7),jaxbElements.get(7) );       // jaxbElement8
+        assertEquals( jaxbReordered.get(8),jaxbElements.get(8) );       // jaxbElement9
+        assertEquals( jaxbReordered.get(9),jaxbElements.get(9) );       // jaxbElement10
+        assertEquals( jaxbReordered.get(10),jaxbElements.get(10) );     // jaxbElement11
+        assertEquals( jaxbReordered.get(11),jaxbElements.get(11) );     // jaxbElement12
+        jaxbElements.clear();
+        jaxbReordered.clear();
+        dh.close();
+
+        //---------+--------------------------------+-----------------------------------------------
+        //  JAXB   |                                | 
+        // ELEMENT | ARTIFACT                       | PARENTS
+        //---------+--------------------------------+-----------------------------------------------
+        //    1    | default/geronimo-app-1/2.2/ear | org.apache.geronimo.configs/system-database//car
+        //         |                                | default/geronimo-web-3/1.0/car
+        //         |                                | default/geronimo-web-2/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    2    | null                           | org.apache.derby/derby//jar
+        //---------+--------------------------------+-----------------------------------------------
+        //    3    | default/geronimo-web-1/1.0/car |
+        //---------+--------------------------------+-----------------------------------------------
+        //    4    | default/geronimo-web-7/1.0/car | default/geronimo-web-7/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    5    | default/geronimo-web-3/1.0/car | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    6    | default/geronimo-web-4/1.0/car | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //         |                                | default/geronimo-web-3/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    7    | default/geronimo-web-5/1.0/car | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    8    | default/geronimo-web-6/1.0/car | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //         |                                | default/geronimo-web-5/1.0/car
+        //         |                                | default/geronimo-web-4/1.0/car
+        //         |                                | default/geronimo-web-2/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    9    | default/openejb-jar-1/2.0/ear  | org.apache.geronimo.testsuite/agent-ds/2.2-SNAPSHOT/car
+        //         |                                | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //---------+--------------------------------+-----------------------------------------------
+        //   10    | default/openejb-jar-2/2.0/ear  | org.apache.geronimo.testsuite/agent-ds/2.2-SNAPSHOT/car
+        //         |                                | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //         |                                | default/geronimo-web-5/1.0/car
+        //         |                                | default/geronimo-ra-2/1.0/car 
+        //         |                                | default/geronimo-web-2/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        //   11    | default/geronimo-ra-2/1.0/car  | org.apache.derby/derby//jar 
+        //         |                                | default/openejb-jar-2/2.0/ear
+        //---------+--------------------------------+-----------------------------------------------
+        jaxbElements.add( (JAXBElement)jaxbElement1 );                  // Element 0
+        jaxbElements.add( (JAXBElement)jaxbElement2 );                  // Element 1
+        jaxbElements.add( (JAXBElement)jaxbElement3 );                  // Element 2
+        jaxbElements.add( (JAXBElement)jaxbElement12 );                 // Element 3
+        jaxbElements.add( (JAXBElement)jaxbElement5 );                  // Element 4
+        jaxbElements.add( (JAXBElement)jaxbElement6 );                  // Element 5
+        jaxbElements.add( (JAXBElement)jaxbElement7 );                  // Element 6
+        jaxbElements.add( (JAXBElement)jaxbElement8 );                  // Element 7
+        jaxbElements.add( (JAXBElement)jaxbElement9 );                  // Element 8
+        jaxbElements.add( (JAXBElement)jaxbElement10 );                 // Element 9
+        jaxbElements.add( (JAXBElement)jaxbElement11 );                 // Element 10
+        jaxbReordered = dh.reorderJAXBElements( jaxbElements );
+        assertEquals( jaxbReordered.size(),jaxbElements.size() );
+        assertEquals( jaxbReordered.get(0),jaxbElements.get(0) );       // jaxbElement1
+        assertEquals( jaxbReordered.get(1),jaxbElements.get(1) );       // jaxbElement2
+        assertEquals( jaxbReordered.get(2),jaxbElements.get(2) );       // jaxbElement3
+        assertEquals( jaxbReordered.get(3),jaxbElements.get(3) );       // jaxbElement12
+        assertEquals( jaxbReordered.get(4),jaxbElements.get(4) );       // jaxbElement5
+        assertEquals( jaxbReordered.get(5),jaxbElements.get(5) );       // jaxbElement6
+        assertEquals( jaxbReordered.get(6),jaxbElements.get(6) );       // jaxbElement7
+        assertEquals( jaxbReordered.get(7),jaxbElements.get(7) );       // jaxbElement8
+        assertEquals( jaxbReordered.get(8),jaxbElements.get(8) );       // jaxbElement9
+        assertEquals( jaxbReordered.get(9),jaxbElements.get(9) );       // jaxbElement10
+        assertEquals( jaxbReordered.get(10),jaxbElements.get(10) );     // jaxbElement11
+        jaxbElements.clear();
+        jaxbReordered.clear();
+        dh.close();
+                        
+        //---------+--------------------------------+-----------------------------------------------
+        //  JAXB   |                                | 
+        // ELEMENT | ARTIFACT                       | PARENTS
+        //---------+--------------------------------+-----------------------------------------------
+        //    3    | default/geronimo-web-1/1.0/car |
+        //---------+--------------------------------+-----------------------------------------------
+        //   12    | default/geronimo-web-7/1.0/car | default/geronimo-web-7/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    5    | default/geronimo-web-3/1.0/car | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    6    | default/geronimo-web-4/1.0/car | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //         |                                | default/geronimo-web-3/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        //    7    | default/geronimo-web-5/1.0/car | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //---------+--------------------------------+-----------------------------------------------
+        //   13    | default/geronimo-web-8/1.0/car | org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car
+        //         |                                | default/geronimo-web-5/1.0/car
+        //         |                                | default/geronimo-web-4/1.0/car
+        //         |                                | default/geronimo-web-7/1.0/car
+        //---------+--------------------------------+-----------------------------------------------
+        jaxbElements.add( (JAXBElement)jaxbElement3 );                  // Element 0
+        jaxbElements.add( (JAXBElement)jaxbElement12 );                 // Element 1
+        jaxbElements.add( (JAXBElement)jaxbElement5 );                  // Element 2
+        jaxbElements.add( (JAXBElement)jaxbElement6 );                  // Element 3
+        jaxbElements.add( (JAXBElement)jaxbElement7 );                  // Element 4
+        jaxbElements.add( (JAXBElement)jaxbElement13 );                 // Element 5
+        jaxbReordered = dh.reorderJAXBElements( jaxbElements );
+        assertEquals( jaxbReordered.size(),jaxbElements.size() );       
+        assertEquals( jaxbReordered.get(0),jaxbElements.get(0) );       // jaxbElement3
+        assertEquals( jaxbReordered.get(1),jaxbElements.get(1) );       // jaxbElement12
+        assertEquals( jaxbReordered.get(2),jaxbElements.get(2) );       // jaxbElement5
+        assertEquals( jaxbReordered.get(3),jaxbElements.get(3) );       // jaxbElement6
+        assertEquals( jaxbReordered.get(4),jaxbElements.get(4) );       // jaxbElement7
+        assertEquals( jaxbReordered.get(5),jaxbElements.get(5) );       // jaxbElement13
+        jaxbElements.clear();
+        jaxbReordered.clear();
+        dh.close();
+
+        jaxbElements.add( (JAXBElement)jaxbElement13 );                 // Element 0  
+        jaxbElements.add( (JAXBElement)jaxbElement7 );                  // Element 1
+        jaxbElements.add( (JAXBElement)jaxbElement6 );                  // Element 2
+        jaxbElements.add( (JAXBElement)jaxbElement5 );                  // Element 3
+        jaxbElements.add( (JAXBElement)jaxbElement12 );                 // Element 4
+        jaxbElements.add( (JAXBElement)jaxbElement3 );                  // Element 5
+        jaxbReordered = dh.reorderJAXBElements( jaxbElements );
+        assertEquals( jaxbReordered.size(),jaxbElements.size() );
+        assertEquals( jaxbReordered.get(0),jaxbElements.get(4) );       // jaxbElement12
+        assertEquals( jaxbReordered.get(1),jaxbElements.get(1) );       // jaxbElement7
+        assertEquals( jaxbReordered.get(2),jaxbElements.get(3) );       // jaxbElement5
+        assertEquals( jaxbReordered.get(3),jaxbElements.get(2) );       // jaxbElement6
+        assertEquals( jaxbReordered.get(4),jaxbElements.get(0) );       // jaxbElement13
+        assertEquals( jaxbReordered.get(5),jaxbElements.get(5) );       // jaxbElement2
+        jaxbElements.clear();
+        jaxbReordered.clear();
+        dh.close();
+    }
+
+
     /*--------------------------------------------------------------------------------------------*\
     |                                                                                   
          |
     |  Private method(s)                                                                
          |

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-12.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-12.xml?rev=661911&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-12.xml
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-12.xml
Fri May 30 16:12:18 2008
@@ -0,0 +1,112 @@
+<?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.
+-->
+
+<!-- @version $Rev$ $Date$ -->
+
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
+
+    <sys:environment>
+        <sys:moduleId>
+            <sys:groupId>default</sys:groupId>
+            <sys:artifactId>geronimo-web-7</sys:artifactId>
+            <sys:version>1.0</sys:version>
+            <sys:type>car</sys:type>
+        </sys:moduleId>
+        <sys:dependencies>
+            <sys:dependency>
+                <sys:groupId>default</sys:groupId>
+                <sys:artifactId>geronimo-web-7</sys:artifactId>
+                <sys:version>1.0</sys:version>
+                <sys:type>car</sys:type>
+            </sys:dependency>
+        </sys:dependencies>
+    </sys:environment>
+
+    <context-root>/admin</context-root>
+
+    <web-container>
+        <gbean-link>TomcatAdminWebContainer</gbean-link>
+    </web-container>
+
+    <gbean name="TomcatAdminWebContainer" class="org.apache.geronimo.tomcat.TomcatContainer">
+        <attribute name="catalinaHome">var/catalina</attribute>
+        <reference name="EngineGBean">
+            <name>TomcatAdminEngine</name>
+        </reference>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+        <reference name="WebManager">
+            <name>TomcatWebManager</name>
+        </reference>
+    </gbean>
+
+    <gbean name="TomcatAdminWebConnector" class="org.apache.geronimo.tomcat.connector.Http11ConnectorGBean">
+        <attribute name="name">HTTP</attribute>
+        <attribute name="host">localhost</attribute>
+        <attribute name="port">8084</attribute>
+        <attribute name="maxHttpHeaderSize">8192</attribute>
+        <attribute name="maxThreads">150</attribute>
+        <attribute name="minSpareThreads">25</attribute>
+        <attribute name="maxSpareThreads">75</attribute>
+        <attribute name="enableLookups">false</attribute>
+        <attribute name="redirectPort">8443</attribute>
+        <attribute name="acceptCount">100</attribute>
+        <attribute name="connectionTimeout">20000</attribute>
+        <attribute name="disableUploadTimeout">true</attribute>
+        <reference name="TomcatContainer">
+            <name>TomcatAdminWebContainer</name>
+        </reference>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+        <dependency>
+            <name>default/zadmin/1.0/car</name>
+        </dependency>
+    </gbean>
+
+    <gbean name="TomcatAdminEngine" class="org.apache.geronimo.tomcat.EngineGBean">
+        <attribute name="className">org.apache.geronimo.tomcat.TomcatEngine</attribute>
+        <attribute name="initParams">
+          name=GeronimoAdmin
+        </attribute>
+        <reference name="DefaultHost">
+            <name>TomcatAdminHost</name>
+        </reference>
+        <references name="Hosts">
+            <pattern>
+                <name>TomcatAdminHost</name>
+            </pattern>
+        </references>
+        <reference name="RealmGBean">
+            <name>TomcatJAASRealm</name>
+        </reference>
+    </gbean>
+
+    <gbean name="TomcatAdminHost" class="org.apache.geronimo.tomcat.HostGBean">
+        <attribute name="className">org.apache.catalina.core.StandardHost</attribute>
+        <attribute name="initParams">
+          name=admin
+          appBase=
+          workDir=work
+        </attribute>
+    </gbean>
+
+
+
+</web-app>

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-12.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-12.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-12.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-13.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-13.xml?rev=661911&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-13.xml
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-13.xml
Fri May 30 16:12:18 2008
@@ -0,0 +1,130 @@
+<?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.
+-->
+
+<!-- @version $Rev$ $Date$ -->
+
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
+
+    <sys:environment>
+        <sys:moduleId>
+            <sys:groupId>default</sys:groupId>
+            <sys:artifactId>geronimo-web-8</sys:artifactId>
+            <sys:version>1.0</sys:version>
+            <sys:type>car</sys:type>
+        </sys:moduleId>
+        <sys:dependencies>
+            <sys:dependency>
+                <sys:groupId>org.apache.geronimo.configs</sys:groupId>
+                <sys:artifactId>tomcat6</sys:artifactId>
+                <sys:version>2.2-SNAPSHOT</sys:version>
+                <sys:type>car</sys:type>
+            </sys:dependency>
+            <sys:dependency>
+                <sys:groupId>default</sys:groupId>
+                <sys:artifactId>geronimo-web-5</sys:artifactId>
+                <sys:version>1.0</sys:version>
+                <sys:type>car</sys:type>
+            </sys:dependency>
+            <sys:dependency>
+                <sys:groupId>default</sys:groupId>
+                <sys:artifactId>geronimo-web-4</sys:artifactId>
+                <sys:version>1.0</sys:version>
+                <sys:type>car</sys:type>
+            </sys:dependency>
+            <sys:dependency>
+                <sys:groupId>default</sys:groupId>
+                <sys:artifactId>geronimo-web-7</sys:artifactId>
+                <sys:version>1.0</sys:version>
+                <sys:type>car</sys:type>
+            </sys:dependency>
+        </sys:dependencies>
+    </sys:environment>
+
+    <context-root>/admin</context-root>
+
+    <web-container>
+        <gbean-link>TomcatAdminWebContainer</gbean-link>
+    </web-container>
+
+    <gbean name="TomcatAdminWebContainer" class="org.apache.geronimo.tomcat.TomcatContainer">
+        <attribute name="catalinaHome">var/catalina</attribute>
+        <reference name="EngineGBean">
+            <name>TomcatAdminEngine</name>
+        </reference>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+        <reference name="WebManager">
+            <name>TomcatWebManager</name>
+        </reference>
+    </gbean>
+
+    <gbean name="TomcatAdminWebConnector" class="org.apache.geronimo.tomcat.connector.Http11ConnectorGBean">
+        <attribute name="name">HTTP</attribute>
+        <attribute name="host">localhost</attribute>
+        <attribute name="port">8084</attribute>
+        <attribute name="maxHttpHeaderSize">8192</attribute>
+        <attribute name="maxThreads">150</attribute>
+        <attribute name="minSpareThreads">25</attribute>
+        <attribute name="maxSpareThreads">75</attribute>
+        <attribute name="enableLookups">false</attribute>
+        <attribute name="redirectPort">8443</attribute>
+        <attribute name="acceptCount">100</attribute>
+        <attribute name="connectionTimeout">20000</attribute>
+        <attribute name="disableUploadTimeout">true</attribute>
+        <reference name="TomcatContainer">
+            <name>TomcatAdminWebContainer</name>
+        </reference>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+        <dependency>
+            <name>default/zadmin/1.0/car</name>
+        </dependency>
+    </gbean>
+
+    <gbean name="TomcatAdminEngine" class="org.apache.geronimo.tomcat.EngineGBean">
+        <attribute name="className">org.apache.geronimo.tomcat.TomcatEngine</attribute>
+        <attribute name="initParams">
+          name=GeronimoAdmin
+        </attribute>
+        <reference name="DefaultHost">
+            <name>TomcatAdminHost</name>
+        </reference>
+        <references name="Hosts">
+            <pattern>
+                <name>TomcatAdminHost</name>
+            </pattern>
+        </references>
+        <reference name="RealmGBean">
+            <name>TomcatJAASRealm</name>
+        </reference>
+    </gbean>
+
+    <gbean name="TomcatAdminHost" class="org.apache.geronimo.tomcat.HostGBean">
+        <attribute name="className">org.apache.catalina.core.StandardHost</attribute>
+        <attribute name="initParams">
+          name=admin
+          appBase=
+          workDir=work
+        </attribute>
+    </gbean>
+
+
+
+</web-app>

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-13.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-13.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/resources/dependencyhelper/geronimo-web-example-13.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message