Bump versions to 6.0.5-SNAPSHOT
[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>6.0.5-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
44     <!-- BouncyCastle Framework Extension Bundles -->
45     <dependency>
46       <groupId>org.opendaylight.odlparent</groupId>
47       <artifactId>bcpkix-framework-ext</artifactId>
48       <scope>runtime</scope>
49     </dependency>
50     <dependency>
51       <groupId>org.opendaylight.odlparent</groupId>
52       <artifactId>bcprov-framework-ext</artifactId>
53       <scope>runtime</scope>
54     </dependency>
55   </dependencies>
56
57   <build>
58     <resources>
59       <resource>
60         <directory>src/main/resources</directory>
61         <filtering>false</filtering>
62       </resource>
63     </resources>
64     <plugins>
65       <plugin>
66         <artifactId>maven-antrun-plugin</artifactId>
67         <executions>
68           <execution>
69             <id>patch-karaf-scripts</id>
70             <phase>prepare-package</phase>
71             <goals>
72               <goal>run</goal>
73             </goals>
74             <configuration>
75               <target>
76                 <!-- Patches only work with LF line endings from ant -->
77                 <fixcrlf srcdir="${project.build.directory}/assembly/bin"
78                          includes="*.bat" eol="lf"/>
79                 <patch patchfile="${project.basedir}/src/main/patches/karaf-instance.patch"
80                        originalfile="${project.build.directory}/assembly/bin/instance"
81                        failonerror="true"/>
82                 <replace file="${project.build.directory}/assembly/bin/instance"
83                          token="1.10.2" value="1.10.1" failOnNoReplacements="true"/>
84                 <copy file="${project.build.directory}/assembly/bin/instance"
85                       tofile="${project.build.directory}/classes/bin/instance"/>
86                 <patch patchfile="${project.basedir}/src/main/patches/karaf-instance.bat.patch"
87                        originalfile="${project.build.directory}/assembly/bin/instance.bat"
88                        failonerror="true" ignorewhitespace="true"/>
89                 <replace file="${project.build.directory}/assembly/bin/instance.bat"
90                          token="1.10.2" value="1.10.1" failOnNoReplacements="true"/>
91                 <copy file="${project.build.directory}/assembly/bin/instance.bat"
92                       tofile="${project.build.directory}/classes/bin/instance.bat"/>
93                 <patch patchfile="${project.basedir}/src/main/patches/karaf-inc.patch"
94                        originalfile="${project.build.directory}/assembly/bin/inc"
95                        failonerror="true"/>
96                 <copy file="${project.build.directory}/assembly/bin/inc"
97                       tofile="${project.build.directory}/classes/bin/inc"/>
98                 <patch patchfile="${project.basedir}/src/main/patches/karaf-karaf.patch"
99                        originalfile="${project.build.directory}/assembly/bin/karaf"
100                        failonerror="true"/>
101                 <copy file="${project.build.directory}/assembly/bin/karaf"
102                       tofile="${project.build.directory}/classes/bin/karaf"/>
103                 <patch patchfile="${project.basedir}/src/main/patches/karaf-karaf.bat.patch"
104                        originalfile="${project.build.directory}/assembly/bin/karaf.bat"
105                        failonerror="true"/>
106                 <copy file="${project.build.directory}/assembly/bin/karaf.bat"
107                       tofile="${project.build.directory}/classes/bin/karaf.bat"/>
108                 <replace file="${project.build.directory}/assembly/bin/shell"
109                          token="1.10.2" value="1.10.1" failOnNoReplacements="true"/>
110                 <copy file="${project.build.directory}/assembly/bin/shell"
111                       tofile="${project.build.directory}/classes/bin/shell"/>
112                 <replace file="${project.build.directory}/assembly/bin/shell.bat"
113                          token="1.10.2" value="1.10.1" failOnNoReplacements="true"/>
114                 <copy file="${project.build.directory}/assembly/bin/shell.bat"
115                       tofile="${project.build.directory}/classes/bin/shell.bat"/>
116                 <patch patchfile="${project.basedir}/src/main/patches/karaf-setenv.patch"
117                        originalfile="${project.build.directory}/assembly/bin/setenv"
118                        failonerror="true"/>
119                 <copy file="${project.build.directory}/assembly/bin/setenv"
120                       tofile="${project.build.directory}/classes/bin/setenv"/>
121                 <patch patchfile="${project.basedir}/src/main/patches/karaf-setenv.bat.patch"
122                        originalfile="${project.build.directory}/assembly/bin/setenv.bat"
123                        failonerror="true"/>
124                 <copy file="${project.build.directory}/assembly/bin/setenv.bat"
125                       tofile="${project.build.directory}/classes/bin/setenv.bat"/>
126                 <replace file="${project.build.directory}/assembly/system/org/apache/karaf/features/framework/${karaf.version}/framework-${karaf.version}-features.xml"
127                          token="/1.10.2" value="/1.10.1" failOnNoReplacements="true"/>
128                 <copy file="${project.build.directory}/assembly/system/org/apache/karaf/features/framework/${karaf.version}/framework-${karaf.version}-features.xml"
129                       tofile="${project.build.directory}/classes/system/org/apache/karaf/features/framework/${karaf.version}/framework-${karaf.version}-features.xml"/>
130                 <patch patchfile="${project.basedir}/src/main/patches/karaf-quiesce.patch"
131                        originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
132                        failonerror="true"/>
133                 <replace file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
134                          token="commons-codec/commons-codec/1.12" value="commons-codec/commons-codec/1.13" failOnNoReplacements="true"/>
135                 <!-- fixes https://issues.apache.org/jira/browse/ARIES-1923 -->
136                 <replace file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
137                          token="org.apache.aries.proxy/org.apache.aries.proxy/1.1.4" value="org.apache.aries.proxy/org.apache.aries.proxy/1.1.6" failOnNoReplacements="true"/>
138                 <replace file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
139                          token="org.jolokia/jolokia-osgi/1.6.1" value="org.jolokia/jolokia-osgi/1.6.2" failOnNoReplacements="true"/>
140                 <copy file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
141                       tofile="${project.build.directory}/classes/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"/>
142                 <replace file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.2.10/pax-web-features-7.2.10-features.xml"
143                          token="commons-beanutils/commons-beanutils/1.8.3" value="commons-beanutils/commons-beanutils/1.9.4" failOnNoReplacements="true"/>
144                 <replace file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.2.10/pax-web-features-7.2.10-features.xml"
145                          token="commons-codec/commons-codec/1.11" value="commons-codec/commons-codec/1.13" failOnNoReplacements="true"/>
146                 <copy file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.2.10/pax-web-features-7.2.10-features.xml"
147                       tofile="${project.build.directory}/classes/system/org/ops4j/pax/web/pax-web-features/7.2.10/pax-web-features-7.2.10-features.xml"/>
148                 <replace file="${project.build.directory}/assembly/etc/startup.properties"
149                          token="/1.10.2" value="/1.10.1" failOnNoReplacements="true"/>
150                 <!-- Add startup bundles to startup.properties — order is significant, bundles are wired in declaration order -->
151                 <echo file="${project.build.directory}/assembly/etc/startup.properties" append="true">
152 # The following are added by opendaylight-karaf-resources
153 mvn\:org.osgi/org.osgi.service.event/1.3.1 = 7
154 mvn\:org.apache.felix/org.apache.felix.metatype/1.2.2 = 8
155 mvn\:org.opendaylight.odlparent/bcprov-framework-ext/${project.version} = 14
156 mvn\:org.opendaylight.odlparent/bcpkix-framework-ext/${project.version} = 14
157 mvn\:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0 = 14
158                 </echo>
159                 <copy file="${project.build.directory}/assembly/etc/startup.properties"
160                       tofile="${project.build.directory}/classes/etc/startup.properties"/>
161                 <fixcrlf srcdir="${project.build.directory}/classes/bin"
162                          includes="*.bat" eol="crlf"/>
163               </target>
164             </configuration>
165           </execution>
166         </executions>
167       </plugin>
168       <plugin>
169         <groupId>org.apache.maven.plugins</groupId>
170         <artifactId>maven-dependency-plugin</artifactId>
171         <executions>
172           <execution>
173             <id>copy-framework-extensions</id>
174             <goals>
175               <goal>copy</goal>
176             </goals>
177             <phase>generate-resources</phase>
178             <configuration>
179               <artifactItems>
180                 <!-- Needs to be copied to lib/boot in order have it accessible to Main class -->
181                 <artifactItem>
182                     <groupId>org.bouncycastle</groupId>
183                     <artifactId>bcprov-ext-jdk15on</artifactId>
184                     <version>${bouncycastle.version}</version>
185                     <outputDirectory>target/classes/lib/boot</outputDirectory>
186                     <destFileName>bcprov-ext-jdk15on-${bouncycastle.version}.jar</destFileName>
187                 </artifactItem>
188                 <artifactItem>
189                     <groupId>org.bouncycastle</groupId>
190                     <artifactId>bcpkix-jdk15on</artifactId>
191                     <version>${bouncycastle.version}</version>
192                     <outputDirectory>target/classes/lib/boot</outputDirectory>
193                     <destFileName>bcpkix-jdk15on-${bouncycastle.version}.jar</destFileName>
194                 </artifactItem>
195               </artifactItems>
196               <silent>true</silent>
197             </configuration>
198           </execution>
199         </executions>
200       </plugin>
201       <plugin>
202         <groupId>org.codehaus.mojo</groupId>
203         <artifactId>build-helper-maven-plugin</artifactId>
204         <executions>
205           <execution>
206             <id>attach-artifacts</id>
207             <goals>
208               <goal>attach-artifact</goal>
209             </goals>
210             <phase>package</phase>
211             <configuration>
212               <artifacts>
213                 <artifact>
214                   <file>src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg</file>
215                   <type>properties</type>
216                   <classifier>config</classifier>
217                 </artifact>
218               </artifacts>
219             </configuration>
220           </execution>
221         </executions>
222       </plugin>
223       <plugin>
224         <!-- We do this here only so that we can patch a few files,
225              but we then "throw away" (do not package) most of it,
226              as the karaf4-parent will do this again                -->
227         <groupId>org.apache.karaf.tooling</groupId>
228         <artifactId>karaf-maven-plugin</artifactId>
229         <version>${karaf.version}</version>
230         <executions>
231           <execution>
232             <id>process-resources</id>
233             <phase>process-resources</phase>
234             <goals>
235               <goal>assembly</goal>
236             </goals>
237           </execution>
238       </executions>
239       </plugin>
240       <!-- This needs to execute before patching, otherwise the feature will be left unpatched -->
241       <plugin>
242         <groupId>org.opendaylight.odlparent</groupId>
243         <artifactId>karaf-plugin</artifactId>
244         <version>6.0.5-SNAPSHOT</version>
245         <executions>
246           <execution>
247             <id>populate-local-repo</id>
248             <phase>prepare-package</phase>
249             <goals>
250               <goal>populate-local-repo</goal>
251             </goals>
252             <configuration>
253               <localRepo>${project.build.directory}/assembly/system</localRepo>
254             </configuration>
255           </execution>
256         </executions>
257       </plugin>
258     </plugins>
259   </build>
260 </project>