Fix issue FELIX-2093 : iPOJO doesn't always use the correct class loader to load Nullable classes
This came from the dynamic proxy strange behavior. The proxy don't use the specification classloader to load transitive classes. To fix that, the delegation is made manually.
This commit also update some tests to the latest pax:exam / tinybundle API.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@912323 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/tests/core/service-dependency-optional/pom.xml b/ipojo/tests/core/service-dependency-optional/pom.xml
new file mode 100644
index 0000000..2bced55
--- /dev/null
+++ b/ipojo/tests/core/service-dependency-optional/pom.xml
@@ -0,0 +1,121 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>ipojo.tests</groupId>
+ <artifactId>tests.core.dependency.optional</artifactId>
+ <name>iPOJO Optional Dependency Test Suite</name>
+ <version>1.5.0-SNAPSHOT</version>
+ <description>Test the optional dependencies</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.servicemix.tooling</groupId>
+ <artifactId>depends-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-depends-file</id>
+ <goals>
+ <goal>generate-depends-file</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.ipojo</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.ipojo.annotations</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ <!--
+ <dependency> <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.log</artifactId>
+ <version>1.0.0</version> </dependency>
+ -->
+
+ <!--
+ Pax Exam API:
+ -->
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <!--
+ During runtime Pax Exam will discover the OSGi container to use by
+ searching metadata available into classpath. Pax Exam comes with a
+ default container that uses [Pax Runner] for implementing the
+ container requirements:
+ -->
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-container-default
+ </artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <!--
+ If your test code is based on JUnit you will have to have the Junit
+ support artifact:
+ -->
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-junit</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.5</version>
+ <type>jar</type>
+ <scope>test</scope>
+ </dependency>
+ <!-- Tinybundles -->
+ <dependency>
+ <groupId>org.ops4j.pax.swissbox</groupId>
+ <artifactId>pax-swissbox-tinybundles</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.ipojo.tinybundles.bundleAsiPOJO
+ </artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.ipojo.test.helpers</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ </dependencies>
+
+ <repositories>
+ <repository>
+ <id>ops4j.releases</id>
+ <name>OPS4J Release</name>
+ <url> http://repository.ops4j.org/maven2/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+</project>