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>4.0.3-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>
47 <directory>src/main/resources</directory>
48 <filtering>false</filtering>
53 <artifactId>maven-antrun-plugin</artifactId>
56 <id>patch-karaf-scripts</id>
57 <phase>prepare-package</phase>
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"
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"
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"
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"
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"
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"
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"
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 <!-- Add startup bundles to startup.properties — order is significant, bundles are wired in declaration order -->
107 <echo file="${project.build.directory}/assembly/etc/startup.properties" append="true">
108 # The following are added by opendaylight-karaf-resources
109 mvn\:org.osgi/org.osgi.service.event/1.3.1 = 7
110 mvn\:org.apache.felix/org.apache.felix.metatype/1.2.0 = 8
111 mvn\:org.bouncycastle/bcprov-jdk15on/${bouncycastle.version} = 14
112 mvn\:org.bouncycastle/bcpkix-jdk15on/${bouncycastle.version} = 14
113 mvn\:org.bouncycastle/bcprov-ext-jdk15on/${bouncycastle.version} = 14
114 mvn\:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0 = 14
116 <copy file="${project.build.directory}/assembly/etc/startup.properties"
117 tofile="${project.build.directory}/classes/etc/startup.properties"/>
118 <fixcrlf srcdir="${project.build.directory}/classes/bin"
119 includes="*.bat" eol="crlf"/>
126 <groupId>org.apache.maven.plugins</groupId>
127 <artifactId>maven-dependency-plugin</artifactId>
134 <phase>generate-resources</phase>
137 <!-- Needs to be copied to lib/ext in order to start bouncy provider for mina sshd -->
139 <groupId>org.bouncycastle</groupId>
140 <artifactId>bcprov-jdk15on</artifactId>
141 <version>${bouncycastle.version}</version>
142 <outputDirectory>target/classes/lib/ext</outputDirectory>
143 <destFileName>bcprov-jdk15on-${bouncycastle.version}.jar</destFileName>
146 <groupId>org.bouncycastle</groupId>
147 <artifactId>bcprov-ext-jdk15on</artifactId>
148 <version>${bouncycastle.version}</version>
149 <outputDirectory>target/classes/lib/ext</outputDirectory>
150 <destFileName>bcprov-ext-jdk15on-${bouncycastle.version}.jar</destFileName>
153 <groupId>org.bouncycastle</groupId>
154 <artifactId>bcpkix-jdk15on</artifactId>
155 <version>${bouncycastle.version}</version>
156 <outputDirectory>target/classes/lib/ext</outputDirectory>
157 <destFileName>bcpkix-jdk15on-${bouncycastle.version}.jar</destFileName>
165 <groupId>org.codehaus.mojo</groupId>
166 <artifactId>build-helper-maven-plugin</artifactId>
169 <id>attach-artifacts</id>
171 <goal>attach-artifact</goal>
173 <phase>package</phase>
177 <file>src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg</file>
178 <type>properties</type>
179 <classifier>config</classifier>
187 <!-- We do this here only so that we can patch a few files,
188 but we then "throw away" (do not package) most of it,
189 as the karaf4-parent will do this again -->
190 <groupId>org.apache.karaf.tooling</groupId>
191 <artifactId>karaf-maven-plugin</artifactId>
192 <version>${karaf.version}</version>
195 <id>process-resources</id>
196 <phase>process-resources</phase>
198 <goal>assembly</goal>
203 <!-- This needs to execute before patching, otherwise the feature will be left unpatched -->
205 <groupId>org.opendaylight.odlparent</groupId>
206 <artifactId>karaf-plugin</artifactId>
207 <version>4.0.3-SNAPSHOT</version>
210 <id>populate-local-repo</id>
211 <phase>prepare-package</phase>
213 <goal>populate-local-repo</goal>
216 <localRepo>${project.build.directory}/assembly/system</localRepo>