felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r1054377 - in /felix/trunk/ipojo: ant/src/main/java/org/apache/felix/ipojo/task/ composite/ manipulator/src/main/java/org/apache/felix/ipojo/manipulator/ plugin/src/main/java/org/apache/felix/ipojo/plugin/ tests/core/configuration/src/main/...
Date Sun, 02 Jan 2011 10:05:09 GMT
Author: clement
Date: Sun Jan  2 10:05:08 2011
New Revision: 1054377

URL: http://svn.apache.org/viewvc?rev=1054377&view=rev
Log:
Fix FELIX-2755 Allow the manipulator and the different front end to use several metadata files

Modify some test projects to use this new feature.

Added:
    felix/trunk/ipojo/tests/core/configuration/src/main/ipojo/
    felix/trunk/ipojo/tests/core/configuration/src/main/ipojo/metadata.xml
      - copied, changed from r1052264, felix/trunk/ipojo/tests/core/configuration/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/core/configuration/src/main/ipojo/updated.xml
    felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/
    felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/README
    felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/basics.xml
      - copied, changed from r1052264, felix/trunk/ipojo/tests/core/service-providing/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/callbacks/
    felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/callbacks/callbacks.xml
    felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/concrete-abstract.xml
    felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/controller/
    felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/controller/service-controller.xml
    felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/inheritance/
    felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/inheritance/inheritance.xml
    felix/trunk/ipojo/tests/manipulator/manipulation/src/main/ipojo/
    felix/trunk/ipojo/tests/manipulator/manipulation/src/main/ipojo/metadata.xml
      - copied unchanged from r1052264, felix/trunk/ipojo/tests/manipulator/manipulation/src/main/resources/metadata.xml
Removed:
    felix/trunk/ipojo/tests/core/configuration/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/core/service-providing/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/manipulator/manipulation/src/main/resources/metadata.xml
Modified:
    felix/trunk/ipojo/ant/src/main/java/org/apache/felix/ipojo/task/IPojoTask.java
    felix/trunk/ipojo/composite/pom.xml
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
    felix/trunk/ipojo/plugin/src/main/java/org/apache/felix/ipojo/plugin/ManipulatorMojo.java

Modified: felix/trunk/ipojo/ant/src/main/java/org/apache/felix/ipojo/task/IPojoTask.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/ant/src/main/java/org/apache/felix/ipojo/task/IPojoTask.java?rev=1054377&r1=1054376&r2=1054377&view=diff
==============================================================================
--- felix/trunk/ipojo/ant/src/main/java/org/apache/felix/ipojo/task/IPojoTask.java (original)
+++ felix/trunk/ipojo/ant/src/main/java/org/apache/felix/ipojo/task/IPojoTask.java Sun Jan
 2 10:05:08 2011
