Remove unneeded groupId
[odlparent.git] / karaf / karaf4-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Copyright © 2016 Red Hat, Inc. 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>1.8.0-SNAPSHOT</version>
18         <relativePath>../../odlparent</relativePath>
19     </parent>
20
21     <groupId>org.opendaylight.odlparent</groupId>
22     <artifactId>karaf4-parent</artifactId>
23     <version>1.8.0-SNAPSHOT</version>
24     <packaging>pom</packaging>
25     <name>ODL :: odlparent :: ${project.artifactId}</name>
26
27     <properties>
28         <!-- Projects can override this to add their own boot feature -->
29         <karaf.localFeature>standard</karaf.localFeature>
30     </properties>
31
32     <dependencyManagement>
33         <dependencies>
34             <dependency>
35                 <groupId>org.apache.karaf.features</groupId>
36                 <artifactId>framework</artifactId>
37                 <version>${karaf4.version}</version>
38                 <type>kar</type>
39             </dependency>
40             <dependency>
41                 <groupId>org.apache.karaf.features</groupId>
42                 <artifactId>framework</artifactId>
43                 <version>${karaf4.version}</version>
44                 <classifier>features</classifier>
45                 <type>xml</type>
46             </dependency>
47             <dependency>
48                 <groupId>org.apache.karaf.features</groupId>
49                 <artifactId>standard</artifactId>
50                 <version>${karaf4.version}</version>
51                 <classifier>features</classifier>
52                 <type>xml</type>
53             </dependency>
54             <dependency>
55                 <groupId>org.apache.karaf.features</groupId>
56                 <artifactId>spring</artifactId>
57                 <version>${karaf4.version}</version>
58                 <classifier>features</classifier>
59                 <type>xml</type>
60             </dependency>
61         </dependencies>
62     </dependencyManagement>
63
64     <dependencies>
65         <dependency>
66             <groupId>org.apache.karaf.features</groupId>
67             <artifactId>framework</artifactId>
68             <type>kar</type>
69         </dependency>
70         <dependency>
71             <groupId>org.apache.karaf.features</groupId>
72             <artifactId>framework</artifactId>
73             <classifier>features</classifier>
74             <type>xml</type>
75             <scope>runtime</scope>
76         </dependency>
77         <dependency>
78             <groupId>org.apache.karaf.features</groupId>
79             <artifactId>standard</artifactId>
80             <classifier>features</classifier>
81             <type>xml</type>
82             <scope>runtime</scope>
83         </dependency>
84         <dependency>
85             <groupId>org.apache.karaf.features</groupId>
86             <artifactId>spring</artifactId>
87             <classifier>features</classifier>
88             <type>xml</type>
89             <scope>runtime</scope>
90         </dependency>
91
92         <!-- ODL Branding -->
93         <dependency>
94             <groupId>org.opendaylight.odlparent</groupId>
95             <artifactId>karaf.branding</artifactId>
96         </dependency>
97         <!-- ODL configuration -->
98         <dependency>
99             <groupId>org.opendaylight.odlparent</groupId>
100             <artifactId>opendaylight-karaf4-resources</artifactId>
101         </dependency>
102     </dependencies>
103
104     <build>
105         <plugins>
106             <plugin>
107                 <artifactId>maven-resources-plugin</artifactId>
108                 <executions>
109                     <execution>
110                         <id>process-resources</id>
111                         <goals>
112                             <goal>resources</goal>
113                         </goals>
114                     </execution>
115                 </executions>
116             </plugin>
117             <plugin>
118                 <artifactId>maven-remote-resources-plugin</artifactId>
119                 <configuration>
120                     <skip>true</skip>
121                 </configuration>
122             </plugin>
123             <plugin>
124                 <groupId>org.apache.maven.plugins</groupId>
125                 <artifactId>maven-dependency-plugin</artifactId>
126                 <executions>
127                     <execution>
128                         <id>copy</id>
129                         <goals>
130                             <goal>copy</goal>
131                         </goals>
132                         <phase>prepare-package</phase>
133                         <configuration>
134                             <artifactItems>
135                                 <artifactItem>
136                                     <groupId>org.opendaylight.odlparent</groupId>
137                                     <artifactId>karaf.branding</artifactId>
138                                     <version>1.8.0-SNAPSHOT</version>
139                                     <outputDirectory>target/assembly/lib</outputDirectory>
140                                     <destFileName>karaf.branding-1.8.0-SNAPSHOT.jar</destFileName>
141                                 </artifactItem>
142                             </artifactItems>
143                         </configuration>
144                     </execution>
145                     <execution>
146                         <id>unpack-karaf-resources</id>
147                         <goals>
148                             <goal>unpack-dependencies</goal>
149                         </goals>
150                         <phase>prepare-package</phase>
151                         <configuration>
152                             <outputDirectory>${project.build.directory}/assembly</outputDirectory>
153                             <groupId>org.opendaylight.odlparent</groupId>
154                             <includeArtifactIds>opendaylight-karaf4-resources</includeArtifactIds>
155                             <excludes>META-INF\/**</excludes>
156                             <excludeTransitive>true</excludeTransitive>
157                             <ignorePermissions>false</ignorePermissions>
158                         </configuration>
159                     </execution>
160                     <execution>
161                         <id>org.ops4j.pax.url.mvn.cfg</id>
162                         <goals>
163                             <goal>copy</goal>
164                         </goals>
165                         <phase>prepare-package</phase>
166                         <configuration>
167                             <artifactItems>
168                                 <artifactItem>
169                                     <groupId>org.opendaylight.odlparent</groupId>
170                                     <artifactId>opendaylight-karaf4-resources</artifactId>
171                                     <type>properties</type>
172                                     <classifier>config</classifier>
173                                     <overWrite>true</overWrite>
174                                     <outputDirectory>${project.build.directory}/assembly/etc/</outputDirectory>
175                                     <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
176                                 </artifactItem>
177                             </artifactItems>
178                             <overWriteReleases>true</overWriteReleases>
179                             <overWriteSnapshots>true</overWriteSnapshots>
180                         </configuration>
181                     </execution>
182                 </executions>
183             </plugin>
184
185             <!-- This needs to execute before patching, otherwise the feature will be left unpatched -->
186             <plugin>
187                 <groupId>org.opendaylight.odlparent</groupId>
188                 <artifactId>karaf4-plugin</artifactId>
189                 <version>1.8.0-SNAPSHOT</version>
190                 <executions>
191                     <execution>
192                         <id>populate-local-repo</id>
193                         <goals>
194                             <goal>populate-local-repo</goal>
195                         </goals>
196                         <configuration>
197                             <localRepo>${project.build.directory}/assembly/system</localRepo>
198                         </configuration>
199                     </execution>
200                 </executions>
201             </plugin>
202             <plugin>
203                 <artifactId>maven-antrun-plugin</artifactId>
204                 <executions>
205                     <execution>
206                         <id>patch-karaf-scripts</id>
207                         <phase>prepare-package</phase>
208                         <goals>
209                             <goal>run</goal>
210                         </goals>
211                         <configuration>
212                             <target>
213                                 <!-- Patches only work with LF line endings from ant -->
214                                 <fixcrlf srcdir="${project.build.directory}/assembly/bin"
215                                          includes="*.bat" eol="lf"/>
216                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-instance.patch"
217                                        originalfile="${project.build.directory}/assembly/bin/instance"
218                                        failonerror="true"/>
219                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-instance.bat.patch"
220                                        originalfile="${project.build.directory}/assembly/bin/instance.bat"
221                                        failonerror="true" ignorewhitespace="true"/>
222                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-karaf.patch"
223                                        originalfile="${project.build.directory}/assembly/bin/karaf"
224                                        failonerror="true"/>
225                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-karaf.bat.patch"
226                                        originalfile="${project.build.directory}/assembly/bin/karaf.bat"
227                                        failonerror="true"/>
228                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-setenv.patch"
229                                        originalfile="${project.build.directory}/assembly/bin/setenv"
230                                        failonerror="true"/>
231                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-setenv.bat.patch"
232                                        originalfile="${project.build.directory}/assembly/bin/setenv.bat"
233                                        failonerror="true"/>
234                                 <patch patchfile="${project.build.directory}/assembly/patches/karaf-quiesce-4.0.7.patch"
235                                        originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/4.0.7/standard-4.0.7-features.xml"
236                                        failonerror="true"/>
237                                 <fixcrlf srcdir="${project.build.directory}/assembly/bin"
238                                          includes="*.bat" eol="crlf"/>
239                             </target>
240                         </configuration>
241                     </execution>
242                 </executions>
243             </plugin>
244             <plugin>
245                 <groupId>org.apache.karaf.tooling</groupId>
246                 <artifactId>karaf-maven-plugin</artifactId>
247                 <version>${karaf4.plugin.version}</version>
248                 <executions>
249                     <execution>
250                         <id>process-resources</id>
251                         <phase>process-resources</phase>
252                         <goals>
253                             <goal>assembly</goal>
254                         </goals>
255                     </execution>
256                     <execution>
257                         <id>package</id>
258                         <goals>
259                             <goal>archive</goal>
260                         </goals>
261                     </execution>
262                 </executions>
263                 <configuration>
264                     <installedFeatures>
265                         <feature>wrapper</feature>
266                     </installedFeatures>
267                     <bootFeatures>
268                         <feature>standard</feature>
269                         <feature>war</feature>
270                         <!-- We load wrap as a workaround to handle old features without the wrap prerequisite -->
271                         <!-- TODO Remove this once all the downstream features are fixed -->
272                         <feature>wrap</feature>
273                         <!-- Local feature if any -->
274                         <feature>${karaf.localFeature}</feature>
275                     </bootFeatures>
276                     <javase>1.8</javase>
277                 </configuration>
278             </plugin>
279         </plugins>
280     </build>
281
282 </project>