Fix FELIX-2438.
Temporal dependencies use proxies by default.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@956996 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalHandler.java b/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalHandler.java
index c980101..de9c2a8 100644
--- a/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalHandler.java
+++ b/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalHandler.java
@@ -150,7 +150,16 @@
             }
             
             String prox = deps[i].getAttribute("proxy");
-            boolean proxy = prox != null && prox.equals("true");
+            //boolean proxy = prox != null && prox.equals("true");
+            // Use proxy by default except for array:
+            boolean proxy = prox == null  || prox.equals("true");
+            
+            if (prox == null  && proxy) { // Proxy set because of the default.
+                if (agg  && ! collection) { // Aggregate and array
+                    proxy = false;
+                }
+            }
+            
             if (proxy && agg) {
                 if (! collection) {
                     error("Proxied aggregate temporal dependencies cannot be an array. Only collections are supported");
diff --git a/ipojo/junit4osgi/maven-junit4osgi-plugin/pom.xml b/ipojo/junit4osgi/maven-junit4osgi-plugin/pom.xml
index 416dbb1..1085686 100644
--- a/ipojo/junit4osgi/maven-junit4osgi-plugin/pom.xml
+++ b/ipojo/junit4osgi/maven-junit4osgi-plugin/pom.xml
@@ -36,7 +36,7 @@
     <dependency>
       <groupId>org.apache.felix</groupId>
       <artifactId>org.apache.felix.framework</artifactId>
-      <version>2.0.5</version>
+      <version>3.1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
diff --git a/ipojo/tests/handler/temporal/pom.xml b/ipojo/tests/handler/temporal/pom.xml
index 7e7cad8..d20cb9b 100644
--- a/ipojo/tests/handler/temporal/pom.xml
+++ b/ipojo/tests/handler/temporal/pom.xml
@@ -35,6 +35,11 @@
 			<artifactId>org.apache.felix.ipojo</artifactId>

 			<version>1.7.0-SNAPSHOT</version>

 		</dependency>

+        <dependency>

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

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

+            <version>1.7.0-SNAPSHOT</version>

+        </dependency>

 		<dependency>

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

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

@@ -93,6 +98,25 @@
 					</execution>

 				</executions>

 			</plugin>

+            

+            

+            <plugin>

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

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

+        <version>1.1.0-SNAPSHOT</version>

+        <executions>

+          <execution>

+            <goals>

+              <goal>test</goal>

+            </goals>

+            <configuration>

+              <configuration>

+              <org.osgi.http.port>8083</org.osgi.http.port>

+              </configuration>

+            </configuration>

+          </execution>

+        </executions>

+      </plugin>

 		</plugins>

 	</build>

 </project>