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.0-SNAPSHOT</version>
+ <version>7.0.0-SNAPSHOT</version>
<relativePath>../../odlparent</relativePath>
</parent>
<artifactId>opendaylight-karaf-resources</artifactId>
<packaging>jar</packaging>
<name>ODL :: odlparent :: ${project.artifactId}</name>
<properties>
- <!-- These are used in the instance script and need to be kept in sync with Karaf's definitions -->
- <aries.blueprint.api.version>1.0.1</aries.blueprint.api.version>
- <aries.blueprint.cm.version>1.0.8</aries.blueprint.cm.version>
- <aries.blueprint.core.version>1.6.1</aries.blueprint.core.version>
- <felix.framework.version>4.2.1</felix.framework.version>
- <jline.version>2.13</jline.version>
- <mina.version>2.0.7</mina.version>
- <pax.logging.version>1.8.4</pax.logging.version>
- <slf4j.version>1.7.12</slf4j.version>
- <sshd.version>0.14.0</sshd.version>
+ <!-- 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>
<directory>src/main/resources</directory>
- <filtering>true</filtering>
+ <filtering>false</filtering>
</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"/>
+ <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"/>
+ <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"/>
+ <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"/>
+ <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.13" value="commons-codec/commons-codec/1.14" failOnNoReplacements="true"/>
+ <replace file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
+ token="javax.annotation/javax.annotation-api/1.3<" value="javax.annotation/javax.annotation-api/1.3.1<" 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.14/pax-web-features-7.2.14-features.xml"
+ token="commons-codec/commons-codec/1.11" value="commons-codec/commons-codec/1.14" failOnNoReplacements="true"/>
+ <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"
+ token="javax.annotation/javax.annotation-api/1.3<" value="javax.annotation/javax.annotation-api/1.3.1<" failOnNoReplacements="true"/>
+ <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"
+ tofile="${project.build.directory}/classes/system/org/ops4j/pax/web/pax-web-features/7.2.14/pax-web-features-7.2.14-features.xml"/>
+ <!-- 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>7.0.0-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>