BUG-1769: Controller project no longer supports non-karaf distributions. 57/10957/2
authorThomas Bachman <tbachman@yahoo.com>
Tue, 9 Sep 2014 10:00:42 +0000 (10:00 +0000)
committerThomas Bachman <tbachman@yahoo.com>
Tue, 16 Sep 2014 08:46:50 +0000 (08:46 +0000)
This adds a project-local karaf distribution build, so that users can
check out the Group Based Policy and run it with just the controller
build.

Change-Id: Ide0775827bf0951c32b9eefea5c8742c2745d0b0
Signed-off-by: Thomas Bachman <tbachman@yahoo.com>
commons/parent/pom.xml
distribution-karaf/pom.xml [new file with mode: 0644]
features/pom.xml
features/src/main/resources/features.xml
groupbasedpolicy-ofoverlay-config/pom.xml
groupbasedpolicy-ofoverlay-config/src/main/resources/initial/43-openflowjava-nx-api-config.xml [new file with mode: 0644]
groupbasedpolicy-ofoverlay-config/src/main/resources/initial/44-nicira-extension.xml [new file with mode: 0644]
groupbasedpolicy-ofoverlay-config/src/main/resources/initial/44-openflowjava-nx-config.xml [new file with mode: 0644]
pom.xml

index fe2e16735ba60f719e8ae7610b16d9c83b6d6671..29408298fa960aad1aaae8801a59d6b321aff11e 100644 (file)
@@ -22,6 +22,7 @@
     <openflowplugin.distribution.version>0.0.3-SNAPSHOT</openflowplugin.distribution.version>
     <openflowjava.distribution.version>0.5-SNAPSHOT</openflowjava.distribution.version>
     <config.configfile.directory>etc/opendaylight/karaf</config.configfile.directory>
+    <groupbasedpolicy.project.version>0.1.0-SNAPSHOT</groupbasedpolicy.project.version>
     <config.groupbasedpolicy.configfile>15-groupbasedpolicy-ofoverlay.xml</config.groupbasedpolicy.configfile>
   </properties>
 
