Package bcutil in static distribution
[odlparent.git] / karaf / karaf-dist-static / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Copyright (c) 2020 PANTHEON.tech, s.r.o. and others.  All rights reserved.
4
5  This program and the accompanying materials are made available under the
6  terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  and is available at http://www.eclipse.org/legal/epl-v10.html
8 -->
9 <project xmlns="http://maven.apache.org/POM/4.0.0"
10          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     <modelVersion>4.0.0</modelVersion>
13
14     <parent>
15         <groupId>org.opendaylight.odlparent</groupId>
16         <artifactId>odlparent</artifactId>
17         <version>9.0.6-SNAPSHOT</version>
18         <relativePath>../../odlparent</relativePath>
19     </parent>
20
21     <artifactId>karaf-dist-static</artifactId>
22     <version>9.0.6-SNAPSHOT</version>
23     <packaging>pom</packaging>
24     <name>ODL :: odlparent :: ${project.artifactId}</name>
25     <description>
26         Baseline parent pom.xml for artifacts packaging a static Karaf distribution.
27     </description>
28
29     <properties>
30         <karaf.archiveZip>true</karaf.archiveZip>
31         <karaf.archiveTarGz>true</karaf.archiveTarGz>
32     </properties>
33
34     <dependencyManagement>
35         <dependencies>
36             <dependency>
37                 <groupId>org.apache.karaf.features</groupId>
38                 <artifactId>static</artifactId>
39                 <version>${karaf.version}</version>
40             </dependency>
41             <dependency>
42                 <groupId>org.apache.karaf.features</groupId>
43                 <artifactId>standard</artifactId>
44                 <version>${karaf.version}</version>
45             </dependency>
46             <dependency>
47                 <groupId>org.apache.karaf.features</groupId>
48                 <artifactId>framework</artifactId>
49                 <version>${karaf.version}</version>
50             </dependency>
51             <dependency>
52                 <groupId>org.bouncycastle</groupId>
53                 <artifactId>bcpkix-jdk15on</artifactId>
54             </dependency>
55             <dependency>
56                 <groupId>org.bouncycastle</groupId>
57                 <artifactId>bcprov-jdk15on</artifactId>
58             </dependency>
59             <dependency>
60                 <groupId>org.bouncycastle</groupId>
61                 <artifactId>bcutil-jdk15on</artifactId>
62             </dependency>
63         </dependencies>
64     </dependencyManagement>
65
66     <dependencies>
67         <!-- karaf static distribution -->
68         <dependency>
69             <groupId>org.apache.karaf.features</groupId>
70             <artifactId>static</artifactId>
71             <type>kar</type>
72         </dependency>
73         <dependency>
74             <groupId>org.apache.karaf.features</groupId>
75             <artifactId>standard</artifactId>
76             <classifier>features</classifier>
77             <type>xml</type>
78         </dependency>
79         <dependency>
80             <groupId>org.apache.karaf.services</groupId>
81             <artifactId>org.apache.karaf.services.staticcm</artifactId>
82         </dependency>
83
84         <dependency>
85             <groupId>org.ops4j.pax.url</groupId>
86             <artifactId>pax-url-aether</artifactId>
87             <!-- FIXME: why do we need this version (maven-3.6.3 defaults to 2.5.4) -->
88             <version>2.6.5</version>
89         </dependency>
90
91         <!-- required by controller component -->
92         <dependency>
93             <groupId>org.apache.aries.quiesce</groupId>
94             <artifactId>org.apache.aries.quiesce.api</artifactId>
95         </dependency>
96
97         <!-- for https://jira.opendaylight.org/browse/ODLPARENT-24 -->
98         <dependency>
99             <groupId>org.osgi</groupId>
100             <artifactId>org.osgi.service.event</artifactId>
101         </dependency>
102
103         <!-- Optional dependency of karaf.config.core -->
104         <dependency>
105             <groupId>org.apache.felix</groupId>
106             <artifactId>org.apache.felix.metatype</artifactId>
107         </dependency>
108
109         <!-- ODL Branding -->
110         <dependency>
111             <groupId>org.opendaylight.odlparent</groupId>
112             <artifactId>karaf.branding</artifactId>
113         </dependency>
114
115         <!-- ODL configuration -->
116         <dependency>
117             <groupId>org.opendaylight.odlparent</groupId>
118             <artifactId>opendaylight-karaf-resources</artifactId>
119         </dependency>
120
121         <!-- BouncyCastle Framework Extension Bundles -->
122         <dependency>
123             <groupId>org.opendaylight.odlparent</groupId>
124             <artifactId>bcpkix-framework-ext</artifactId>
125         </dependency>
126         <dependency>
127             <groupId>org.opendaylight.odlparent</groupId>
128             <artifactId>bcprov-framework-ext</artifactId>
129         </dependency>
130     </dependencies>
131
132     <build>
133         <plugins>
134             <plugin>
135                 <artifactId>maven-remote-resources-plugin</artifactId>
136                 <configuration>
137                     <skip>true</skip>
138                 </configuration>
139             </plugin>
140             <plugin>
141                 <groupId>org.apache.maven.plugins</groupId>
142                 <artifactId>maven-dependency-plugin</artifactId>
143                 <executions>
144                     <execution>
145                         <id>apply-branding</id>
146                         <goals>
147                             <goal>copy</goal>
148                         </goals>
149                         <phase>prepare-package</phase>
150                         <configuration>
151                             <artifactItems>
152                                 <artifactItem>
153                                     <groupId>org.opendaylight.odlparent</groupId>
154                                     <artifactId>karaf.branding</artifactId>
155                                     <version>9.0.6-SNAPSHOT</version>
156                                     <outputDirectory>target/assembly/lib</outputDirectory>
157                                     <destFileName>karaf.branding-9.0.6-SNAPSHOT.jar</destFileName>
158                                 </artifactItem>
159                             </artifactItems>
160                             <silent>true</silent>
161                         </configuration>
162                     </execution>
163                     <execution>
164                         <id>unpack-karaf-resources</id>
165                         <goals>
166                             <goal>unpack-dependencies</goal>
167                         </goals>
168                         <phase>prepare-package</phase>
169                         <configuration>
170                             <outputDirectory>${project.build.directory}/assembly</outputDirectory>
171                             <groupId>org.opendaylight.odlparent</groupId>
172                             <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
173                             <!-- Let maven plugin to configure start.properties  -->
174                             <!-- Don't apply monkey patches to artifacsts in the system repository  -->
175                             <excludes>META-INF/**,system/**,etc/startup.properties</excludes>-->
176                             <excludeTransitive>true</excludeTransitive>
177                             <ignorePermissions>false</ignorePermissions>
178                             <silent>true</silent>
179                         </configuration>
180                     </execution>
181                     <execution>
182                         <id>org.ops4j.pax.url.mvn.cfg</id>
183                         <goals>
184                             <goal>copy</goal>
185                         </goals>
186                         <phase>prepare-package</phase>
187                         <configuration>
188                             <artifactItems>
189                                 <artifactItem>
190                                     <groupId>org.opendaylight.odlparent</groupId>
191                                     <artifactId>opendaylight-karaf-resources</artifactId>
192                                     <type>properties</type>
193                                     <classifier>config</classifier>
194                                     <overWrite>true</overWrite>
195                                     <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
196                                     <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
197                                 </artifactItem>
198                             </artifactItems>
199                             <overWriteReleases>true</overWriteReleases>
200                             <overWriteSnapshots>true</overWriteSnapshots>
201                         </configuration>
202                     </execution>
203                 </executions>
204             </plugin>
205             <plugin>
206                 <artifactId>maven-antrun-plugin</artifactId>
207                 <executions>
208                     <execution>
209                         <id>fix-permissions</id>
210                         <phase>prepare-package</phase>
211                         <goals>
212                             <goal>run</goal>
213                         </goals>
214                         <configuration>
215                             <target>
216                                 <chmod perm="755">
217                                     <fileset dir="${project.build.directory}/assembly/bin">
218                                         <!-- Ensure that all the shell scripts are executable -->
219                                         <exclude name="*.bat"/>
220                                         <exclude name="contrib/*"/>
221                                     </fileset>
222                                 </chmod>
223                             </target>
224                         </configuration>
225                     </execution>
226                 </executions>
227             </plugin>
228             <plugin>
229                 <groupId>org.apache.karaf.tooling</groupId>
230                 <artifactId>karaf-maven-plugin</artifactId>
231                 <version>${karaf.version}</version>
232                 <extensions>true</extensions>
233                 <executions>
234                     <execution>
235                         <id>process-resources</id>
236                         <phase>process-resources</phase>
237                         <goals>
238                             <goal>assembly</goal>
239                         </goals>
240                     </execution>
241                     <execution>
242                         <id>package</id>
243                         <goals>
244                             <goal>archive</goal>
245                         </goals>
246                     </execution>
247                 </executions>
248                 <configuration>
249                     <startupBundles>
250                         <!-- FIXME: we want to generate these versions somehow -->
251                         <bundle>mvn:org.apache.felix/org.apache.felix.cm.json/1.0.2</bundle>
252                         <bundle>mvn:org.apache.felix/org.apache.felix.converter/1.0.14</bundle>
253                         <bundle>mvn:org.apache.felix/org.apache.felix.fileinstall/3.6.8</bundle>
254                         <bundle>mvn:org.apache.sling/org.apache.sling.commons.johnzon/1.2.6</bundle>
255                         <bundle>mvn:org.ops4j.pax.url/pax-url-aether/2.6.5</bundle>
256
257                         <bundle>mvn:org.opendaylight.odlparent/bcprov-framework-ext/9.0.6-SNAPSHOT</bundle>
258                         <bundle>mvn:org.opendaylight.odlparent/bcpkix-framework-ext/9.0.6-SNAPSHOT</bundle>
259                         <bundle>mvn:org.opendaylight.odlparent/bcutil-framework-ext/9.0.6-SNAPSHOT</bundle>
260                     </startupBundles>
261                     <startupFeatures>
262                         <feature>static-framework</feature>
263                         <feature>scr</feature>
264                         <feature>log</feature>
265                         <feature>system</feature>
266                         <!-- disable shell by default-->
267                         <!-- <feature>shell</feature>-->
268                         <feature>feature</feature>
269                         <feature>deployer</feature>
270                         <feature>wrap</feature>
271                         <feature>aries-blueprint</feature>
272                         <feature>eventadmin</feature>
273                     </startupFeatures>
274                     <writeProfiles>true</writeProfiles>
275                     <framework>static</framework>
276                     <useReferenceUrls>true</useReferenceUrls>
277                     <environment>static</environment>
278                     <javase>${maven.compiler.release}</javase>
279                     <archiveTarGz>${karaf.archiveTarGz}</archiveTarGz>
280                     <archiveZip>${karaf.archiveZip}</archiveZip>
281                 </configuration>
282             </plugin>
283         </plugins>
284     </build>
285 </project>