Dmaap client as a karaf feature 83/94983/24
authormanuedelf <emmanuelle.delfour@orange.com>
Tue, 2 Feb 2021 22:14:24 +0000 (23:14 +0100)
committerguillaume.lambert <guillaume.lambert@orange.com>
Thu, 11 Mar 2021 15:51:27 +0000 (16:51 +0100)
- add new maven module in features maven projet
- to override default Dmaap server properties, export following env
variable before starting karaf and installing the feature:
DMAAP_BASE_URL, DMAAP_USERNAME and DMAAP_PASSWORD if authentication is
needed

JIRA: TRNSPRTPCE-394
Signed-off-by: manuedelf <emmanuelle.delfour@orange.com>
Change-Id: Iac9fbde72d0add3b2a211a857a6cfb818508b07e

features/odl-transportpce-dmaap-client/pom.xml [new file with mode: 0644]
features/odl-transportpce-dmaap-client/src/main/feature/feature.xml [new file with mode: 0644]
features/odl-transportpce-dmaap-client/src/main/resources/org.opendaylight.transportpce.dmaap.cfg [new file with mode: 0644]
features/pom.xml
karaf/pom.xml

diff --git a/features/odl-transportpce-dmaap-client/pom.xml b/features/odl-transportpce-dmaap-client/pom.xml
new file mode 100644 (file)
index 0000000..1095400
--- /dev/null
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright © 2021 Orange and others. All rights reserved. This program
+    and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html INTERNAL -->
+<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.opendaylight.odlparent</groupId>
+        <artifactId>single-feature-parent</artifactId>
+        <version>8.1.0</version>
+        <relativePath />
+    </parent>
+    <groupId>org.opendaylight.transportpce</groupId>
+    <artifactId>odl-transportpce-dmaap-client</artifactId>
+    <version>3.0.0-SNAPSHOT</version>
+    <packaging>feature</packaging>
+
+    <name>OpenDaylight :: transportpce :: dmaap-client</name>
+    <properties>
+    <!-- skipped because we are using config file as artifact and it is not installed before running test -->
+        <skip.karaf.featureTest>true</skip.karaf.featureTest>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.transportpce</groupId>
+            <artifactId>odl-transportpce</artifactId>
+            <version>${project.version}</version>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.glassfish.jersey.inject</groupId>
+                    <artifactId>jersey-hk2</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.transportpce</groupId>
+            <artifactId>transportpce-dmaap-client</artifactId>
+            <version>${project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.glassfish.jersey.inject</groupId>
+                    <artifactId>jersey-hk2</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-dmaap-artifact</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>${basedir}/src/main/resources/org.opendaylight.transportpce.dmaap.cfg</file>
+                                    <type>cfg</type>
+                                    <classifier>config</classifier>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file
diff --git a/features/odl-transportpce-dmaap-client/src/main/feature/feature.xml b/features/odl-transportpce-dmaap-client/src/main/feature/feature.xml
new file mode 100644 (file)
index 0000000..0031ef8
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- Copyright © 2021 Orange and others. All rights reserved. This program
+    and the accompanying materials are made available under the terms of the
+    Eclipse Public License v1.0 which accompanies this distribution, and is available
+    at http://www.eclipse.org/legal/epl-v10.html INTERNAL -->
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-transportpce-dmaap-client">
+    <feature name="odl-transportpce-dmaap-client">
+        <configfile finalname="etc/org.opendaylight.transportpce.dmaap.cfg" override="false">
+            mvn:${project.groupId}/${project.artifactId}/${project.version}/cfg/config
+        </configfile>
+    </feature>
+</features>
\ No newline at end of file
diff --git a/features/odl-transportpce-dmaap-client/src/main/resources/org.opendaylight.transportpce.dmaap.cfg b/features/odl-transportpce-dmaap-client/src/main/resources/org.opendaylight.transportpce.dmaap.cfg
new file mode 100644 (file)
index 0000000..db11068
--- /dev/null
@@ -0,0 +1,3 @@
+dmaap.baseUrl=${env:DMAAP_BASE_URL:-http://localhost:8080}
+dmaap.username=${env:DMAAP_USERNAME:+username}
+dmaap.password=${env:DMAAP_PASSWORD:+password}
\ No newline at end of file
index 55992861db6132d790923969b1362212fe68e23b..8434611e9244eacf9e80eadcf22a943c692e0a64 100644 (file)
@@ -27,5 +27,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <module>odl-transportpce-tapi</module>
     <module>odl-transportpce-inventory</module>
     <module>odl-transportpce-nbinotifications</module>
+    <module>odl-transportpce-dmaap-client</module>
   </modules>
 </project>
index fe569f85254b0f302785a3fe9767aaf9e5fb7714..570926de42da0721d9f5699bd9b3130186c09249 100644 (file)
@@ -74,6 +74,14 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>odl-transportpce-dmaap-client</artifactId>
+      <version>${project.version}</version>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
   </dependencies>
 
   <build>