diff --git a/distribution-karaf/pom.xml b/distribution-karaf/pom.xml
new file mode 100644 (file)
index 0000000..2cfd4df
--- /dev/null
@@ -0,0 +1,260 @@
+<?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">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>groupbasedpolicy.project</artifactId>
+    <groupId>org.opendaylight.groupbasedpolicy</groupId>
+    <version>0.1.0-SNAPSHOT</version>
+    <relativePath>../</relativePath>
+  </parent>
+  <artifactId>distribution-karaf</artifactId>
+  <groupId>org.opendaylight.groupbasedpolicy</groupId>
+  <packaging>pom</packaging>
+  <prerequisites>
+    <maven>3.0</maven>
+  </prerequisites>
+  <properties>
+    <branding.version>1.0.0-SNAPSHOT</branding.version>
+    <karaf.resources.version>1.4.2-SNAPSHOT</karaf.resources.version>
+    <karaf.version>3.0.1</karaf.version>
+  </properties>
+
+  <dependencies>
+    <!-- Basic Karaf 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>
+
+    <!-- ODL Branding -->
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>karaf.branding</artifactId>
+      <version>${branding.version}</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <!-- ODL Resources needed for karaf -->
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>opendaylight-karaf-resources</artifactId>
+      <version>${karaf.resources.version}</version>
+    </dependency>
+
+    <!-- Project local feautures -->
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>features-mdsal</artifactId>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.groupbasedpolicy</groupId>
+      <artifactId>features-groupbasedpolicy</artifactId>
+      <version>${groupbasedpolicy.project.version}</version>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.eclipse.m2e</groupId>
+          <artifactId>lifecycle-mapping</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <lifecycleMappingMetadata>
+              <pluginExecutions>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>maven-bundle-plugin</artifactId>
+                    <versionRange>[0,)</versionRange>
+                    <goals>
+                      <goal>cleanVersions</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore></ignore>
+                  </action>
+                </pluginExecution>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-dependency-plugin</artifactId>
+                    <versionRange>[0,)</versionRange>
+                    <goals>
+                      <goal>copy</goal>
+                      <goal>unpack</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore></ignore>
+                  </action>
+                </pluginExecution>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.karaf.tooling</groupId>
+                    <artifactId>karaf-maven-plugin</artifactId>
+                    <versionRange>[0,)</versionRange>
+                    <goals>
+                      <goal>commands-generate-help</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore></ignore>
+                  </action>
+                </pluginExecution>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.fusesource.scalate</groupId>
+                    <artifactId>maven-scalate-plugin</artifactId>
+                    <versionRange>[0,)</versionRange>
+                    <goals>
+                      <goal>sitegen</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore></ignore>
+                  </action>
+                </pluginExecution>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.servicemix.tooling</groupId>
+                    <artifactId>depends-maven-plugin</artifactId>
+                    <versionRange>[0,)</versionRange>
+                    <goals>
+                      <goal>generate-depends-file</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore></ignore>
+                  </action>
+                </pluginExecution>
+              </pluginExecutions>
+            </lifecycleMappingMetadata>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.karaf.tooling</groupId>
+        <artifactId>karaf-maven-plugin</artifactId>
+        <version>${karaf.version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <bootFeatures>
+            <feature>standard</feature>
+              <feature>standard</feature>
+              <feature>odl-groupbasedpolicy-ofoverlay</feature>
+              <feature>odl-restconf</feature>
+          </bootFeatures>
+        </configuration>
+        <executions>
+          <execution>
+            <id>process-resources</id>
+            <goals>
+              <goal>install-kars</goal>
+            </goals>
+            <phase>process-resources</phase>
+          </execution>
+          <execution>
+            <id>package</id>
+            <goals>
+              <goal>instance-create-archive</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.6</version>
+        <executions>
+          <execution>
+            <id>copy</id>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <phase>generate-resources</phase>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.opendaylight.controller</groupId>
+                  <artifactId>karaf.branding</artifactId>
+                  <version>${karaf.branding.version}</version>
+                  <outputDirectory>target/assembly/lib</outputDirectory>
+                  <destFileName>karaf.branding-${branding.version}.jar</destFileName>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+          <execution>
+            <id>unpack-karaf-resources</id>
+            <goals>
+              <goal>unpack-dependencies</goal>
+            </goals>
+            <phase>prepare-package</phase>
+            <configuration>
+             <outputDirectory>${project.build.directory}/assembly</outputDirectory>
+             <groupId>org.opendaylight.controller</groupId>
+             <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
+             <excludes>META-INF\/**</excludes>
+             <excludeTransitive>true</excludeTransitive>
+             <ignorePermissions>false</ignorePermissions>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+            <execution>
+                <phase>prepare-package</phase>
+                <goals>
+                    <goal>run</goal>
+                </goals>
+                <configuration>
+                  <tasks>
+                    <chmod perm="755">
+                        <fileset dir="${project.build.directory}/assembly/bin">
+                          <include name="karaf" />
+                          <include name="instance" />
+                          <include name="start" />
+                          <include name="stop" />
+                          <include name="status" />
+                          <include name="client" />
+                          <include name="shell" />
+                        </fileset>
+                    </chmod>
+                  </tasks>
+                </configuration>
+            </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <scm>
+    <connection>scm:git:ssh://git.opendaylight.org:29418/groupbasedpolicy.git</connection>
+    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/groupbasedpolicy.git</developerConnection>
+    <tag>HEAD</tag>
+    <url>https://git.opendaylight.org/gerrit/gitweb?p=groupbasedpolicy.git;a=summary</url>
+  </scm>
+</project>
index 724cc5f2ddc3445bf5f9d6ec8847b663a00d2202..ab698a5d8cef67d62ab90feafcd8ac16ed281b7f 100644 (file)
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
       <artifactId>features-yangtools</artifactId>
-      <version>0.6.2-SNAPSHOT</version>
+      <version>${yangtools.version}</version>
       <classifier>features</classifier>
       <type>xml</type>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>features-mdsal</artifactId>
-      <version>1.1-SNAPSHOT</version>
+      <version>${mdsal.version}</version>
       <classifier>features</classifier>
       <type>xml</type>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.openflowplugin</groupId>
       <artifactId>features-openflowplugin</artifactId>
-      <version>0.0.3-SNAPSHOT</version>
+      <version>${openflowplugin.distribution.version}</version>
       <classifier>features</classifier>
       <type>xml</type>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.openflowplugin</groupId>
       <artifactId>features-openflowplugin</artifactId>
-      <version>0.0.3-SNAPSHOT</version>
+      <version>${openflowplugin.distribution.version}</version>
       <classifier>features</classifier>
       <type>xml</type>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.ovsdb</groupId>
       <artifactId>features-openflow-nxm</artifactId>
-      <version>0.0.3-SNAPSHOT</version>
+      <version>${openflowplugin.distribution.version}</version>
       <classifier>features</classifier>
       <type>xml</type>
     </dependency>
index 1cf84de9e65ce6983bba8ad96a2c20733337ce22..605c18cf61f9a86385cb728362d97498448937fe 100644 (file)
 <features name="odl-groupbasedpolicy-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
-    <repository>mvn:org.opendaylight.yangtools/features-yangtools/0.6.2-SNAPSHOT/xml/features</repository>
-    <repository>mvn:org.opendaylight.controller/features-mdsal/1.1-SNAPSHOT/xml/features</repository>
-    <repository>mvn:org.opendaylight.openflowplugin/features-openflowplugin/0.0.3-SNAPSHOT/xml/features</repository>
-    <repository>mvn:org.opendaylight.ovsdb/features-openflow-nxm/0.0.3-SNAPSHOT/xml/features</repository>
+    <repository>mvn:org.opendaylight.yangtools/features-yangtools/${yangtools.version}/xml/features</repository>
+    <repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>
+    <repository>mvn:org.opendaylight.openflowplugin/features-openflowplugin/${openflowplugin.distribution.version}/xml/features</repository>
+    <repository>mvn:org.opendaylight.ovsdb/features-openflow-nxm/${openflowplugin.distribution.version}/xml/features</repository>
     <feature name='odl-groupbasedpolicy-ofoverlay' version='${project.version}' description='OpenDaylight :: groupbasedpolicy :: OpenFlow Overlay '>
         <feature version="${mdsal.version}">odl-mdsal-broker</feature>
-        <feature version='0.6.2-SNAPSHOT'>odl-yangtools-binding</feature>
-        <feature version='0.6.2-SNAPSHOT'>odl-yangtools-models</feature>
+        <feature version='${yangtools.version}'>odl-yangtools-binding</feature>
+        <feature version='${yangtools.version}'>odl-yangtools-models</feature>
         <feature version="${openflowplugin.distribution.version}">odl-openflowplugin-flow-services</feature>
-        <feature version='0.0.3-SNAPSHOT'>odl-openflow-nxm-extensions</feature>
+        <feature version='${openflowplugin.distribution.version}'>odl-openflow-nxm-extensions</feature>
         <bundle>mvn:org.opendaylight.groupbasedpolicy/groupbasedpolicy/${project.version}</bundle>
         <bundle start="true">mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson.version}</bundle>
         <bundle start="true">mvn:com.fasterxml.jackson.core/jackson-core/${jackson.version}</bundle>
index 70dfcef741a9e36a721cdf20489e6c658e61ba90..b3e7f32b0ae61d6349a88a132b85bb30f0fbde41 100644 (file)
                     <type>xml</type>
                     <classifier>config</classifier>
                   </artifact>
+                  <artifact>
+                    <file>${project.build.directory}/classes/initial/43-openflowjava-nx-api-config.xml</file>
+                    <type>xml</type>
+                    <classifier>config-nx-api</classifier>
+                  </artifact>
+                  <artifact>
+                    <file>${project.build.directory}/classes/initial/44-nicira-extension.xml</file>
+                    <type>xml</type>
+                    <classifier>config-nx-ext</classifier>
+                  </artifact>
+                  <artifact>
+                    <file>${project.build.directory}/classes/initial/44-openflowjava-nx-config.xml</file>
+                    <type>xml</type>
+                    <classifier>config-nx-cfg</classifier>
+                  </artifact>
                 </artifacts>
               </configuration>
             </execution>
diff --git a/groupbasedpolicy-ofoverlay-config/src/main/resources/initial/43-openflowjava-nx-api-config.xml b/groupbasedpolicy-ofoverlay-config/src/main/resources/initial/43-openflowjava-nx-api-config.xml
new file mode 100644 (file)
index 0000000..1964e4d
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<snapshot>
+  <required-capabilities>
+    <capability>urn:opendaylight:params:xml:ns:yang:openflowplugin:ofjava:nx:api:config?module=openflowjava-nx-api-config&amp;revision=2014-07-11</capability>
+  </required-capabilities>
+
+  <configuration>
+
+    <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+      <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+        <module>
+          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:openflowplugin:ofjava:nx:api:config">prefix:openflowjava-extension-nicira-api</type>
+          <name>openflowjava-extension-nx-api-bundle</name>
+          <openflow-switch-connection-provider>
+            <type xmlns:ofSwitch="urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider">ofSwitch:openflow-switch-connection-provider</type>
+            <name>openflow-switch-connection-provider-legacy</name>
+          </openflow-switch-connection-provider>
+          <openflow-switch-connection-provider>
+            <type xmlns:ofSwitch="urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider">ofSwitch:openflow-switch-connection-provider</type>
+            <name>openflow-switch-connection-provider-default</name>
+          </openflow-switch-connection-provider>
+        </module>
+      </modules>
+
+      <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+        <service>
+          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:openflowplugin:ofjava:nx:api:config">prefix:nicira-extension-codec-registrator</type>
+          <instance>
+            <name>openflowjava-nicira-ext-registrator</name>
+            <provider>/modules/module[type='openflowjava-extension-nicira-api'][name='openflowjava-extension-nx-api-bundle']</provider>
+          </instance>
+        </service>
+      </services>
+    </data>
+
+  </configuration>
+</snapshot>
diff --git a/groupbasedpolicy-ofoverlay-config/src/main/resources/initial/44-nicira-extension.xml b/groupbasedpolicy-ofoverlay-config/src/main/resources/initial/44-nicira-extension.xml
new file mode 100644 (file)
index 0000000..a5338c0
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright (c) 2014 Cisco Systems, Inc. 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
+-->
+<snapshot>
+  <required-capabilities>
+  <capability>urn:opendaylight:params:xml:ns:yang:openflowplugin:nx:config:impl?module=nicira-extension-impl&amp;revision=2014-07-11</capability>
+    <!-- openflowplugin -->
+    <capability>urn:opendaylight:params:xml:ns:yang:openflow:common:config?module=openflow-provider&amp;revision=2014-03-26</capability>
+  </required-capabilities>
+
+  <configuration>
+
+    <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+      <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+        <module>
+          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:openflowplugin:nx:config:impl">prefix:nicira-extension-provider-impl</type>
+          <name>nicira-extension-provider-default-impl</name>
+
+          <openflow-plugin-provider>
+            <type xmlns:opfprov="urn:opendaylight:params:xml:ns:yang:openflow:common:config">opfprov:openflow-provider</type>
+            <name>openflow-provider</name>
+          </openflow-plugin-provider>
+        </module>
+      </modules>
+    </data>
+
+  </configuration>
+</snapshot>
diff --git a/groupbasedpolicy-ofoverlay-config/src/main/resources/initial/44-openflowjava-nx-config.xml b/groupbasedpolicy-ofoverlay-config/src/main/resources/initial/44-openflowjava-nx-config.xml
new file mode 100644 (file)
index 0000000..756bd15
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<snapshot>
+  <required-capabilities>
+    <capability>urn:opendaylight:params:xml:ns:yang:openflowplugin:ofjava:nx:config?module=openflowjava-nx-config&amp;revision=2014-07-11</capability>
+  </required-capabilities>
+
+  <configuration>
+
+    <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+      <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+        <module>
+          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:openflowplugin:ofjava:nx:config">prefix:openflowjava-extension-nicira</type>
+          <name>openflow-nx-bundle</name>
+          <nicira-extension-codec-registrator>
+            <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:openflowplugin:ofjava:nx:api:config">prefix:nicira-extension-codec-registrator</type>
+            <name>openflowjava-nicira-ext-registrator</name>
+          </nicira-extension-codec-registrator>
+        </module>
+      </modules>
+    </data>
+
+  </configuration>
+</snapshot>
diff --git a/pom.xml b/pom.xml
index 74872a236d4c4776597262e8244e34160bdec397..3eea583ed8fd32d77c2505aaea392f107ec83727 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -18,7 +18,7 @@
     <module>commons/parent</module>
     <module>groupbasedpolicy</module>
     <module>groupbasedpolicy-ofoverlay-config</module>
-    <module>distribution</module>
+    <module>distribution-karaf</module>
     <module>features</module>
   </modules>