Support building without zip archives
[odlparent.git] / features-test / pom.xml
index d9430593bbcd31ded468357d40ab37addbb541fc..bdbb411943e596d6cfd9debed19fabc5b3af3c4e 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>4.0.3-SNAPSHOT</version>
         <relativePath>../bundle-parent</relativePath>
     </parent>
 
             <artifactId>pax-url-aether</artifactId>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <!-- required due to https://jira.opendaylight.org/browse/ODLPARENT-136 -->
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.karaf.features</groupId>
             <artifactId>standard</artifactId>
             <artifactId>org.osgi.core</artifactId>
             <scope>compile</scope>
         </dependency>
-        <dependency>
-            <groupId>org.opendaylight.odlparent</groupId>
-            <artifactId>opendaylight-karaf-empty</artifactId>
-            <type>zip</type>
-        </dependency>
         <!-- BEWARE of adding additional dependencies here...
              It will cause weird issues e.g. in integration/distribution/features/repos/distribution -->
+        <dependency>
+          <groupId>org.opendaylight.odlparent</groupId>
+          <artifactId>karaf-util</artifactId>
+          <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>bundles4-test</artifactId>
         </plugins>
     </build>
 
-  <!--
-    Maven Site Configuration
-
-    The following configuration is necessary for maven-site-plugin to
-    correctly identify the correct deployment path for OpenDaylight Maven
-    sites.
-  -->
-  <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
-
-  <distributionManagement>
-    <site>
-      <id>opendaylight-site</id>
-      <url>${nexus.site.url}/${project.artifactId}/</url>
-    </site>
-  </distributionManagement>
+    <!-- We use profiles to handle the different archives which are user-configurable.
+         We need at least one archive to be built. -->
+    <profiles>
+        <profile>
+            <id>zip</id>
+            <activation>
+                <property>
+                    <name>karaf.archiveZip</name>
+                    <value>true</value>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.opendaylight.odlparent</groupId>
+                    <artifactId>opendaylight-karaf-empty</artifactId>
+                    <type>zip</type>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>*</groupId>
+                            <artifactId>*</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+            </dependencies>
+            <properties>
+                <archive.extension>zip</archive.extension>
+            </properties>
+        </profile>
+        <profile>
+            <id>tarGz</id>
+            <activation>
+                <property>
+                    <name>karaf.archiveTarGz</name>
+                    <value>true</value>
+                </property>
+            </activation>
+            <properties>
+                <archive.extension>tar.gz</archive.extension>
+            </properties>
+        </profile>
+    </profiles>
 </project>