Support building without zip archives
[odlparent.git] / features-test / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vi: set et smarttab sw=4 tabstop=4: -->
3 <!--
4  Copyright © 2014, 2017 Cisco Systems, Inc. and others.  All rights reserved.
5
6  This program and the accompanying materials are made available under the
7  terms of the Eclipse Public License v1.0 which accompanies this distribution,
8  and is available at http://www.eclipse.org/legal/epl-v10.html
9 -->
10 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
12
13     <parent>
14         <groupId>org.opendaylight.odlparent</groupId>
15         <artifactId>bundle-parent</artifactId>
16         <version>4.0.3-SNAPSHOT</version>
17         <relativePath>../bundle-parent</relativePath>
18     </parent>
19
20     <modelVersion>4.0.0</modelVersion>
21     <artifactId>features-test</artifactId>
22     <packaging>bundle</packaging>
23     <name>ODL :: odlparent :: ${project.artifactId}</name>
24
25     <dependencies>
26         <!-- Dependencies for pax exam karaf container -->
27         <dependency>
28             <groupId>org.ops4j.pax.exam</groupId>
29             <artifactId>pax-exam-container-karaf</artifactId>
30             <scope>compile</scope>
31         </dependency>
32         <dependency>
33             <groupId>org.ops4j.pax.exam</groupId>
34             <artifactId>pax-exam-junit4</artifactId>
35             <scope>compile</scope>
36         </dependency>
37         <dependency>
38             <groupId>org.ops4j.pax.exam</groupId>
39             <artifactId>pax-exam</artifactId>
40             <scope>compile</scope>
41         </dependency>
42         <dependency>
43             <groupId>org.ops4j.pax.url</groupId>
44             <artifactId>pax-url-aether</artifactId>
45             <scope>compile</scope>
46         </dependency>
47         <dependency>
48             <groupId>org.osgi</groupId>
49             <!-- required due to https://jira.opendaylight.org/browse/ODLPARENT-136 -->
50             <artifactId>org.osgi.compendium</artifactId>
51         </dependency>
52         <dependency>
53             <groupId>org.apache.karaf.features</groupId>
54             <artifactId>standard</artifactId>
55             <version>${karaf.version}</version>
56             <classifier>features</classifier>
57             <type>xml</type>
58         </dependency>
59         <dependency>
60             <groupId>junit</groupId>
61             <artifactId>junit</artifactId>
62             <scope>compile</scope>
63         </dependency>
64         <dependency>
65             <groupId>org.apache.karaf.deployer</groupId>
66             <artifactId>org.apache.karaf.deployer.blueprint</artifactId>
67             <version>${karaf.version}</version>
68             <scope>compile</scope>
69         </dependency>
70         <dependency>
71             <groupId>org.apache.karaf.deployer</groupId>
72             <artifactId>org.apache.karaf.deployer.features</artifactId>
73             <version>${karaf.version}</version>
74             <scope>compile</scope>
75         </dependency>
76         <dependency>
77             <groupId>org.ops4j.pax.url</groupId>
78             <artifactId>pax-url-wrap</artifactId>
79             <scope>compile</scope>
80         </dependency>
81         <dependency>
82             <groupId>org.slf4j</groupId>
83             <artifactId>slf4j-api</artifactId>
84             <scope>compile</scope>
85         </dependency>
86         <dependency>
87             <groupId>javax.inject</groupId>
88             <artifactId>javax.inject</artifactId>
89             <scope>compile</scope>
90         </dependency>
91         <dependency>
92             <groupId>org.osgi</groupId>
93             <artifactId>org.osgi.core</artifactId>
94             <scope>compile</scope>
95         </dependency>
96         <!-- BEWARE of adding additional dependencies here...
97              It will cause weird issues e.g. in integration/distribution/features/repos/distribution -->
98         <dependency>
99           <groupId>org.opendaylight.odlparent</groupId>
100           <artifactId>karaf-util</artifactId>
101           <version>${project.version}</version>
102         </dependency>
103         <dependency>
104             <groupId>${project.groupId}</groupId>
105             <artifactId>bundles4-test</artifactId>
106             <version>${project.version}</version>
107             <scope>provided</scope>
108         </dependency>
109         <dependency>
110             <groupId>org.apache.karaf.bundle</groupId>
111             <artifactId>org.apache.karaf.bundle.core</artifactId>
112             <version>${karaf.version}</version>
113             <scope>provided</scope>
114         </dependency>
115         <dependency>
116           <groupId>com.google.guava</groupId>
117           <artifactId>guava</artifactId>
118           <scope>compile</scope>
119         </dependency>
120         <!-- The following, which are just transitive dependencies of bundles4-test,
121              have to be repeated here so that the Embed-Dependency below for maven-bundle-plugin works: -->
122         <dependency>
123           <groupId>org.hamcrest</groupId>
124           <artifactId>hamcrest-core</artifactId>
125           <scope>provided</scope>
126         </dependency>
127         <dependency>
128           <groupId>org.awaitility</groupId>
129           <artifactId>awaitility</artifactId>
130           <scope>provided</scope>
131           <exclusions>
132             <exclusion>
133               <groupId>cglib</groupId>
134               <artifactId>cglib-nodep</artifactId>
135             </exclusion>
136             <exclusion>
137               <groupId>org.objenesis</groupId>
138               <artifactId>objenesis</artifactId>
139             </exclusion>
140           </exclusions>
141         </dependency>
142         <!-- Real <scope>test dependencies, just for SingleFeatureTestUnitTest -->
143         <dependency>
144           <groupId>com.google.truth</groupId>
145           <artifactId>truth</artifactId>
146           <scope>test</scope>
147         </dependency>
148     </dependencies>
149
150     <build>
151         <resources>
152             <resource>
153                 <directory>src/main/resources</directory>
154                 <filtering>true</filtering>
155             </resource>
156         </resources>
157         <plugins>
158             <plugin>
159                 <groupId>org.apache.felix</groupId>
160                 <artifactId>maven-bundle-plugin</artifactId>
161                 <configuration>
162                   <instructions>
163                     <Embed-Dependency>bundles4-test;inline=true,awaitility;inline=true,hamcrest-core;inline=true</Embed-Dependency>
164                     <!-- same as in bundles4-test/pom.xml: -->
165                     <Import-Package>!net.sf.cglib.proxy,!org.objenesis,*</Import-Package>
166                   </instructions>
167                 </configuration>
168             </plugin>
169             <plugin>
170                 <artifactId>maven-checkstyle-plugin</artifactId>
171                 <configuration>
172                     <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
173                 </configuration>
174                 <executions>
175                     <execution>
176                         <id>check-license</id>
177                         <configuration>
178                             <excludes>
179                                 <!-- Skip Apache Licensed files -->
180                                 org/opendaylight/odlparent/featuretest/CustomBundleUrlStreamHandlerFactory.java
181                             </excludes>
182                         </configuration>
183                     </execution>
184                 </executions>
185             </plugin>
186         </plugins>
187     </build>
188
189     <!-- We use profiles to handle the different archives which are user-configurable.
190          We need at least one archive to be built. -->
191     <profiles>
192         <profile>
193             <id>zip</id>
194             <activation>
195                 <property>
196                     <name>karaf.archiveZip</name>
197                     <value>true</value>
198                 </property>
199             </activation>
200             <dependencies>
201                 <dependency>
202                     <groupId>org.opendaylight.odlparent</groupId>
203                     <artifactId>opendaylight-karaf-empty</artifactId>
204                     <type>zip</type>
205                     <exclusions>
206                         <exclusion>
207                             <groupId>*</groupId>
208                             <artifactId>*</artifactId>
209                         </exclusion>
210                     </exclusions>
211                 </dependency>
212             </dependencies>
213             <properties>
214                 <archive.extension>zip</archive.extension>
215             </properties>
216         </profile>
217         <profile>
218             <id>tarGz</id>
219             <activation>
220                 <property>
221                     <name>karaf.archiveTarGz</name>
222                     <value>true</value>
223                 </property>
224             </activation>
225             <properties>
226                 <archive.extension>tar.gz</archive.extension>
227             </properties>
228         </profile>
229     </profiles>
230 </project>