@@ -1,4 +1,4 @@
-/* 
+/*
  * 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
@@ -169,7 +169,11 @@ public class IPojoTask extends Task {
             if (!m_metadata.exists()) {
                 throw new BuildException("No metadata file found - the file " + m_metadata.getAbsolutePath()
+ " does not exist");
             } else {
-                log("Metadata file : " + m_metadata.getAbsolutePath());
+            	if (m_metadata.isDirectory()) {
+            		log("Metadata directory : " + m_metadata.getAbsolutePath());
+            	} else {
+            		log("Metadata file : " + m_metadata.getAbsolutePath());
+            	}
             }
         }
 
@@ -243,10 +247,7 @@ public class IPojoTask extends Task {
         if (version.startsWith("1.4")) {
             System.setProperty("org.xml.sax.driver", "org.apache.xerces.parsers.SAXParser");
         }
-
     }
 
-
-
 }
 

Modified: felix/trunk/ipojo/composite/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/composite/pom.xml?rev=1054377&r1=1054376&r2=1054377&view=diff
==============================================================================
--- felix/trunk/ipojo/composite/pom.xml (original)
+++ felix/trunk/ipojo/composite/pom.xml Sun Jan  2 10:05:08 2011
@@ -117,7 +117,7 @@
               <goal>ipojo-bundle</goal>
             </goals>
             <configuration>
-              <metadata>metadata.xml</metadata>
+              <metadata>src/main/resources/metadata.xml</metadata>
               <ignoreAnnotations>true</ignoreAnnotations>
             </configuration>
           </execution>

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java?rev=1054377&r1=1054376&r2=1054377&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
(original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
Sun Jan  2 10:05:08 2011
@@ -1018,27 +1018,36 @@ public class Pojoization {
      * @param metadataFile the metadata file
      */
     private void parseXMLMetadata(File metadataFile) {
-        try {
-            InputStream stream = null;
-            URL url = metadataFile.toURI().toURL();
-            if (url == null) {
-                warn("Cannot find the metadata file : " + metadataFile.getAbsolutePath());
-                m_metadata = new ArrayList/*Element*/();
-            } else {
-                stream = url.openStream();
-                parseXMLMetadata(stream); // m_metadata is set by the method.
-            }
-        } catch (MalformedURLException e) {
-            error("Cannot open the metadata input stream from " + metadataFile.getAbsolutePath()
+ ": " + e.getMessage());
-            m_metadata = null;
-        } catch (IOException e) {
-            error("Cannot open the metadata input stream: " + metadataFile.getAbsolutePath()
+ ": " + e.getMessage());
-            m_metadata = null;
-        }
-
-        // m_metadata can be either an empty array or an Element
-        // array with component type description. It also can be null
-        // if no metadata file is given.
+    	if (metadataFile.isDirectory()) {
+    		// Traverse the directory and parse all files.
+    		File[] files = metadataFile.listFiles();
+    		for (int i = 0; i< files.length; i++) {
+    			parseXMLMetadata(files[i]);
+    		}
+    	} else if (metadataFile.getName().endsWith(".xml")) { // Detect XML by extension,
+    														  // others are ignored.
+	        try {
+	            InputStream stream = null;
+	            URL url = metadataFile.toURI().toURL();
+	            if (url == null) {
+	                warn("Cannot find the metadata file : " + metadataFile.getAbsolutePath());
+	                m_metadata = new ArrayList/*Element*/();
+	            } else {
+	                stream = url.openStream();
+	                parseXMLMetadata(stream); // m_metadata is set by the method.
+	            }
+	        } catch (MalformedURLException e) {
+	            error("Cannot open the metadata input stream from " + metadataFile.getAbsolutePath()
+ ": " + e.getMessage());
+	            m_metadata = null;
+	        } catch (IOException e) {
+	            error("Cannot open the metadata input stream: " + metadataFile.getAbsolutePath()
+ ": " + e.getMessage());
+	            m_metadata = null;
+	        }
+
+	        // m_metadata can be either an empty array or an Element
+	        // array with component type description. It also can be null
+	        // if no metadata file is given.
+    	}
     }
 
     /**

Modified: felix/trunk/ipojo/plugin/src/main/java/org/apache/felix/ipojo/plugin/ManipulatorMojo.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/plugin/src/main/java/org/apache/felix/ipojo/plugin/ManipulatorMojo.java?rev=1054377&r1=1054376&r2=1054377&view=diff
==============================================================================
--- felix/trunk/ipojo/plugin/src/main/java/org/apache/felix/ipojo/plugin/ManipulatorMojo.java
(original)
+++ felix/trunk/ipojo/plugin/src/main/java/org/apache/felix/ipojo/plugin/ManipulatorMojo.java
Sun Jan  2 10:05:08 2011
@@ -20,8 +20,6 @@ package org.apache.felix.ipojo.plugin;
 
 import java.io.ByteArrayInputStream;
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.InputStream;
 import java.util.Arrays;
 import java.util.List;
@@ -63,7 +61,7 @@ public class ManipulatorMojo extends Abs
 
     /**
      * Location of the metadata file or iPOJO metadata configuration.
-     * @parameter alias="metadata" default-value="metadata.xml"
+     * @parameter alias="metadata"
      */
     private String m_metadata;
 
@@ -134,39 +132,55 @@ public class ManipulatorMojo extends Abs
 
         // Get metadata
         // Check if metadata are contained in the configuration
