Update property information for version 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>4.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   </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                 <copy file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
105                       tofile="${project.build.directory}/classes/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"/>
106                 <patch patchfile="${project.basedir}/src/main/patches/karaf-paxweb.patch"
107                        originalfile="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.0.0/pax-web-features-7.0.0-features.xml"
108                        failonerror="true"/>
109                 <copy file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.0.0/pax-web-features-7.0.0-features.xml"
110                       tofile="${project.build.directory}/classes/system/org/ops4j/pax/web/pax-web-features/7.0.0/pax-web-features-7.0.0-features.xml"/>
111                 <!-- Add startup bundles to startup.properties — order is significant, bundles are wired in declaration order -->
112                 <echo file="${project.build.directory}/assembly/etc/startup.properties" append="true">
113 # The following are added by opendaylight-karaf-resources
114 mvn\:org.osgi/org.osgi.service.event/1.3.1 = 7
115 mvn\:org.apache.felix/org.apache.felix.metatype/1.1.6 = 8
116 mvn\:org.bouncycastle/bcprov-jdk15on/${bouncycastle.version} = 14
117 mvn\:org.bouncycastle/bcpkix-jdk15on/${bouncycastle.version} = 14
118 mvn\:org.bouncycastle/bcprov-ext-jdk15on/${bouncycastle.version} = 14
119 mvn\:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0 = 14
120                 </echo>
121                 <copy file="${project.build.directory}/assembly/etc/startup.properties"
122                       tofile="${project.build.directory}/classes/etc/startup.properties"/>
123                 <fixcrlf srcdir="${project.build.directory}/classes/bin"
124                          includes="*.bat" eol="crlf"/>
125               </target>
126             </configuration>
127           </execution>
128         </executions>
129       </plugin>
130       <plugin>
131         <groupId>org.apache.maven.plugins</groupId>
132         <artifactId>maven-dependency-plugin</artifactId>
133         <executions>
134           <execution>
135             <id>copy</id>
136             <goals>
137               <goal>copy</goal>
138             </goals>
139             <phase>generate-resources</phase>
140             <configuration>
141               <artifactItems>
142                 <!-- Needs to be copied to lib/ext in order to start bouncy provider for mina sshd -->
143                 <artifactItem>
144                     <groupId>org.bouncycastle</groupId>
145                     <artifactId>bcprov-jdk15on</artifactId>
146                     <version>${bouncycastle.version}</version>
147                     <outputDirectory>target/classes/lib/ext</outputDirectory>
148                     <destFileName>bcprov-jdk15on-${bouncycastle.version}.jar</destFileName>
149                 </artifactItem>
150                 <artifactItem>
151                     <groupId>org.bouncycastle</groupId>
152                     <artifactId>bcprov-ext-jdk15on</artifactId>
153                     <version>${bouncycastle.version}</version>
154                     <outputDirectory>target/classes/lib/ext</outputDirectory>
155                     <destFileName>bcprov-ext-jdk15on-${bouncycastle.version}.jar</destFileName>
156                 </artifactItem>
157                 <artifactItem>
158                     <groupId>org.bouncycastle</groupId>
159                     <artifactId>bcpkix-jdk15on</artifactId>
160                     <version>${bouncycastle.version}</version>
161                     <outputDirectory>target/classes/lib/ext</outputDirectory>
162                     <destFileName>bcpkix-jdk15on-${bouncycastle.version}.jar</destFileName>
163                 </artifactItem>
164               </artifactItems>
165             </configuration>
166           </execution>
167         </executions>
168       </plugin>
169       <plugin>
170         <groupId>org.codehaus.mojo</groupId>
171         <artifactId>build-helper-maven-plugin</artifactId>
172         <executions>
173           <execution>
174             <id>attach-artifacts</id>
175             <goals>
176               <goal>attach-artifact</goal>
177             </goals>
178             <phase>package</phase>
179             <configuration>
180               <artifacts>
181                 <artifact>
182                   <file>src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg</file>
183                   <type>properties</type>
184                   <classifier>config</classifier>
185                 </artifact>
186               </artifacts>
187             </configuration>
188           </execution>
189         </executions>
190       </plugin>
191       <plugin>
192         <!-- We do this here only so that we can patch a few files,
193              but we then "throw away" (do not package) most of it,
194              as the karaf4-parent will do this again                -->
195         <groupId>org.apache.karaf.tooling</groupId>
196         <artifactId>karaf-maven-plugin</artifactId>
197         <version>${karaf.version}</version>
198         <executions>
199           <execution>
200             <id>process-resources</id>
201             <phase>process-resources</phase>
202             <goals>
203               <goal>assembly</goal>
204             </goals>
205           </execution>
206       </executions>
207       </plugin>
208       <!-- This needs to execute before patching, otherwise the feature will be left unpatched -->
209       <plugin>
210         <groupId>org.opendaylight.odlparent</groupId>
211         <artifactId>karaf-plugin</artifactId>
212         <version>4.0.0-SNAPSHOT</version>
213         <executions>
214           <execution>
215             <id>populate-local-repo</id>
216             <phase>prepare-package</phase>
217             <goals>
218               <goal>populate-local-repo</goal>
219             </goals>
220             <configuration>
221               <localRepo>${project.build.directory}/assembly/system</localRepo>
222             </configuration>
223           </execution>
224         </executions>
225       </plugin>
226     </plugins>
227   </build>
228 </project>