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