Bump karaf to 4.1.4
[odlparent.git] / karaf / opendaylight-karaf-resources / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Copyright (c) 2014 Cisco Systems, 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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
10   <modelVersion>4.0.0</modelVersion>
11   <parent>
12     <groupId>org.opendaylight.odlparent</groupId>
13     <artifactId>odlparent</artifactId>
14     <version>3.0.3-SNAPSHOT</version>
15     <relativePath>../../odlparent</relativePath>
16   </parent>
17   <artifactId>opendaylight-karaf-resources</artifactId>
18   <description>Resources for opendaylight-karaf</description>
19   <packaging>jar</packaging>
20   <name>ODL :: odlparent :: ${project.artifactId}</name>
21   <properties>
22     <!-- There are a lot of duplicate classes in the dependencies below, but this is not a real issue,
23          because this is not a real Java artifact; it's just packaging.  (TODO: Ideally, this artifact should
24          just have odlparent-lite not odlparent as parent, and not run Java static code analysis tools.)
25       -->
26     <duplicate-finder.skip>true</duplicate-finder.skip>
27   </properties>
28   <dependencies>
29     <dependency>
30       <groupId>org.apache.karaf.features</groupId>
31       <artifactId>framework</artifactId>
32       <version>${karaf.version}</version>
33       <type>kar</type>
34     </dependency>
35     <dependency>
36       <groupId>org.apache.karaf.features</groupId>
37       <artifactId>standard</artifactId>
38       <version>${karaf.version}</version>
39       <classifier>features</classifier>
40       <type>xml</type>
41       <scope>runtime</scope>
42     </dependency>
43   </dependencies>
44   <build>
45     <resources>
46       <resource>
47         <directory>src/main/resources</directory>
48         <filtering>false</filtering>
49       </resource>
50     </resources>
51     <plugins>
52       <plugin>
53         <artifactId>maven-antrun-plugin</artifactId>
54         <executions>
55           <execution>
56             <id>patch-karaf-scripts</id>
57             <phase>prepare-package</phase>
58             <goals>
59               <goal>run</goal>
60             </goals>
61             <configuration>
62               <target>
63                 <!-- Patches only work with LF line endings from ant -->
64                 <fixcrlf srcdir="${project.build.directory}/assembly/bin"
65                          includes="*.bat" eol="lf"/>
66                 <patch patchfile="${project.basedir}/src/main/patches/karaf-instance.patch"
67                        originalfile="${project.build.directory}/assembly/bin/instance"
68                        failonerror="true"/>
69                 <copy file="${project.build.directory}/assembly/bin/instance"
70                       tofile="${project.build.directory}/classes/bin/instance"/>
71                 <patch patchfile="${project.basedir}/src/main/patches/karaf-instance.bat.patch"
72                        originalfile="${project.build.directory}/assembly/bin/instance.bat"
73                        failonerror="true" ignorewhitespace="true"/>
74                 <copy file="${project.build.directory}/assembly/bin/instance.bat"
75                       tofile="${project.build.directory}/classes/bin/instance.bat"/>
76                 <patch patchfile="${project.basedir}/src/main/patches/karaf-inc-${karaf.version}.patch"
77                        originalfile="${project.build.directory}/assembly/bin/inc"
78                        failonerror="true"/>
79                 <copy file="${project.build.directory}/assembly/bin/inc"
80                       tofile="${project.build.directory}/classes/bin/inc"/>
81                 <patch patchfile="${project.basedir}/src/main/patches/karaf-karaf-${karaf.version}.patch"
82                        originalfile="${project.build.directory}/assembly/bin/karaf"
83                        failonerror="true"/>
84                 <copy file="${project.build.directory}/assembly/bin/karaf"
85                       tofile="${project.build.directory}/classes/bin/karaf"/>
86                 <patch patchfile="${project.basedir}/src/main/patches/karaf-karaf.bat.patch"
87                        originalfile="${project.build.directory}/assembly/bin/karaf.bat"
88                        failonerror="true"/>
89                 <copy file="${project.build.directory}/assembly/bin/karaf.bat"
90                       tofile="${project.build.directory}/classes/bin/karaf.bat"/>
91                 <patch patchfile="${project.basedir}/src/main/patches/karaf-setenv-${karaf.version}.patch"
92                        originalfile="${project.build.directory}/assembly/bin/setenv"
93                        failonerror="true"/>
94                 <copy file="${project.build.directory}/assembly/bin/setenv"
95                       tofile="${project.build.directory}/classes/bin/setenv"/>
96                 <patch patchfile="${project.basedir}/src/main/patches/karaf-setenv.bat.patch"
97                        originalfile="${project.build.directory}/assembly/bin/setenv.bat"
98                        failonerror="true"/>
99                 <copy file="${project.build.directory}/assembly/bin/setenv.bat"
100                       tofile="${project.build.directory}/classes/bin/setenv.bat"/>
101                 <patch patchfile="${project.basedir}/src/main/patches/karaf-quiesce-${karaf.version}.patch"
102                        originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
103                        failonerror="true"/>
104                 <patch patchfile="${project.basedir}/src/main/patches/karaf-javax-mail-${karaf.version}.patch"
105                        originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
106                        failonerror="true"/>
107                 <copy file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
108                       tofile="${project.build.directory}/classes/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"/>
109                 <patch patchfile="${project.basedir}/src/main/patches/karaf-paxweb.patch"
110                        originalfile="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/6.0.9/pax-web-features-6.0.9-features.xml"
111                        failonerror="true"/>
112                 <copy file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/6.0.9/pax-web-features-6.0.9-features.xml"
113                       tofile="${project.build.directory}/classes/system/org/ops4j/pax/web/pax-web-features/6.0.9/pax-web-features-6.0.9-features.xml"/>
114                 <!-- Add startup bundles to startup.properties — order is significant, bundles are wired in declaration order -->
115                 <echo file="${project.build.directory}/assembly/etc/startup.properties" append="true">
116 # The following are added by opendaylight-karaf-resources
117 mvn\:org.osgi/org.osgi.service.event/1.3.1 = 7
118 mvn\:org.apache.felix/org.apache.felix.metatype/1.1.6 = 8
119 mvn\:org.bouncycastle/bcprov-jdk15on/1.58 = 14
120 mvn\:org.bouncycastle/bcpkix-jdk15on/1.58 = 14
121 mvn\:org.bouncycastle/bcprov-ext-jdk15on/1.58 = 14
122 mvn\:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0 = 14
123                 </echo>
124                 <copy file="${project.build.directory}/assembly/etc/startup.properties"
125                       tofile="${project.build.directory}/classes/etc/startup.properties"/>
126                 <fixcrlf srcdir="${project.build.directory}/classes/bin"
127                          includes="*.bat" eol="crlf"/>
128               </target>
129             </configuration>
130           </execution>
131         </executions>
132       </plugin>
133       <plugin>
134         <groupId>org.apache.maven.plugins</groupId>
135         <artifactId>maven-dependency-plugin</artifactId>
136         <executions>
137           <execution>
138             <id>copy</id>
139             <goals>
140               <goal>copy</goal>
141             </goals>
142             <phase>generate-resources</phase>
143             <configuration>
144               <artifactItems>
145                 <!-- Needs to be copied to lib/ext in order to start bouncy provider for mina sshd -->
146                 <artifactItem>
147                     <groupId>org.bouncycastle</groupId>
148                     <artifactId>bcprov-jdk15on</artifactId>
149                     <version>${bouncycastle.version}</version>
150                     <outputDirectory>target/classes/lib/ext</outputDirectory>
151                     <destFileName>bcprov-jdk15on-${bouncycastle.version}.jar</destFileName>
152                 </artifactItem>
153                 <artifactItem>
154                     <groupId>org.bouncycastle</groupId>
155                     <artifactId>bcprov-ext-jdk15on</artifactId>
156                     <version>${bouncycastle.version}</version>
157                     <outputDirectory>target/classes/lib/ext</outputDirectory>
158                     <destFileName>bcprov-ext-jdk15on-${bouncycastle.version}.jar</destFileName>
159                 </artifactItem>
160                 <artifactItem>
161                     <groupId>org.bouncycastle</groupId>
162                     <artifactId>bcpkix-jdk15on</artifactId>
163                     <version>${bouncycastle.version}</version>
164                     <outputDirectory>target/classes/lib/ext</outputDirectory>
165                     <destFileName>bcpkix-jdk15on-${bouncycastle.version}.jar</destFileName>
166                 </artifactItem>
167               </artifactItems>
168             </configuration>
169           </execution>
170         </executions>
171       </plugin>
172       <plugin>
173         <groupId>org.codehaus.mojo</groupId>
174         <artifactId>build-helper-maven-plugin</artifactId>
175         <executions>
176           <execution>
177             <id>attach-artifacts</id>
178             <goals>
179               <goal>attach-artifact</goal>
180             </goals>
181             <phase>package</phase>
182             <configuration>
183               <artifacts>
184                 <artifact>
185                   <file>src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg</file>
186                   <type>properties</type>
187                   <classifier>config</classifier>
188                 </artifact>
189               </artifacts>
190             </configuration>
191           </execution>
192         </executions>
193       </plugin>
194       <plugin>
195         <!-- We do this here only so that we can patch a few files,
196              but we then "throw away" (do not package) most of it,
197              as the karaf4-parent will do this again                -->
198         <groupId>org.apache.karaf.tooling</groupId>
199         <artifactId>karaf-maven-plugin</artifactId>
200         <version>${karaf.plugin.version}</version>
201         <executions>
202           <execution>
203             <id>process-resources</id>
204             <phase>process-resources</phase>
205             <goals>
206               <goal>assembly</goal>
207             </goals>
208           </execution>
209       </executions>
210       </plugin>
211       <!-- This needs to execute before patching, otherwise the feature will be left unpatched -->
212       <plugin>
213         <groupId>org.opendaylight.odlparent</groupId>
214         <artifactId>karaf-plugin</artifactId>
215         <version>3.0.3-SNAPSHOT</version>
216         <executions>
217           <execution>
218             <id>populate-local-repo</id>
219             <phase>prepare-package</phase>
220             <goals>
221               <goal>populate-local-repo</goal>
222             </goals>
223             <configuration>
224               <localRepo>${project.build.directory}/assembly/system</localRepo>
225             </configuration>
226           </execution>
227         </executions>
228       </plugin>
229     </plugins>
230   </build>
231 </project>