Release odlparent
[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>13.0.9</version>
18         <relativePath>../../odlparent</relativePath>
19     </parent>
20
21     <artifactId>karaf-dist-static</artifactId>
22     <version>13.0.9</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-jdk18on</artifactId>
54             </dependency>
55             <dependency>
56                 <groupId>org.bouncycastle</groupId>
57                 <artifactId>bcprov-jdk18on</artifactId>
58             </dependency>
59             <dependency>
60                 <groupId>org.bouncycastle</groupId>
61                 <artifactId>bcutil-jdk18on</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         </dependency>
88
89         <!-- required by controller component -->
90         <dependency>
91             <groupId>org.apache.aries.quiesce</groupId>
92             <artifactId>org.apache.aries.quiesce.api</artifactId>
93         </dependency>
94
95         <!-- for https://jira.opendaylight.org/browse/ODLPARENT-24 -->
96         <dependency>
97             <groupId>org.osgi</groupId>
98             <artifactId>org.osgi.service.event</artifactId>
99         </dependency>
100
101         <!-- Optional dependency of karaf.config.core -->
102         <dependency>
103             <groupId>org.apache.felix</groupId>
104             <artifactId>org.apache.felix.metatype</artifactId>
105         </dependency>
106
107         <!-- ODL Branding -->
108         <dependency>
109             <groupId>org.opendaylight.odlparent</groupId>
110             <artifactId>karaf.branding</artifactId>
111         </dependency>
112
113         <!-- ODL configuration -->
114         <dependency>
115             <groupId>org.opendaylight.odlparent</groupId>
116             <artifactId>opendaylight-karaf-resources</artifactId>
117         </dependency>
118
119         <!-- BouncyCastle Framework Extension Bundles -->
120         <dependency>
121             <groupId>org.opendaylight.odlparent</groupId>
122             <artifactId>bcpkix-framework-ext</artifactId>
123         </dependency>
124         <dependency>
125             <groupId>org.opendaylight.odlparent</groupId>
126             <artifactId>bcprov-framework-ext</artifactId>
127         </dependency>
128     </dependencies>
129
130     <build>
131         <plugins>
132             <plugin>
133                 <artifactId>maven-remote-resources-plugin</artifactId>
134                 <configuration>
135                     <skip>true</skip>
136                 </configuration>
137             </plugin>
138             <plugin>
139                 <groupId>org.apache.maven.plugins</groupId>
140                 <artifactId>maven-dependency-plugin</artifactId>
141                 <executions>
142                     <execution>
143                         <id>apply-branding</id>
144                         <goals>
145                             <goal>copy</goal>
146                         </goals>
147                         <phase>prepare-package</phase>
148                         <configuration>
149                             <artifactItems>
150                                 <artifactItem>
151                                     <groupId>org.opendaylight.odlparent</groupId>
152                                     <artifactId>karaf.branding</artifactId>
153                                     <version>13.0.9</version>
154                                     <outputDirectory>target/assembly/lib</outputDirectory>
155                                     <destFileName>karaf.branding-13.0.9.jar</destFileName>
156                                 </artifactItem>
157                             </artifactItems>
158                             <silent>true</silent>
159                         </configuration>
160                     </execution>
161                     <execution>
162                         <id>unpack-karaf-resources</id>
163                         <goals>
164                             <goal>unpack-dependencies</goal>
165                         </goals>
166                         <phase>prepare-package</phase>
167                         <configuration>
168                             <outputDirectory>${project.build.directory}/assembly</outputDirectory>
169                             <groupId>org.opendaylight.odlparent</groupId>
170                             <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
171                             <!-- Let maven plugin to configure start.properties  -->
172                             <!-- Don't apply monkey patches to artifacsts in the system repository  -->
173                             <excludes>META-INF/**,system/**,etc/startup.properties</excludes>-->
174                             <excludeTransitive>true</excludeTransitive>
175                             <ignorePermissions>false</ignorePermissions>
176                             <silent>true</silent>
177                         </configuration>
178                     </execution>
179                     <execution>
180                         <id>org.ops4j.pax.url.mvn.cfg</id>
181                         <goals>
182                             <goal>copy</goal>
183                         </goals>
184                         <phase>prepare-package</phase>
185                         <configuration>
186                             <artifactItems>
187                                 <artifactItem>
188                                     <groupId>org.opendaylight.odlparent</groupId>
189                                     <artifactId>opendaylight-karaf-resources</artifactId>
190                                     <type>properties</type>
191                                     <classifier>config</classifier>
192                                     <overWrite>true</overWrite>
193                                     <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
194                                     <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
195                                 </artifactItem>
196                             </artifactItems>
197                             <overWriteReleases>true</overWriteReleases>
198                             <overWriteSnapshots>true</overWriteSnapshots>
199                         </configuration>
200                     </execution>
201                 </executions>
202             </plugin>
203             <plugin>
204                 <artifactId>maven-antrun-plugin</artifactId>
205                 <executions>
206                     <execution>
207                         <id>fix-permissions</id>
208                         <phase>prepare-package</phase>
209                         <goals>
210                             <goal>run</goal>
211                         </goals>
212                         <configuration>
213                             <target>
214                                 <chmod perm="755">
215                                     <fileset dir="${project.build.directory}/assembly/bin">
216                                         <!-- Ensure that all the shell scripts are executable -->
217                                         <exclude name="*.bat"/>
218                                         <exclude name="contrib/*"/>
219                                     </fileset>
220                                 </chmod>
221                             </target>
222                         </configuration>
223                     </execution>
224                 </executions>
225             </plugin>
226             <plugin>
227                 <groupId>org.apache.karaf.tooling</groupId>
228                 <artifactId>karaf-maven-plugin</artifactId>
229                 <version>${karaf.version}</version>
230                 <extensions>true</extensions>
231                 <executions>
232                     <execution>
233                         <id>process-resources</id>
234                         <phase>process-resources</phase>
235                         <goals>
236                             <goal>assembly</goal>
237                         </goals>
238                     </execution>
239                     <execution>
240                         <id>package</id>
241                         <goals>
242                             <goal>archive</goal>
243                         </goals>
244                     </execution>
245                 </executions>
246                 <configuration>
247                     <startupBundles>
248                         <!-- FIXME: we want to generate these versions somehow -->
249                         <bundle>mvn:org.apache.felix/org.apache.felix.cm.json/1.0.6</bundle>
250                         <bundle>mvn:org.apache.felix/org.apache.felix.converter/1.0.18</bundle>
251                         <bundle>mvn:org.apache.felix/org.apache.felix.fileinstall/3.7.4</bundle>
252                         <bundle>mvn:org.apache.sling/org.apache.sling.commons.johnzon/1.2.14</bundle>
253                         <bundle>mvn:org.ops4j.pax.url/pax-url-aether/2.6.12</bundle>
254
255                         <bundle>mvn:org.opendaylight.odlparent/bcprov-framework-ext/13.0.9</bundle>
256                         <bundle>mvn:org.opendaylight.odlparent/bcpkix-framework-ext/13.0.9</bundle>
257                         <bundle>mvn:org.opendaylight.odlparent/bcutil-framework-ext/13.0.9</bundle>
258                         <bundle>mvn:org.opendaylight.odlparent/logging-markers/13.0.9</bundle>
259                     </startupBundles>
260                     <startupFeatures>
261                         <feature>static-framework</feature>
262                         <feature>scr</feature>
263                         <feature>log</feature>
264                         <feature>system</feature>
265                         <!-- disable shell by default-->
266                         <!-- <feature>shell</feature>-->
267                         <feature>feature</feature>
268                         <feature>deployer</feature>
269                         <feature>wrap</feature>
270                         <feature>aries-blueprint</feature>
271                         <feature>eventadmin</feature>
272                     </startupFeatures>
273                     <writeProfiles>true</writeProfiles>
274                     <framework>static</framework>
275                     <useReferenceUrls>true</useReferenceUrls>
276                     <environment>static</environment>
277                     <javase>${maven.compiler.release}</javase>
278                     <archiveTarGz>${karaf.archiveTarGz}</archiveTarGz>
279                     <archiveZip>${karaf.archiveZip}</archiveZip>
280                 </configuration>
281             </plugin>
282         </plugins>
283     </build>
284 </project>