Add Magnesium ONAP distribution 04/85804/4
authorLuis Gomez <ecelgp@gmail.com>
Fri, 11 Oct 2019 01:42:22 +0000 (18:42 -0700)
committerLuis Gomez <ecelgp@gmail.com>
Wed, 20 Nov 2019 06:12:03 +0000 (22:12 -0800)
See INTDIST-106

Change-Id: I18964341c90a38ce2b98da6db2a585fafffa29d7
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
onap-karaf/pom.xml [new file with mode: 0644]
onap-karaf/src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg [new file with mode: 0644]
onap-karaf/src/main/assembly/etc/shell.init.script [new file with mode: 0644]
pom.xml

diff --git a/onap-karaf/pom.xml b/onap-karaf/pom.xml
new file mode 100644 (file)
index 0000000..00948e4
--- /dev/null
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+    <parent>
+        <groupId>org.opendaylight.odlparent</groupId>
+        <artifactId>karaf4-parent</artifactId>
+        <version>6.0.1</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>org.opendaylight.integration</groupId>
+    <artifactId>onap-karaf</artifactId>
+    <version>0.12.0-SNAPSHOT</version>
+    <name>ODL :: integration :: ${project.artifactId}</name>
+    <modelVersion>4.0.0</modelVersion>
+
+    <description>The ONAP Karaf distribution.</description>
+    <url>https://wiki.opendaylight.org/view/Integration/Distribution</url>
+    <licenses>
+        <license>
+            <name>Eclipse Public License v1.0</name>
+            <url>http://www.eclipse.org/legal/epl-v10.html</url>
+        </license>
+    </licenses>
+
+    <properties>
+        <karaf.archiveZip>false</karaf.archiveZip>
+        <karaf.archiveTarGz>true</karaf.archiveTarGz>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.integration</groupId>
+                <artifactId>all-artifacts</artifactId>
+                <version>${project.version}</version>
+                <scope>import</scope>
+                <type>pom</type>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+
+        <!-- AAA -->
+        <dependency>
+            <groupId>org.opendaylight.aaa</groupId>
+            <artifactId>features-aaa</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <scope>runtime</scope>
+        </dependency>
+
+        <!-- Controller -->
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>features-extras</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>features-mdsal</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>features-mdsal-benchmark</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>features-mdsal-trace</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <scope>runtime</scope>
+        </dependency>
+
+        <!-- Daexim -->
+        <dependency>
+            <groupId>org.opendaylight.daexim</groupId>
+            <artifactId>daexim-features</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <scope>runtime</scope>
+        </dependency>
+
+        <!-- Netconf -->
+        <dependency>
+            <groupId>org.opendaylight.netconf</groupId>
+            <artifactId>features-netconf</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.netconf</groupId>
+            <artifactId>features-netconf-connector</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.netconf</groupId>
+            <artifactId>features-restconf</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.netconf</groupId>
+            <artifactId>features-yanglib</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <scope>runtime</scope>
+        </dependency>
+
+        <!--ODL Parent-->
+        <dependency>
+            <groupId>org.opendaylight.odlparent</groupId>
+            <artifactId>features-odlparent</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.opendaylight.aaa</groupId>
+            <artifactId>aaa-cli-jar</artifactId>
+            <!-- This scope test here is just a trick, so that we can use aaa-cli-jar in maven-dependency-plugin, but don't have karaf-maven-plugin choke on it -->
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-aaa-cli-jar</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/assembly/bin</outputDirectory>
+                            <includeArtifactIds>aaa-cli-jar</includeArtifactIds>
+                            <overWriteReleases>true</overWriteReleases>
+                            <overWriteSnapshots>true</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
+                            <excludeTransitive>true</excludeTransitive>
+                            <!-- Do not include version in JAR filename, as external scripts call this utility,
+                                 and they understandly do not want to have to adjust for every ODL release;
+                                 see e.g. https://github.com/dfarrell07/puppet-opendaylight/pull/140 -->
+                            <stripVersion>true</stripVersion>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+
diff --git a/onap-karaf/src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg b/onap-karaf/src/main/assembly/etc/org.ops4j.pax.url.mvn.cfg
new file mode 100644 (file)
index 0000000..f1958be
--- /dev/null
@@ -0,0 +1,96 @@
+################################################################################
+#
+#    Licensed to the Apache Software Foundation (ASF) under one or more
+#    contributor license agreements.  See the NOTICE file distributed with
+#    this work for additional information regarding copyright ownership.
+#    The ASF licenses this file to You under the Apache License, Version 2.0
+#    (the "License"); you may not use this file except in compliance with
+#    the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+################################################################################
+
+#
+# If set to true, the following property will not allow any certificate to be used
+# when accessing Maven repositories through SSL
+#
+#org.ops4j.pax.url.mvn.certificateCheck=
+
+#
+# Path to the local Maven settings file.
+# The repositories defined in this file will be automatically added to the list
+# of default repositories if the 'org.ops4j.pax.url.mvn.repositories' property
+# below is not set.
+# The following locations are checked for the existence of the settings.xml file
+#   * 1. looks for the specified url
+#   * 2. if not found looks for ${user.home}/.m2/settings.xml
+#   * 3. if not found looks for ${maven.home}/conf/settings.xml
+#   * 4. if not found looks for ${M2_HOME}/conf/settings.xml
+#
+#org.ops4j.pax.url.mvn.settings=
+
+#
+# Path to the local Maven repository which is used to avoid downloading
+# artifacts when they already exist locally.
+# The value of this property will be extracted from the settings.xml file
+# above, or defaulted to:
+#     System.getProperty( "user.home" ) + "/.m2/repository"
+#
+org.ops4j.pax.url.mvn.localRepository=${karaf.home}/${karaf.default.repository}
+
+#
+# Default this to false. It's just weird to use undocumented repos
+#
+org.ops4j.pax.url.mvn.useFallbackRepositories=false
+
+#
+# Uncomment if you don't wanna use the proxy settings
+# from the Maven conf/settings.xml file
+#
+# org.ops4j.pax.url.mvn.proxySupport=false
+
+#
+# Comma separated list of repositories scanned when resolving an artifact.
+# Those repositories will be checked before iterating through the
+#    below list of repositories and even before the local repository
+# A repository url can be appended with zero or more of the following flags:
+#    @snapshots  : the repository contains snaphots
+#    @noreleases : the repository does not contain any released artifacts
+#
+# The following property value will add the system folder as a repo.
+#
+org.ops4j.pax.url.mvn.defaultRepositories=\
+    file:${karaf.home}/${karaf.default.repository}@id=system.repository@snapshots,\
+    file:${karaf.data}/kar@id=kar.repository@multi@snapshots,\
+    file:${karaf.base}/${karaf.default.repository}@id=child.system.repository@snapshots
+
+# Use the default local repo (e.g.~/.m2/repository) as a "remote" repo
+#org.ops4j.pax.url.mvn.defaultLocalRepoAsRemote=false
+
+#
+# Comma separated list of repositories scanned when resolving an artifact.
+# The default list includes the following repositories:
+#    http://repo1.maven.org/maven2@id=central
+#    http://repository.springsource.com/maven/bundles/release@id=spring.ebr
+#    http://repository.springsource.com/maven/bundles/external@id=spring.ebr.external
+#    http://zodiac.springsource.com/maven/bundles/release@id=gemini
+#    http://repository.apache.org/content/groups/snapshots-group@id=apache@snapshots@noreleases
+#    https://oss.sonatype.org/content/repositories/snapshots@id=sonatype.snapshots.deploy@snapshots@noreleases
+#    https://oss.sonatype.org/content/repositories/ops4j-snapshots@id=ops4j.sonatype.snapshots.deploy@snapshots@noreleases
+# To add repositories to the default ones, prepend '+' to the list of repositories
+# to add.
+# A repository url can be appended with zero or more of the following flags:
+#    @snapshots  : the repository contains snapshots
+#    @noreleases : the repository does not contain any released artifacts
+#    @id=repository.id : the id for the repository, just like in the settings.xml this is optional but recommended
+#
+org.ops4j.pax.url.mvn.repositories=
+### ^^^ No remote repositories. This is the only ODL change compared to Karaf defaults.
+
diff --git a/onap-karaf/src/main/assembly/etc/shell.init.script b/onap-karaf/src/main/assembly/etc/shell.init.script
new file mode 100644 (file)
index 0000000..a44ec0c
--- /dev/null
@@ -0,0 +1,67 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+// This script is run each time a shell is created.
+// You can define here closures or variables that will be available
+// in each session.
+//
+ld = { log:display $args } ;
+lde = { log:exception-display $args } ;
+la = { bundle:list -t 0 $args } ;
+ls = { service:list $args } ;
+cl = { config:list "(service.pid=$args)" } ;
+halt = { system:shutdown -h -f $args } ;
+help = { *:help $args | more } ;
+man = { help $args } ;
+log:list = { log:get ALL } ;
+service:get = { $.context getService ($.context getServiceReference $args) };
+
+env = { shell:set $args }
+edit = { shell:nano $args }
+more = { shell:less -F $args }
+
+// \#prompt = { "\e[1m${USER}\e[0m@${APPLICATION}(${SUBSHELL})> "?};
+
+__load_class = {
+  (($.reader class) classLoader) loadClass $1
+}
+
+// make sure that we catch exceptions
+// as they do occur if the session is headless / non-interactive
+jlineReader = $.reader
+if { %(jlineReader != null) } {
+
+  # On 256 colors terminal, add a right prompt
+  max_colors = ($.jline.terminal getNumericCapability max_colors)
+  if { %(max_colors >= 256) } {
+    __rprompt_formatter = (((__load_class java.text.SimpleDateFormat) getConstructor (__load_class java.lang.String)) newInstance \'$'\u001B\[90m'\'HH:mm:ss)
+    __date_class = (__load_class java.util.Date)
+// Do not use right prompt by default
+//    \#rprompt = { $__rprompt_formatter format ($__date_class newInstance) }
+  }
+
+  setopt group
+  setopt auto-fresh-line
+  unsetopt insert-tab
+  keymap "^[OA" up-line-or-search
+  keymap "^[[A" up-line-or-search
+  keymap "^[OB" down-line-or-search
+  keymap "^[[B" down-line-or-search
+
+}
+
diff --git a/pom.xml b/pom.xml
index 0bfa7b0e891fa28f42060596d7a06ba2aee7afa8..61ac2028365b1e4e5594580f17819b0385312f44 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -47,6 +47,7 @@
                 <module>karaf-scripts</module>
                 <module>karaf</module>
                 <module>features</module>
+                <module>onap-karaf</module>
             </modules>
         </profile>
        <profile>