and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<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">
-
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent</artifactId>
- <version>1.9.1-SNAPSHOT</version>
+ <version>6.0.5-SNAPSHOT</version>
<relativePath>../../odlparent</relativePath>
</parent>
<artifactId>opendaylight-karaf-resources</artifactId>
<description>Resources for opendaylight-karaf</description>
<packaging>jar</packaging>
<name>ODL :: odlparent :: ${project.artifactId}</name>
+ <properties>
+ <!-- There are a lot of duplicate classes in the dependencies below, but this is not a real issue,
+ because this is not a real Java artifact; it's just packaging. (TODO: Ideally, this artifact should
+ just have odlparent-lite not odlparent as parent, and not run Java static code analysis tools.)
+ -->
+ <duplicate-finder.skip>true</duplicate-finder.skip>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>framework</artifactId>
+ <version>${karaf.version}</version>
+ <type>kar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>standard</artifactId>
+ <version>${karaf.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- BouncyCastle Framework Extension Bundles -->
+ <dependency>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>bcpkix-framework-ext</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>bcprov-framework-ext</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
<build>
<resources>
<resource>
</resource>
</resources>
<plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>patch-karaf-scripts</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <!-- Patches only work with LF line endings from ant -->
+ <fixcrlf srcdir="${project.build.directory}/assembly/bin"
+ includes="*.bat" eol="lf"/>
+ <patch patchfile="${project.basedir}/src/main/patches/karaf-instance.patch"
+ originalfile="${project.build.directory}/assembly/bin/instance"
+ failonerror="true"/>
+ <replace file="${project.build.directory}/assembly/bin/instance"
+ token="1.10.2" value="1.10.1" failOnNoReplacements="true"/>
+ <copy file="${project.build.directory}/assembly/bin/instance"
+ tofile="${project.build.directory}/classes/bin/instance"/>
+ <patch patchfile="${project.basedir}/src/main/patches/karaf-instance.bat.patch"
+ originalfile="${project.build.directory}/assembly/bin/instance.bat"
+ failonerror="true" ignorewhitespace="true"/>
+ <replace file="${project.build.directory}/assembly/bin/instance.bat"
+ token="1.10.2" value="1.10.1" failOnNoReplacements="true"/>
+ <copy file="${project.build.directory}/assembly/bin/instance.bat"
+ tofile="${project.build.directory}/classes/bin/instance.bat"/>
+ <patch patchfile="${project.basedir}/src/main/patches/karaf-inc.patch"
+ originalfile="${project.build.directory}/assembly/bin/inc"
+ failonerror="true"/>
+ <copy file="${project.build.directory}/assembly/bin/inc"
+ tofile="${project.build.directory}/classes/bin/inc"/>
+ <patch patchfile="${project.basedir}/src/main/patches/karaf-karaf.patch"
+ originalfile="${project.build.directory}/assembly/bin/karaf"
+ failonerror="true"/>
+ <copy file="${project.build.directory}/assembly/bin/karaf"
+ tofile="${project.build.directory}/classes/bin/karaf"/>
+ <patch patchfile="${project.basedir}/src/main/patches/karaf-karaf.bat.patch"
+ originalfile="${project.build.directory}/assembly/bin/karaf.bat"
+ failonerror="true"/>
+ <copy file="${project.build.directory}/assembly/bin/karaf.bat"
+ tofile="${project.build.directory}/classes/bin/karaf.bat"/>
+ <replace file="${project.build.directory}/assembly/bin/shell"
+ token="1.10.2" value="1.10.1" failOnNoReplacements="true"/>
+ <copy file="${project.build.directory}/assembly/bin/shell"
+ tofile="${project.build.directory}/classes/bin/shell"/>
+ <replace file="${project.build.directory}/assembly/bin/shell.bat"
+ token="1.10.2" value="1.10.1" failOnNoReplacements="true"/>
+ <copy file="${project.build.directory}/assembly/bin/shell.bat"
+ tofile="${project.build.directory}/classes/bin/shell.bat"/>
+ <patch patchfile="${project.basedir}/src/main/patches/karaf-setenv.patch"
+ originalfile="${project.build.directory}/assembly/bin/setenv"
+ failonerror="true"/>
+ <copy file="${project.build.directory}/assembly/bin/setenv"
+ tofile="${project.build.directory}/classes/bin/setenv"/>
+ <patch patchfile="${project.basedir}/src/main/patches/karaf-setenv.bat.patch"
+ originalfile="${project.build.directory}/assembly/bin/setenv.bat"
+ failonerror="true"/>
+ <copy file="${project.build.directory}/assembly/bin/setenv.bat"
+ tofile="${project.build.directory}/classes/bin/setenv.bat"/>
+ <replace file="${project.build.directory}/assembly/system/org/apache/karaf/features/framework/${karaf.version}/framework-${karaf.version}-features.xml"
+ token="/1.10.2" value="/1.10.1" failOnNoReplacements="true"/>
+ <copy file="${project.build.directory}/assembly/system/org/apache/karaf/features/framework/${karaf.version}/framework-${karaf.version}-features.xml"
+ tofile="${project.build.directory}/classes/system/org/apache/karaf/features/framework/${karaf.version}/framework-${karaf.version}-features.xml"/>
+ <patch patchfile="${project.basedir}/src/main/patches/karaf-quiesce.patch"
+ originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
+ failonerror="true"/>
+ <replace file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
+ token="commons-codec/commons-codec/1.12" value="commons-codec/commons-codec/1.13" failOnNoReplacements="true"/>
+ <!-- fixes https://issues.apache.org/jira/browse/ARIES-1923 -->
+ <replace file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
+ token="org.apache.aries.proxy/org.apache.aries.proxy/1.1.4" value="org.apache.aries.proxy/org.apache.aries.proxy/1.1.6" failOnNoReplacements="true"/>
+ <replace file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
+ token="org.jolokia/jolokia-osgi/1.6.1" value="org.jolokia/jolokia-osgi/1.6.2" failOnNoReplacements="true"/>
+ <copy file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
+ tofile="${project.build.directory}/classes/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"/>
+ <replace file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.2.10/pax-web-features-7.2.10-features.xml"
+ token="commons-beanutils/commons-beanutils/1.8.3" value="commons-beanutils/commons-beanutils/1.9.4" failOnNoReplacements="true"/>
+ <replace file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.2.10/pax-web-features-7.2.10-features.xml"
+ token="commons-codec/commons-codec/1.11" value="commons-codec/commons-codec/1.13" failOnNoReplacements="true"/>
+ <copy file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.2.10/pax-web-features-7.2.10-features.xml"
+ tofile="${project.build.directory}/classes/system/org/ops4j/pax/web/pax-web-features/7.2.10/pax-web-features-7.2.10-features.xml"/>
+ <replace file="${project.build.directory}/assembly/etc/startup.properties"
+ token="/1.10.2" value="/1.10.1" failOnNoReplacements="true"/>
+ <!-- Add startup bundles to startup.properties — order is significant, bundles are wired in declaration order -->
+ <echo file="${project.build.directory}/assembly/etc/startup.properties" append="true">
+# The following are added by opendaylight-karaf-resources
+mvn\:org.osgi/org.osgi.service.event/1.3.1 = 7
+mvn\:org.apache.felix/org.apache.felix.metatype/1.2.2 = 8
+mvn\:org.opendaylight.odlparent/bcprov-framework-ext/${project.version} = 14
+mvn\:org.opendaylight.odlparent/bcpkix-framework-ext/${project.version} = 14
+mvn\:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0 = 14
+ </echo>
+ <copy file="${project.build.directory}/assembly/etc/startup.properties"
+ tofile="${project.build.directory}/classes/etc/startup.properties"/>
+ <fixcrlf srcdir="${project.build.directory}/classes/bin"
+ includes="*.bat" eol="crlf"/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
- <id>copy</id>
+ <id>copy-framework-extensions</id>
<goals>
<goal>copy</goal>
</goals>
- <!-- here the phase you need -->
<phase>generate-resources</phase>
<configuration>
<artifactItems>
- <!-- Needs to be copied to lib/ext in order to start bouncy provider for mina sshd -->
+ <!-- Needs to be copied to lib/boot in order have it accessible to Main class -->
<artifactItem>
<groupId>org.bouncycastle</groupId>
- <artifactId>bcprov-jdk15on</artifactId>
+ <artifactId>bcprov-ext-jdk15on</artifactId>
<version>${bouncycastle.version}</version>
- <outputDirectory>target/classes/lib/ext</outputDirectory>
- <destFileName>bcprov-jdk15on-${bouncycastle.version}.jar</destFileName>
+ <outputDirectory>target/classes/lib/boot</outputDirectory>
+ <destFileName>bcprov-ext-jdk15on-${bouncycastle.version}.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>${bouncycastle.version}</version>
- <outputDirectory>target/classes/lib/ext</outputDirectory>
+ <outputDirectory>target/classes/lib/boot</outputDirectory>
<destFileName>bcpkix-jdk15on-${bouncycastle.version}.jar</destFileName>
</artifactItem>
</artifactItems>
+ <silent>true</silent>
</configuration>
</execution>
</executions>
</execution>
</executions>
</plugin>
+ <plugin>
+ <!-- We do this here only so that we can patch a few files,
+ but we then "throw away" (do not package) most of it,
+ as the karaf4-parent will do this again -->
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>${karaf.version}</version>
+ <executions>
+ <execution>
+ <id>process-resources</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>assembly</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- This needs to execute before patching, otherwise the feature will be left unpatched -->
+ <plugin>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>karaf-plugin</artifactId>
+ <version>6.0.5-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>populate-local-repo</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>populate-local-repo</goal>
+ </goals>
+ <configuration>
+ <localRepo>${project.build.directory}/assembly/system</localRepo>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>