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>3.0.0-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>
23 <groupId>org.apache.karaf.features</groupId>
24 <artifactId>framework</artifactId>
25 <version>${karaf.version}</version>
29 <groupId>org.apache.karaf.features</groupId>
30 <artifactId>standard</artifactId>
31 <version>${karaf.version}</version>
32 <classifier>features</classifier>
34 <scope>runtime</scope>
40 <directory>src/main/resources</directory>
41 <filtering>false</filtering>
46 <artifactId>maven-antrun-plugin</artifactId>
49 <id>patch-karaf-scripts</id>
50 <phase>prepare-package</phase>
56 <!-- Patches only work with LF line endings from ant -->
57 <fixcrlf srcdir="${project.build.directory}/assembly/bin"
58 includes="*.bat" eol="lf"/>
59 <patch patchfile="${project.basedir}/src/main/patches/karaf-instance.patch"
60 originalfile="${project.build.directory}/assembly/bin/instance"
62 <copy file="${project.build.directory}/assembly/bin/instance"
63 tofile="${project.build.directory}/classes/bin/instance"/>
64 <patch patchfile="${project.basedir}/src/main/patches/karaf-instance.bat.patch"
65 originalfile="${project.build.directory}/assembly/bin/instance.bat"
66 failonerror="true" ignorewhitespace="true"/>
67 <copy file="${project.build.directory}/assembly/bin/instance.bat"
68 tofile="${project.build.directory}/classes/bin/instance.bat"/>
69 <patch patchfile="${project.basedir}/src/main/patches/karaf-karaf-${karaf.version}.patch"
70 originalfile="${project.build.directory}/assembly/bin/karaf"
72 <copy file="${project.build.directory}/assembly/bin/karaf"
73 tofile="${project.build.directory}/classes/bin/karaf"/>
74 <patch patchfile="${project.basedir}/src/main/patches/karaf-karaf.bat.patch"
75 originalfile="${project.build.directory}/assembly/bin/karaf.bat"
77 <copy file="${project.build.directory}/assembly/bin/karaf.bat"
78 tofile="${project.build.directory}/classes/bin/karaf.bat"/>
79 <patch patchfile="${project.basedir}/src/main/patches/karaf-setenv-${karaf.version}.patch"
80 originalfile="${project.build.directory}/assembly/bin/setenv"
82 <copy file="${project.build.directory}/assembly/bin/setenv"
83 tofile="${project.build.directory}/classes/bin/setenv"/>
84 <patch patchfile="${project.basedir}/src/main/patches/karaf-setenv.bat.patch"
85 originalfile="${project.build.directory}/assembly/bin/setenv.bat"
87 <copy file="${project.build.directory}/assembly/bin/setenv.bat"
88 tofile="${project.build.directory}/classes/bin/setenv.bat"/>
89 <patch patchfile="${project.basedir}/src/main/patches/karaf-quiesce-${karaf.version}.patch"
90 originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
92 <patch patchfile="${project.basedir}/src/main/patches/karaf-javax-mail-${karaf.version}.patch"
93 originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
95 <copy file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
96 tofile="${project.build.directory}/classes/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"/>
97 <patch patchfile="${project.basedir}/src/main/patches/karaf-paxweb.patch"
98 originalfile="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/4.3.4/pax-web-features-4.3.4-features.xml"
100 <copy file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/4.3.4/pax-web-features-4.3.4-features.xml"
101 tofile="${project.build.directory}/classes/system/org/ops4j/pax/web/pax-web-features/4.3.4/pax-web-features-4.3.4-features.xml"/>
102 <patch patchfile="${project.basedir}/src/main/patches/karaf-etc-startup-properties-${karaf.version}.patch"
103 originalfile="${project.build.directory}/assembly/etc/startup.properties"
105 <echo file="${project.build.directory}/assembly/etc/system.properties" append="true">mvn\:org.osgi/org.osgi.service.event/1.3.1 = 8</echo>
106 <copy file="${project.build.directory}/assembly/etc/startup.properties"
107 tofile="${project.build.directory}/classes/etc/startup.properties"/>
108 <fixcrlf srcdir="${project.build.directory}/classes/bin"
109 includes="*.bat" eol="crlf"/>
116 <groupId>org.apache.maven.plugins</groupId>
117 <artifactId>maven-dependency-plugin</artifactId>
124 <phase>generate-resources</phase>
127 <!-- Needs to be copied to lib/ext in order to start bouncy provider for mina sshd -->
129 <groupId>org.bouncycastle</groupId>
130 <artifactId>bcprov-jdk15on</artifactId>
131 <version>${bouncycastle.version}</version>
132 <outputDirectory>target/classes/lib/ext</outputDirectory>
133 <destFileName>bcprov-jdk15on-${bouncycastle.version}.jar</destFileName>
136 <groupId>org.bouncycastle</groupId>
137 <artifactId>bcprov-ext-jdk15on</artifactId>
138 <version>${bouncycastle.version}</version>
139 <outputDirectory>target/classes/lib/ext</outputDirectory>
140 <destFileName>bcprov-ext-jdk15on-${bouncycastle.version}.jar</destFileName>
143 <groupId>org.bouncycastle</groupId>
144 <artifactId>bcpkix-jdk15on</artifactId>
145 <version>${bouncycastle.version}</version>
146 <outputDirectory>target/classes/lib/ext</outputDirectory>
147 <destFileName>bcpkix-jdk15on-${bouncycastle.version}.jar</destFileName>
155 <groupId>org.codehaus.mojo</groupId>
156 <artifactId>build-helper-maven-plugin</artifactId>
159 <id>attach-artifacts</id>
161 <goal>attach-artifact</goal>
163 <phase>package</phase>
167 <file>src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg</file>
168 <type>properties</type>
169 <classifier>config</classifier>
177 <!-- We do this here only so that we can patch a few files,
178 but we then "throw away" (do not package) most of it,
179 as the karaf4-parent will do this again -->
180 <groupId>org.apache.karaf.tooling</groupId>
181 <artifactId>karaf-maven-plugin</artifactId>
182 <version>${karaf.plugin.version}</version>
185 <id>process-resources</id>
186 <phase>process-resources</phase>
188 <goal>assembly</goal>
193 <!-- This needs to execute before patching, otherwise the feature will be left unpatched -->
195 <groupId>org.opendaylight.odlparent</groupId>
196 <artifactId>karaf-plugin</artifactId>
197 <version>3.0.0-SNAPSHOT</version>
200 <id>populate-local-repo</id>
201 <phase>prepare-package</phase>
203 <goal>populate-local-repo</goal>
206 <localRepo>${project.build.directory}/assembly/system</localRepo>