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