1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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
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>
12 <groupId>org.opendaylight.odlparent</groupId>
13 <artifactId>odlparent</artifactId>
14 <version>9.0.4-SNAPSHOT</version>
15 <relativePath>../../odlparent</relativePath>
17 <artifactId>opendaylight-karaf-resources</artifactId>
18 <description>Resources for opendaylight-karaf</description>
19 <packaging>jar</packaging>
20 <name>ODL :: odlparent :: ${project.artifactId}</name>
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.)
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>
32 <groupId>org.apache.karaf.features</groupId>
33 <artifactId>framework</artifactId>
34 <version>${karaf.version}</version>
38 <groupId>org.apache.karaf.features</groupId>
39 <artifactId>standard</artifactId>
40 <version>${karaf.version}</version>
41 <classifier>features</classifier>
43 <scope>runtime</scope>
46 <!-- BouncyCastle Framework Extension Bundles -->
48 <groupId>org.opendaylight.odlparent</groupId>
49 <artifactId>bcpkix-framework-ext</artifactId>
50 <scope>runtime</scope>
53 <groupId>org.opendaylight.odlparent</groupId>
54 <artifactId>bcprov-framework-ext</artifactId>
55 <scope>runtime</scope>
58 <groupId>org.opendaylight.odlparent</groupId>
59 <artifactId>bcutil-framework-ext</artifactId>
60 <scope>runtime</scope>
63 <!-- SLF4J logging markers -->
65 <groupId>org.opendaylight.odlparent</groupId>
66 <artifactId>logging-markers</artifactId>
67 <scope>runtime</scope>
74 <directory>src/main/resources</directory>
75 <filtering>false</filtering>
80 <artifactId>maven-antrun-plugin</artifactId>
83 <id>patch-karaf-scripts</id>
84 <phase>prepare-package</phase>
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"
96 <copy file="${project.build.directory}/assembly/bin/instance"
97 tofile="${project.build.directory}/classes/bin/instance"/>
98 <patch patchfile="${project.basedir}/src/main/patches/karaf-instance.bat.patch"
99 originalfile="${project.build.directory}/assembly/bin/instance.bat"
100 failonerror="true" ignorewhitespace="true"/>
101 <copy file="${project.build.directory}/assembly/bin/instance.bat"
102 tofile="${project.build.directory}/classes/bin/instance.bat"/>
103 <patch patchfile="${project.basedir}/src/main/patches/karaf-inc.patch"
104 originalfile="${project.build.directory}/assembly/bin/inc"
106 <copy file="${project.build.directory}/assembly/bin/inc"
107 tofile="${project.build.directory}/classes/bin/inc"/>
108 <patch patchfile="${project.basedir}/src/main/patches/karaf-karaf.patch"
109 originalfile="${project.build.directory}/assembly/bin/karaf"
111 <copy file="${project.build.directory}/assembly/bin/karaf"
112 tofile="${project.build.directory}/classes/bin/karaf"/>
113 <patch patchfile="${project.basedir}/src/main/patches/karaf-karaf.bat.patch"
114 originalfile="${project.build.directory}/assembly/bin/karaf.bat"
116 <copy file="${project.build.directory}/assembly/bin/karaf.bat"
117 tofile="${project.build.directory}/classes/bin/karaf.bat"/>
118 <patch patchfile="${project.basedir}/src/main/patches/karaf-setenv.patch"
119 originalfile="${project.build.directory}/assembly/bin/setenv"
121 <copy file="${project.build.directory}/assembly/bin/setenv"
122 tofile="${project.build.directory}/classes/bin/setenv"/>
123 <patch patchfile="${project.basedir}/src/main/patches/karaf-setenv.bat.patch"
124 originalfile="${project.build.directory}/assembly/bin/setenv.bat"
126 <copy file="${project.build.directory}/assembly/bin/setenv.bat"
127 tofile="${project.build.directory}/classes/bin/setenv.bat"/>
128 <patch patchfile="${project.basedir}/src/main/patches/karaf-quiesce.patch"
129 originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
131 <patch patchfile="${project.basedir}/src/main/patches/karaf-remove-bc.patch"
132 originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
134 <replace file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
135 token="commons-io/commons-io/2.8.0" value="commons-io/commons-io/2.11.0" failOnNoReplacements="true"/>
136 <copy file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
137 tofile="${project.build.directory}/classes/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"/>
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/ops4j/pax/web/pax-web-features/7.3.16/pax-web-features-7.3.16-features.xml"
141 token="javax.annotation/javax.annotation-api/1.3<" value="javax.annotation/javax.annotation-api/1.3.1<" failOnNoReplacements="true"/>
142 <copy file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.3.16/pax-web-features-7.3.16-features.xml"
143 tofile="${project.build.directory}/classes/system/org/ops4j/pax/web/pax-web-features/7.3.16/pax-web-features-7.3.16-features.xml"/>
144 <!-- Add startup bundles to startup.properties — order is significant, bundles are wired in declaration order -->
145 <echo file="${project.build.directory}/assembly/etc/startup.properties" append="true">
146 # The following are added by opendaylight-karaf-resources
147 mvn\:org.osgi/org.osgi.service.event/1.4.0 = 7
148 mvn\:org.apache.felix/org.apache.felix.metatype/1.2.4 = 8
149 mvn\:org.opendaylight.odlparent/bcprov-framework-ext/${project.version} = 14
150 mvn\:org.opendaylight.odlparent/bcutil-framework-ext/${project.version} = 14
151 mvn\:org.opendaylight.odlparent/bcpkix-framework-ext/${project.version} = 14
152 mvn\:org.opendaylight.odlparent/logging-markers/${project.version} = 14
153 mvn\:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0 = 14
155 <copy file="${project.build.directory}/assembly/etc/startup.properties"
156 tofile="${project.build.directory}/classes/etc/startup.properties"/>
157 <replace file="${project.build.directory}/assembly/etc/users.properties"
158 token="#karaf" value="karaf" failOnNoReplacements="true"/>
159 <replace file="${project.build.directory}/assembly/etc/users.properties"
160 token="#_g_" value="_g_" failOnNoReplacements="true"/>
161 <copy file="${project.build.directory}/assembly/etc/users.properties"
162 tofile="${project.build.directory}/classes/etc/users.properties"/>
163 <fixcrlf srcdir="${project.build.directory}/classes/bin"
164 includes="*.bat" eol="crlf"/>
171 <groupId>org.apache.maven.plugins</groupId>
172 <artifactId>maven-dependency-plugin</artifactId>
175 <id>copy-framework-extensions</id>
179 <phase>generate-resources</phase>
182 <!-- Needs to be copied to lib/boot in order have it accessible to Main class -->
184 <groupId>org.bouncycastle</groupId>
185 <artifactId>bcprov-ext-jdk15on</artifactId>
186 <version>${bouncycastle.version}</version>
187 <outputDirectory>target/classes/lib/boot</outputDirectory>
188 <destFileName>bcprov-ext-jdk15on-${bouncycastle.version}.jar</destFileName>
191 <groupId>org.bouncycastle</groupId>
192 <artifactId>bcpkix-jdk15on</artifactId>
193 <version>${bouncycastle.version}</version>
194 <outputDirectory>target/classes/lib/boot</outputDirectory>
195 <destFileName>bcpkix-jdk15on-${bouncycastle.version}.jar</destFileName>
198 <silent>true</silent>
204 <groupId>org.codehaus.mojo</groupId>
205 <artifactId>build-helper-maven-plugin</artifactId>
208 <id>attach-artifacts</id>
210 <goal>attach-artifact</goal>
212 <phase>package</phase>
216 <file>src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg</file>
217 <type>properties</type>
218 <classifier>config</classifier>
226 <!-- We do this here only so that we can patch a few files,
227 but we then "throw away" (do not package) most of it,
228 as the karaf4-parent will do this again -->
229 <groupId>org.apache.karaf.tooling</groupId>
230 <artifactId>karaf-maven-plugin</artifactId>
231 <version>${karaf.version}</version>
234 <id>process-resources</id>
235 <phase>process-resources</phase>
237 <goal>assembly</goal>
242 <!-- This needs to execute before patching, otherwise the feature will be left unpatched -->
244 <groupId>org.opendaylight.odlparent</groupId>
245 <artifactId>karaf-plugin</artifactId>
246 <version>9.0.4-SNAPSHOT</version>
249 <id>populate-local-repo</id>
250 <phase>prepare-package</phase>
252 <goal>populate-local-repo</goal>
255 <localRepo>${project.build.directory}/assembly/system</localRepo>