-        InputStream is = null;
+        File metadata = null; // Metadata File or directory containing the metadata files.
+        InputStream is = null; //Use if contained in the configuration
 
         if (isXML()) {
             is = new ByteArrayInputStream(m_metadata.getBytes());
         } else {
+        	// If the metadata is not set,
+        	// first check if ./src/main/ipojo exists, if so look into it.
             if (m_metadata == null) {
-                // Try with metadata.xml
-                m_metadata = "metadata.xml";
-            }
-            // Look for the metadata file in the output directory
-            File meta = new File(m_outputDirectory + File.separator + m_metadata);
-            // If not found look inside the pom directory
-            if (! meta.exists()) {
-                meta = new File(m_project.getBasedir() + File.separator + m_metadata);
+            	File m = new File(m_project.getBasedir(), "src/main/ipojo");
+            	if (m.isDirectory()) {
+            		metadata = m;
+            		getLog().info("Metadata directory : " + metadata.getAbsolutePath());
+            	} else {
+            		// Else check target/classes/metadata.xml
+            		File meta = new File(m_outputDirectory + File.separator + "metadata.xml");
+            		if (! meta.exists()) {
+            			// If it still does not exist, try ./metadata.xml
+                        meta = new File(m_project.getBasedir() + File.separator + m_metadata);
+                    }
+
+            		if (meta.exists()) {
+            			metadata = meta;
+            			getLog().info("Metadata file : " + metadata.getAbsolutePath());
+            		}
+
+            		// No metadata.
+            	}
+            } else {
+            	// metadata path set.
+            	File m = new File(m_project.getBasedir(), m_metadata);
+            	if (! m.exists()) {
+            		throw new MojoExecutionException("The metadata file does not exist : " + m.getAbsolutePath());
+            	}
+            	metadata = m;
+            	if (m.isDirectory()) {
+            		getLog().info("Metadata directory : " + metadata.getAbsolutePath());
+            	} else {
+            		getLog().info("Metadata file : " + metadata.getAbsolutePath());
+            	}
             }
 
-            getLog().info("Metadata file : " + meta.getAbsolutePath());
-            if (!meta.exists()) {
-                // Verify if annotations are ignored
+            if (metadata == null) {
+            	// Verify if annotations are ignored
                 if (m_ignoreAnnotations) {
                     getLog().info("No metadata file found - ignoring annotations");
                     return;
                 } else {
                     getLog().info("No metadata file found - trying to use only annotations");
-                    meta = null;
-                }
-            }
-
-            if (meta != null) {
-                try {
-                    is = new FileInputStream(meta);
-                } catch (FileNotFoundException e) {
-                    throw new MojoExecutionException("the specified metadata file does not
exist: " + e.getMessage());
                 }
             }
         }
@@ -174,8 +188,8 @@ public class ManipulatorMojo extends Abs
         // Get input bundle, we use the already create artifact.
         File in = m_project.getArtifact().getFile();
         getLog().info("Input Bundle File : " + in.getAbsolutePath());
-        if (!in.exists()) {
-            throw new MojoExecutionException("the specified bundle file does not exist");
+        if (! in.exists()) {
+            throw new MojoExecutionException("The specified bundle file does not exist :
" + in.getAbsolutePath());
         }
 
         File out = new File(m_buildDirectory + File.separator + "_out.jar");
@@ -186,8 +200,12 @@ public class ManipulatorMojo extends Abs
 
         // Executes the pojoization.
         if (is == null) {
-            pojo.pojoization(in, out, (File) null); // Only annotations
-        } else  {
+        	if (metadata == null) { // No metadata.
+        		pojo.pojoization(in, out, (File) null); // Only annotations
+        	} else {
+        		pojo.pojoization(in, out, metadata); // Metadata set
+        	}
+        } else  { // In-Pom metadata.
             pojo.pojoization(in, out, is);
         }
 

Copied: felix/trunk/ipojo/tests/core/configuration/src/main/ipojo/metadata.xml (from r1052264,
felix/trunk/ipojo/tests/core/configuration/src/main/resources/metadata.xml)
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/configuration/src/main/ipojo/metadata.xml?p2=felix/trunk/ipojo/tests/core/configuration/src/main/ipojo/metadata.xml&p1=felix/trunk/ipojo/tests/core/configuration/src/main/resources/metadata.xml&r1=1052264&r2=1054377&rev=1054377&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/configuration/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/tests/core/configuration/src/main/ipojo/metadata.xml Sun Jan  2 10:05:08
2011
@@ -247,87 +247,4 @@
 			<property method="setClasses" name="cls"/>
 		</properties>
 	</component>
-
-	<!--  updated -->
-	 <component
-		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn"
-		name="CONFIG-FooProviderType-ConfUpdated" architecture="true">
-		<provides />
-		<properties updated="updated">
-			<property name="int" field="intProp" value="2" />
-			<property name="boolean" field="boolProp" value="false" />
-			<property name="string" field="strProp" value="foo" />
-			<property name="strAProp" field="strAProp"
-				value="{foo, bar}" />
-			<property name="intAProp" field="intAProp" value="{1,2, 3}" />
-		</properties>
-	</component>
-
-	<component
-		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn"
-		name="CONFIG-FooProviderType-ConfNoValueUpdated" architecture="true">
-		<provides />
-		<properties updated="updated">
-			<property name="int" field="intProp"/>
-			<property name="boolean" field="boolProp"/>
-			<property name="string" field="strProp"/>
-			<property name="strAProp" field="strAProp"/>
-			<property name="intAProp" field="intAProp"/>
-		</properties>
-	</component>
-
-	<component
-		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
-		name="CONFIG-FooProviderType-4Updated" architecture="true">
-		<provides>
-			<property name="foo" field="m_foo" />
-			<property name="bar" field="m_bar" />
-			<property name="baz" type="java.lang.String" />
-		</provides>
-		<properties propagation="true" pid="FooProvider-3" updated="updated">
-			<property name="foo" field="m_foo" />
-			<property name="bar" field="m_bar" />
-		</properties>
-	</component>
-	<component
-		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType2"
-		name="CONFIG-FooProviderType-4Updated2" architecture="true">
-		<provides>
-			<property name="foo" field="m_foo" />
-			<property name="bar" field="m_bar" />
-			<property name="baz" type="java.lang.String" />
-		</provides>
-		<properties propagation="true" pid="FooProvider-3" updated="updated">
-			<property name="foo" field="m_foo" />
-			<property name="bar" field="m_bar" />
-		</properties>
-	</component>
-
-	<component
-		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
-		name="CONFIG-FooProviderType-3Updated" architecture="true">
-		<provides>
-			<property name="foo" field="m_foo" />
-			<property name="bar" field="m_bar" />
-			<property name="baz" type="java.lang.String" />
-		</provides>
-		<properties propagation="true" updated="updated">
-			<property name="foo" field="m_foo" />
-			<property name="bar" field="m_bar" />
-		</properties>
-	</component>
-	<component
-		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType2"
-		name="CONFIG-FooProviderType-3Updated2" architecture="true">
-		<provides>
-			<property name="foo" field="m_foo" />
-			<property name="bar" field="m_bar" />
-			<property name="baz" type="java.lang.String" />
-		</provides>
-		<properties propagation="true" updated="updated">
-			<property name="foo" field="m_foo" />
-			<property name="bar" field="m_bar" />
-		</properties>
-	</component>
-
 </ipojo>

Added: felix/trunk/ipojo/tests/core/configuration/src/main/ipojo/updated.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/configuration/src/main/ipojo/updated.xml?rev=1054377&view=auto
==============================================================================
--- felix/trunk/ipojo/tests/core/configuration/src/main/ipojo/updated.xml (added)
+++ felix/trunk/ipojo/tests/core/configuration/src/main/ipojo/updated.xml Sun Jan  2 10:05:08
2011
@@ -0,0 +1,86 @@
+<ipojo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="org.apache.felix.ipojo http://people.apache.org/~clement/ipojo/SCHEMA-DEV/core.xsd"
+	xmlns="org.apache.felix.ipojo">
+	<!--  updated -->
+	 <component
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn"
+		name="CONFIG-FooProviderType-ConfUpdated" architecture="true">
+		<provides />
+		<properties updated="updated">
+			<property name="int" field="intProp" value="2" />
+			<property name="boolean" field="boolProp" value="false" />
+			<property name="string" field="strProp" value="foo" />
+			<property name="strAProp" field="strAProp"
+				value="{foo, bar}" />
+			<property name="intAProp" field="intAProp" value="{1,2, 3}" />
+		</properties>
+	</component>
+
+	<component
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn"
+		name="CONFIG-FooProviderType-ConfNoValueUpdated" architecture="true">
+		<provides />
+		<properties updated="updated">
+			<property name="int" field="intProp"/>
+			<property name="boolean" field="boolProp"/>
+			<property name="string" field="strProp"/>
+			<property name="strAProp" field="strAProp"/>
+			<property name="intAProp" field="intAProp"/>
+		</properties>
+	</component>
+
+	<component
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
+		name="CONFIG-FooProviderType-4Updated" architecture="true">
+		<provides>
+			<property name="foo" field="m_foo" />
+			<property name="bar" field="m_bar" />
+			<property name="baz" type="java.lang.String" />
+		</provides>
+		<properties propagation="true" pid="FooProvider-3" updated="updated">
+			<property name="foo" field="m_foo" />
+			<property name="bar" field="m_bar" />
+		</properties>
+	</component>
+	<component
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType2"
+		name="CONFIG-FooProviderType-4Updated2" architecture="true">
+		<provides>
+			<property name="foo" field="m_foo" />
+			<property name="bar" field="m_bar" />
+			<property name="baz" type="java.lang.String" />
+		</provides>
+		<properties propagation="true" pid="FooProvider-3" updated="updated">
+			<property name="foo" field="m_foo" />
+			<property name="bar" field="m_bar" />
+		</properties>
+	</component>
+
+	<component
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
+		name="CONFIG-FooProviderType-3Updated" architecture="true">
+		<provides>
+			<property name="foo" field="m_foo" />
+			<property name="bar" field="m_bar" />
+			<property name="baz" type="java.lang.String" />
+		</provides>
+		<properties propagation="true" updated="updated">
+			<property name="foo" field="m_foo" />
+			<property name="bar" field="m_bar" />
+		</properties>
+	</component>
+	<component
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType2"
+		name="CONFIG-FooProviderType-3Updated2" architecture="true">
+		<provides>
+			<property name="foo" field="m_foo" />
+			<property name="bar" field="m_bar" />
+			<property name="baz" type="java.lang.String" />
+		</provides>
+		<properties propagation="true" updated="updated">
+			<property name="foo" field="m_foo" />
+			<property name="bar" field="m_bar" />
+		</properties>
+	</component>
+
+</ipojo>

Added: felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/README
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/README?rev=1054377&view=auto
==============================================================================
--- felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/README (added)
+++ felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/README Sun Jan  2 10:05:08
2011
@@ -0,0 +1 @@
+This folder contains the iPOJO metadata.
\ No newline at end of file

Copied: felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/basics.xml (from r1052264,
felix/trunk/ipojo/tests/core/service-providing/src/main/resources/metadata.xml)
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/basics.xml?p2=felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/basics.xml&p1=felix/trunk/ipojo/tests/core/service-providing/src/main/resources/metadata.xml&r1=1052264&r2=1054377&rev=1054377&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/service-providing/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/basics.xml Sun Jan  2 10:05:08
2011
@@ -96,68 +96,6 @@
         </provides>
     </component>
 
-    <!--  Inherited Provides -->
-    <component
-     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation1"
-     name="PS-PI1" architecture="true">
-        <provides/>
-    </component>
-
-    <component
-     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation1"
-     name="PS-PI1-1" architecture="true">
-        <provides
-         specifications="org.apache.felix.ipojo.test.scenarios.ps.service.ParentParentInterface"/>
-    </component>
-
-    <component
-     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation1"
-     name="PS-PI1-2" architecture="true">
-        <provides
-         specifications="{org.apache.felix.ipojo.test.scenarios.ps.service.ParentParentInterface,
org.apache.felix.ipojo.test.scenarios.ps.service.ParentInterface2}"/>
-    </component>
-
-    <component
-     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation2"
-     name="PS-PI2" architecture="true">
-        <provides/>
-    </component>
-
-    <component
-     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation2"
-     name="PS-PI2-1" architecture="true">
-        <provides
-         specifications="org.apache.felix.ipojo.test.scenarios.ps.service.ParentParentInterface"/>
-    </component>
-
-    <component
-     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation3"
-     name="PS-PI3" architecture="true">
-        <provides/>
-    </component>
-
-    <!-- Concrete and abstract class -->
-    <component
-     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"
-     name="PS-PI4" architecture="true">
-        <provides specifications="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"/>
-    </component>
-    <component
-     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation2"
-     name="PS-PI5" architecture="true">
-        <provides specifications="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"/>
-    </component>
-    <component
-     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation4"
-     name="PS-PI6" architecture="true">
-        <provides specifications="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"/>
-    </component>
-    <component
-     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation3"
-     name="PS-PI7" architecture="true">
-        <provides specifications="[org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation,
org.apache.felix.ipojo.test.scenarios.ps.service.FooService]"/>
-    </component>
-
     <!--  Null Check -->
     <component classname="org.apache.felix.ipojo.test.scenarios.component.NullCheckServiceProvider"
immediate="true"
      name="PS-Null">
@@ -167,90 +105,6 @@
         </provides>
     </component>
 
-    <!--  Service Controller -->
-    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.ControllerCheckService"
-     name="PS-Controller-1-default">
-        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
-            <controller field="controller"/>
-        </provides>
-        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
-        </provides>
-    </component>
-    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.ControllerCheckService"
-     name="PS-Controller-1-false">
-        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
-            <property name="test2" type="string" value="test2"/>
-            <controller field="controller" value="false"/>
-            <property name="test" type="string" value="test"/>
-        </provides>
-        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
-        </provides>
-    </component>
-    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
-     name="PS-Controller-2-truetrue">
-        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
-            <property name="test2" type="string" value="test2"/>
-            <controller field="controllerFoo" value="true"/>
-            <property name="test" type="string" value="test"/>
-        </provides>
-        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
-            <controller field="controllerCS" value="true"/>
-        </provides>
-    </component>
-    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
-     name="PS-Controller-2-truefalse">
-        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
-            <property name="test2" type="string" value="test2"/>
-            <controller field="controllerFoo" value="false"/>
-            <property name="test" type="string" value="test"/>
-        </provides>
-        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
-            <controller field="controllerCS" value="true"/>
-        </provides>
-    </component>
-    
-    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
-     name="PS-Controller-2-spec1">
-        <provides>
-            <property name="test2" type="string" value="test2"/>
-            <controller field="controllerFoo" value="false" specification="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"/>
-            <controller field="controllerCS" value="true" specification="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService"/>
-            <property name="test" type="string" value="test"/>
-        </provides>
-    </component>
-    
-    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
-     name="PS-Controller-2-spec2">
-        <provides>
-            <property name="test2" type="string" value="test2"/>
-            <controller field="controllerFoo" value="true" specification="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"/>
-            <controller field="controllerCS" value="true" specification="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService"/>
-            <property name="test" type="string" value="test"/>
-        </provides>
-    </component>
-    
-    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
-     name="PS-Controller-2-spec3">
-        <provides>
-            <property name="test2" type="string" value="test2"/>
-            <controller field="controllerFoo" value="true" specification="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"/>
-            <controller field="controllerCS" value="true"/>
-            <property name="test" type="string" value="test"/>
-        </provides>
-    </component>
-    
-    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
-     name="PS-Controller-2-spec4">
-        <provides>
-            <property name="test2" type="string" value="test2"/>
-            <controller field="controllerFoo" value="false" specification="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"/>
-            <controller field="controllerCS" value="true"/>
-            <property name="test" type="string" value="test"/>
-        </provides>
-    </component>
-    
-    
-
     <!-- Anonymous classes -->
     <component
      classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderWithAnonymousClass"
@@ -264,41 +118,4 @@
             <property name="intAProp" field="intAProp" value="{1,2,3}"/>
         </provides>
     </component>
-
-    <!-- Registration callbacks -->
-    <component
-     classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
-     name="PS-Callbacks-reg-only">
-        <provides post-registration="registered"/>
-    </component>
-    <component
-     classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
-     name="PS-Callbacks-both">
-        <provides post-registration="registered" post-unregistration="unregistered"/>
-    </component>
-	<component
-     classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
-     name="PS-Callbacks-unreg-only">
-        <provides post-unregistration="unregistered"/>
-    </component>
-	<component
-     classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
-     name="PS-Callbacks-both-2">
-        <provides
-			specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"
-			post-unregistration="unregistered" post-registration="registered"/>
-		<provides
-			specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService"
-			post-unregistration="unregistered2" post-registration="registered2"/>
-    </component>
-	<component
-     classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
-     name="PS-Callbacks-both-1">
-        <provides
-			specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"
-			post-unregistration="unregistered" post-registration="registered"/>
-		<provides
-			specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService"
-			post-unregistration="unregistered" post-registration="registered"/>
-    </component>
 </ipojo>

Added: felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/callbacks/callbacks.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/callbacks/callbacks.xml?rev=1054377&view=auto
==============================================================================
--- felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/callbacks/callbacks.xml
(added)
+++ felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/callbacks/callbacks.xml
Sun Jan  2 10:05:08 2011
@@ -0,0 +1,41 @@
+<ipojo
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="org.apache.felix.ipojo"
+>
+    <!-- Registration callbacks -->
+    <component
+     classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
+     name="PS-Callbacks-reg-only">
+        <provides post-registration="registered"/>
+    </component>
+    <component
+     classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
+     name="PS-Callbacks-both">
+        <provides post-registration="registered" post-unregistration="unregistered"/>
+    </component>
+	<component
+     classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
+     name="PS-Callbacks-unreg-only">
+        <provides post-unregistration="unregistered"/>
+    </component>
+	<component
+     classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
+     name="PS-Callbacks-both-2">
+        <provides
+			specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"
+			post-unregistration="unregistered" post-registration="registered"/>
+		<provides
+			specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService"
+			post-unregistration="unregistered2" post-registration="registered2"/>
+    </component>
+	<component
+     classname="org.apache.felix.ipojo.test.scenarios.component.callbacks.CallbacksCheckService"
+     name="PS-Callbacks-both-1">
+        <provides
+			specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"
+			post-unregistration="unregistered" post-registration="registered"/>
+		<provides
+			specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService"
+			post-unregistration="unregistered" post-registration="registered"/>
+    </component>
+</ipojo>

Added: felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/concrete-abstract.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/concrete-abstract.xml?rev=1054377&view=auto
==============================================================================
--- felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/concrete-abstract.xml (added)
+++ felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/concrete-abstract.xml Sun
Jan  2 10:05:08 2011
@@ -0,0 +1,28 @@
+<ipojo
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="org.apache.felix.ipojo"
+>
+
+    <!-- Concrete and abstract class -->
+    <component
+     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"
+     name="PS-PI4" architecture="true">
+        <provides specifications="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"/>
+    </component>
+    <component
+     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation2"
+     name="PS-PI5" architecture="true">
+        <provides specifications="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"/>
+    </component>
+    <component
+     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation4"
+     name="PS-PI6" architecture="true">
+        <provides specifications="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation"/>
+    </component>
+    <component
+     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation3"
+     name="PS-PI7" architecture="true">
+        <provides specifications="[org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessParentImplementation,
org.apache.felix.ipojo.test.scenarios.ps.service.FooService]"/>
+    </component>
+
+</ipojo>

Added: felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/controller/service-controller.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/controller/service-controller.xml?rev=1054377&view=auto
==============================================================================
--- felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/controller/service-controller.xml
(added)
+++ felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/controller/service-controller.xml
Sun Jan  2 10:05:08 2011
@@ -0,0 +1,86 @@
+<ipojo
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="org.apache.felix.ipojo"
+>
+    <!--  Service Controller -->
+    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.ControllerCheckService"
+     name="PS-Controller-1-default">
+        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
+            <controller field="controller"/>
+        </provides>
+        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
+        </provides>
+    </component>
+    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.ControllerCheckService"
+     name="PS-Controller-1-false">
+        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
+            <property name="test2" type="string" value="test2"/>
+            <controller field="controller" value="false"/>
+            <property name="test" type="string" value="test"/>
+        </provides>
+        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
+        </provides>
+    </component>
+    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
+     name="PS-Controller-2-truetrue">
+        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
+            <property name="test2" type="string" value="test2"/>
+            <controller field="controllerFoo" value="true"/>
+            <property name="test" type="string" value="test"/>
+        </provides>
+        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
+            <controller field="controllerCS" value="true"/>
+        </provides>
+    </component>
+    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
+     name="PS-Controller-2-truefalse">
+        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.FooService">
+            <property name="test2" type="string" value="test2"/>
+            <controller field="controllerFoo" value="false"/>
+            <property name="test" type="string" value="test"/>
+        </provides>
+        <provides specifications="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService">
+            <controller field="controllerCS" value="true"/>
+        </provides>
+    </component>
+
+    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
+     name="PS-Controller-2-spec1">
+        <provides>
+            <property name="test2" type="string" value="test2"/>
+            <controller field="controllerFoo" value="false" specification="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"/>
+            <controller field="controllerCS" value="true" specification="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService"/>
+            <property name="test" type="string" value="test"/>
+        </provides>
+    </component>
+
+    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
+     name="PS-Controller-2-spec2">
+        <provides>
+            <property name="test2" type="string" value="test2"/>
+            <controller field="controllerFoo" value="true" specification="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"/>
+            <controller field="controllerCS" value="true" specification="org.apache.felix.ipojo.test.scenarios.ps.service.CheckService"/>
+            <property name="test" type="string" value="test"/>
+        </provides>
+    </component>
+
+    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
+     name="PS-Controller-2-spec3">
+        <provides>
+            <property name="test2" type="string" value="test2"/>
+            <controller field="controllerFoo" value="true" specification="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"/>
+            <controller field="controllerCS" value="true"/>
+            <property name="test" type="string" value="test"/>
+        </provides>
+    </component>
+
+    <component classname="org.apache.felix.ipojo.test.scenarios.component.controller.DoubleControllerCheckService"
+     name="PS-Controller-2-spec4">
+        <provides>
+            <property name="test2" type="string" value="test2"/>
+            <controller field="controllerFoo" value="false" specification="org.apache.felix.ipojo.test.scenarios.ps.service.FooService"/>
+            <controller field="controllerCS" value="true"/>
+            <property name="test" type="string" value="test"/>
+        </provides>
+    </component>
+</ipojo>

Added: felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/inheritance/inheritance.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/inheritance/inheritance.xml?rev=1054377&view=auto
==============================================================================
--- felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/inheritance/inheritance.xml
(added)
+++ felix/trunk/ipojo/tests/core/service-providing/src/main/ipojo/inheritance/inheritance.xml
Sun Jan  2 10:05:08 2011
@@ -0,0 +1,45 @@
+<ipojo
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="org.apache.felix.ipojo"
+>
+
+    <!--  Inherited Provides -->
+    <component
+     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation1"
+     name="PS-PI1" architecture="true">
+        <provides/>
+    </component>
+
+    <component
+     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation1"
+     name="PS-PI1-1" architecture="true">
+        <provides
+         specifications="org.apache.felix.ipojo.test.scenarios.ps.service.ParentParentInterface"/>
+    </component>
+
+    <component
+     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation1"
+     name="PS-PI1-2" architecture="true">
+        <provides
+         specifications="{org.apache.felix.ipojo.test.scenarios.ps.service.ParentParentInterface,
org.apache.felix.ipojo.test.scenarios.ps.service.ParentInterface2}"/>
+    </component>
+
+    <component
+     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation2"
+     name="PS-PI2" architecture="true">
+        <provides/>
+    </component>
+
+    <component
+     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation2"
+     name="PS-PI2-1" architecture="true">
+        <provides
+         specifications="org.apache.felix.ipojo.test.scenarios.ps.service.ParentParentInterface"/>
+    </component>
+
+    <component
+     classname="org.apache.felix.ipojo.test.scenarios.component.inherited.ProcessImplementation3"
+     name="PS-PI3" architecture="true">
+        <provides/>
+    </component>
+</ipojo>



Mime
View raw message