Fix issue Felix-815.
Properties becomes optional by default.
Unvalued properties are not published with the service reference until they receive a value.
Setter methods are not called until properties receive a value
Injected values in fields follow standard Java initialization (null for object and arrays, 0 for numeric types, false for boolean). 
Mandatory properties can be set with the 'mandatory' attribute (supported in XML and in the annotations).
The core.xsd XML Schema is also modified to add the new attribute.

This improvement allows removing default value in properties (such as in the architecture handlers).
Provides test about this new improvement

Fix issue Felix-816
The comparator attribute is now supported for any binding policy.
Provides test about using custom comparator with any binding policy

Fix issue Felix-817
Solve an issue in the ServiceExporter when a service in unregistered twice (throws an IllegalStateException since a recent modification of the Felix framework). 

Fix issue Felix-818
Implement the ServiceReferenceImpl compareTo method (method added in OSGi R4.1). This method reuse the same implementation as the Felix framework ServiceReferenceImpl method.

Remove junit4osgi embedded tests

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@713976 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/tests/core/service-dependency-comparator/pom.xml b/ipojo/tests/core/service-dependency-comparator/pom.xml
new file mode 100644
index 0000000..56ab721
--- /dev/null
+++ b/ipojo/tests/core/service-dependency-comparator/pom.xml
@@ -0,0 +1,104 @@
+<!--

+	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.

+-->

+<project>

+	<modelVersion>4.0.0</modelVersion>

+	<packaging>bundle</packaging>

+	<name>iPOJO Service Dependency (Binding Policy) Test Suite</name>

+	<artifactId>tests.core.service.dependency.bindingpolicy</artifactId>

+	<groupId>ipojo.tests</groupId>

+	<version>1.1.0-SNAPSHOT</version>

+	<dependencies>

+		<dependency>

+			<groupId>org.apache.felix</groupId>

+			<artifactId>org.apache.felix.ipojo</artifactId>

+			<version>1.1.0-SNAPSHOT</version>

+		</dependency>

+		<dependency>

+			<groupId>org.apache.felix</groupId>

+			<artifactId>org.apache.felix.ipojo.metadata</artifactId>

+			<version>1.1.0-SNAPSHOT</version>

+		</dependency>

+		<dependency>

+			<groupId>org.apache.felix</groupId>

+			<artifactId>org.osgi.core</artifactId>

+			<version>1.2.0</version>

+		</dependency>

+		<dependency>

+			<groupId>junit</groupId>

+			<artifactId>junit</artifactId>

+			<version>3.8.1</version>

+		</dependency>

+		<dependency>

+			<groupId>ipojo.examples</groupId>

+			<artifactId>org.apache.felix.ipojo.junit4osgi</artifactId>

+			<version>1.1.0-SNAPSHOT</version>

+		</dependency>

+		<dependency>

+			<groupId>ipojo.tests</groupId>

+			<artifactId>tests.core.service.dependency</artifactId>

+			<version>1.1.0-SNAPSHOT</version>

+		</dependency>

+	</dependencies>

+	<build>

+		<plugins>

+			<plugin>

+				<groupId>org.apache.felix</groupId>

+				<artifactId>maven-bundle-plugin</artifactId>

+				<version>1.4.3</version>

+				<extensions>true</extensions>

+				<configuration>

+					<instructions>

+						<Bundle-SymbolicName>

+							${pom.artifactId}

+						</Bundle-SymbolicName>

+						<Private-Package>

+							org.apache.felix.ipojo.test.scenarios.service.dependency.comparator

+						</Private-Package>

+						<Test-Suite>

+							org.apache.felix.ipojo.test.scenarios.service.dependency.comparator.ComparatorTestCase						

+						</Test-Suite>

+					</instructions>

+				</configuration>

+			</plugin>

+			<plugin>

+				<groupId>org.apache.felix</groupId>

+				<artifactId>maven-ipojo-plugin</artifactId>

+				<version>1.1.0-SNAPSHOT</version>

+				<executions>

+					<execution>

+						<goals>

+							<goal>ipojo-bundle</goal>

+						</goals>

+						<configuration>

+							<ignoreAnnotations>true</ignoreAnnotations>

+						</configuration>

+					</execution>

+				</executions>

+			</plugin>

+			<plugin>

+				<groupId>org.apache.maven.plugins</groupId>

+				<artifactId>maven-compiler-plugin</artifactId>

+				<configuration>

+					<source>1.4</source>

+					<target>1.4</target>

+				</configuration>

+			</plugin>

+		</plugins>

+	</build>

+</project>