FELIX-1484 integration test ensuring bundle location of configuration
is not set after the bundle is uninstalled

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@804262 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configadmin/pom.xml b/configadmin/pom.xml
index 9741f69..21201e9 100644
--- a/configadmin/pom.xml
+++ b/configadmin/pom.xml
@@ -46,6 +46,37 @@
             <artifactId>org.osgi.compendium</artifactId>
             <version>1.0.0</version>
         </dependency>
+        
+        <!-- Integration Testing with Pax Exam -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam</artifactId>
+            <version>0.6.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit</artifactId>
+            <version>0.6.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-container-default</artifactId>
+            <version>0.6.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.swissbox</groupId>
+            <artifactId>pax-swissbox-tinybundles</artifactId>
+            <version>1.0.0</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>
@@ -80,6 +111,92 @@
                     </instructions>
                 </configuration>
             </plugin>
+            <!--
+                configure default compilation for Java 1.3 and integration
+                test compilation for Java 5 (since integration tests use
+                Java Annotations for Pax Exam)
+            -->
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>test-compile-java5</id>
+                        <goals>
+                            <goal>testCompile</goal>
+                        </goals>
+                        <configuration>
+                            <source>1.5</source>
+                            <target>1.5</target>
+                            <testExcludes>
+                                <testExclude>**/cm/*</testExclude>
+                                <testExclude>**/cm/file/*</testExclude>
+                                <testExclude>**/cm/impl/**</testExclude>
+                            </testExcludes>
+                            <testIncludes>
+                                <testInclude>**/integration/**</testInclude>
+                            </testIncludes>
+                        </configuration>
+                    </execution>
+                </executions>
+                <configuration>
+                    <testExcludes>
+                        <testExclude>**/integration/**</testExclude>
+                    </testExcludes>
+                </configuration>
+            </plugin>
+
+            <!--
+                Exclude Integration tests in (default) unit tests and
+                conversely enable integration tests for integration testing
+                only. Helper classes are completely excluded from testing. 
+            -->
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>surefire-it</id>
+                        <phase>integration-test</phase>
+                        <goals>
+                            <goal>test</goal>
+                        </goals>
+                        <configuration>
+                            <excludes>
+                                <exclude>**/cm/*</exclude>
+                                <exclude>**/cm/file/*</exclude>
+                                <exclude>**/cm/impl/**</exclude>
+                            </excludes>
+                            <includes>
+                                <include>**/integration/*</include>
+                            </includes>
+                        </configuration>
+                    </execution>
+                </executions>
+                <configuration>
+                    <excludes>
+                        <exclude>**/integration/**</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
+    
+    <!-- repositories for Pax Exam and BND tool -->
+    <repositories>
+        <repository>
+            <id>ops4j</id>
+            <name>ops4j</name>
+            <url>http://repository.ops4j.org/maven2</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>aqute</id>
+            <name>aqute</name>
+            <url>http://www.aqute.biz/repo</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+    </repositories>
 </project>