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