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>7.0.1-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>
30 <groupId>org.apache.karaf.features</groupId>
31 <artifactId>framework</artifactId>
32 <version>${karaf.version}</version>
36 <groupId>org.apache.karaf.features</groupId>
37 <artifactId>standard</artifactId>
38 <version>${karaf.version}</version>
39 <classifier>features</classifier>
41 <scope>runtime</scope>
44 <!-- BouncyCastle Framework Extension Bundles -->
46 <groupId>org.opendaylight.odlparent</groupId>
47 <artifactId>bcpkix-framework-ext</artifactId>
48 <scope>runtime</scope>
51 <groupId>org.opendaylight.odlparent</groupId>
52 <artifactId>bcprov-framework-ext</artifactId>
53 <scope>runtime</scope>
60 <directory>src/main/resources</directory>
61 <filtering>false</filtering>
66 <artifactId>maven-antrun-plugin</artifactId>
69 <id>patch-karaf-scripts</id>
70 <phase>prepare-package</phase>
76 <!-- Patches only work with LF line endings from ant -->
77 <fixcrlf srcdir="${project.build.directory}/assembly/bin"
78 includes="*.bat" eol="lf"/>
79 <patch patchfile="${project.basedir}/src/main/patches/karaf-instance.patch"
80 originalfile="${project.build.directory}/assembly/bin/instance"
82 <copy file="${project.build.directory}/assembly/bin/instance"
83 tofile="${project.build.directory}/classes/bin/instance"/>
84 <patch patchfile="${project.basedir}/src/main/patches/karaf-instance.bat.patch"
85 originalfile="${project.build.directory}/assembly/bin/instance.bat"
86 failonerror="true" ignorewhitespace="true"/>
87 <copy file="${project.build.directory}/assembly/bin/instance.bat"
88 tofile="${project.build.directory}/classes/bin/instance.bat"/>
89 <patch patchfile="${project.basedir}/src/main/patches/karaf-inc.patch"
90 originalfile="${project.build.directory}/assembly/bin/inc"
92 <copy file="${project.build.directory}/assembly/bin/inc"
93 tofile="${project.build.directory}/classes/bin/inc"/>
94 <patch patchfile="${project.basedir}/src/main/patches/karaf-karaf.patch"
95 originalfile="${project.build.directory}/assembly/bin/karaf"
97 <copy file="${project.build.directory}/assembly/bin/karaf"
98 tofile="${project.build.directory}/classes/bin/karaf"/>
99 <patch patchfile="${project.basedir}/src/main/patches/karaf-karaf.bat.patch"
100 originalfile="${project.build.directory}/assembly/bin/karaf.bat"
102 <copy file="${project.build.directory}/assembly/bin/karaf.bat"
103 tofile="${project.build.directory}/classes/bin/karaf.bat"/>
104 <patch patchfile="${project.basedir}/src/main/patches/karaf-setenv.patch"
105 originalfile="${project.build.directory}/assembly/bin/setenv"
107 <copy file="${project.build.directory}/assembly/bin/setenv"
108 tofile="${project.build.directory}/classes/bin/setenv"/>
109 <patch patchfile="${project.basedir}/src/main/patches/karaf-setenv.bat.patch"
110 originalfile="${project.build.directory}/assembly/bin/setenv.bat"
112 <copy file="${project.build.directory}/assembly/bin/setenv.bat"
113 tofile="${project.build.directory}/classes/bin/setenv.bat"/>
114 <patch patchfile="${project.basedir}/src/main/patches/karaf-quiesce.patch"
115 originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
117 <replace file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
118 token="commons-codec/commons-codec/1.13" value="commons-codec/commons-codec/1.14" failOnNoReplacements="true"/>
119 <replace file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
120 token="javax.annotation/javax.annotation-api/1.3<" value="javax.annotation/javax.annotation-api/1.3.1<" failOnNoReplacements="true"/>
121 <copy file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
122 tofile="${project.build.directory}/classes/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"/>
123 <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"
124 token="commons-codec/commons-codec/1.11" value="commons-codec/commons-codec/1.14" failOnNoReplacements="true"/>
125 <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"
126 token="javax.annotation/javax.annotation-api/1.3<" value="javax.annotation/javax.annotation-api/1.3.1<" failOnNoReplacements="true"/>
127 <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"
128 tofile="${project.build.directory}/classes/system/org/ops4j/pax/web/pax-web-features/7.2.14/pax-web-features-7.2.14-features.xml"/>
129 <!-- Add startup bundles to startup.properties — order is significant, bundles are wired in declaration order -->
130 <echo file="${project.build.directory}/assembly/etc/startup.properties" append="true">
131 # The following are added by opendaylight-karaf-resources
132 mvn\:org.osgi/org.osgi.service.event/1.3.1 = 7
133 mvn\:org.apache.felix/org.apache.felix.metatype/1.2.2 = 8
134 mvn\:org.opendaylight.odlparent/bcprov-framework-ext/${project.version} = 14
135 mvn\:org.opendaylight.odlparent/bcpkix-framework-ext/${project.version} = 14
136 mvn\:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0 = 14
138 <copy file="${project.build.directory}/assembly/etc/startup.properties"
139 tofile="${project.build.directory}/classes/etc/startup.properties"/>
140 <fixcrlf srcdir="${project.build.directory}/classes/bin"
141 includes="*.bat" eol="crlf"/>
148 <groupId>org.apache.maven.plugins</groupId>
149 <artifactId>maven-dependency-plugin</artifactId>
152 <id>copy-framework-extensions</id>
156 <phase>generate-resources</phase>
159 <!-- Needs to be copied to lib/boot in order have it accessible to Main class -->
161 <groupId>org.bouncycastle</groupId>
162 <artifactId>bcprov-ext-jdk15on</artifactId>
163 <version>${bouncycastle.version}</version>
164 <outputDirectory>target/classes/lib/boot</outputDirectory>
165 <destFileName>bcprov-ext-jdk15on-${bouncycastle.version}.jar</destFileName>
168 <groupId>org.bouncycastle</groupId>
169 <artifactId>bcpkix-jdk15on</artifactId>
170 <version>${bouncycastle.version}</version>
171 <outputDirectory>target/classes/lib/boot</outputDirectory>
172 <destFileName>bcpkix-jdk15on-${bouncycastle.version}.jar</destFileName>
175 <silent>true</silent>
181 <groupId>org.codehaus.mojo</groupId>
182 <artifactId>build-helper-maven-plugin</artifactId>
185 <id>attach-artifacts</id>
187 <goal>attach-artifact</goal>
189 <phase>package</phase>
193 <file>src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg</file>
194 <type>properties</type>
195 <classifier>config</classifier>
203 <!-- We do this here only so that we can patch a few files,
204 but we then "throw away" (do not package) most of it,
205 as the karaf4-parent will do this again -->
206 <groupId>org.apache.karaf.tooling</groupId>
207 <artifactId>karaf-maven-plugin</artifactId>
208 <version>${karaf.version}</version>
211 <id>process-resources</id>
212 <phase>process-resources</phase>
214 <goal>assembly</goal>
219 <!-- This needs to execute before patching, otherwise the feature will be left unpatched -->
221 <groupId>org.opendaylight.odlparent</groupId>
222 <artifactId>karaf-plugin</artifactId>
223 <version>7.0.1-SNAPSHOT</version>
226 <id>populate-local-repo</id>
227 <phase>prepare-package</phase>
229 <goal>populate-local-repo</goal>
232 <localRepo>${project.build.directory}/assembly/system</localRepo>