Added distribution directory
authorEd Warnicke <eaw@cisco.com>
Mon, 5 Aug 2013 04:11:22 +0000 (23:11 -0500)
committerEd Warnicke <eaw@cisco.com>
Wed, 7 Aug 2013 05:51:31 +0000 (00:51 -0500)
- Added a distribution/opendaylight directory
- Modified commons directory to build all modules
- Modified commons directory to use the controller checkstyle

Note: This won't work correctly until
https://git.opendaylight.org/gerrit/#/c/781/ is merged

Note: The Jenkins job should be modified to build commons/
(which will build all submodules).

Change-Id: I64f4721ba65cabcc0c48db6b9f531aa73e266807
Signed-off-by: Ed Warnicke <eaw@cisco.com>
README [new file with mode: 0644]
commons/pom.xml
commons/space_and_tabs_checks.xml [deleted file]
distribution/opendaylight/pom.xml [new file with mode: 0755]
distribution/opendaylight/src/assemble/bin.xml [new file with mode: 0644]

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..1401a99
--- /dev/null
+++ b/README
@@ -0,0 +1,38 @@
+DIRECTORY ORGANIZATION
+======================
+
+- commons: contains the parent pom.xml for all ovsdb projects.
+- ovsdb: contains the ovsdb SB plugin
+- distribution/opendaylight: will build a working controller distribution
+  based on the controller + ovsdb modules
+
+HOW TO BUILD
+============
+
+In order to build it's required to have JDK 1.7+ and Maven 3+, to get
+a build going it's needed to:
+
+cd commons/
+mvn clean install
+
+or if you want to avoid SNAPSHOT checking
+
+cd commons/
+mvn clean install -nsu
+
+HOW TO RUN
+============
+
+Upon successful completion of a build
+
+cd distribution/opendaylight/target/distribution.ovsdb-1.0.0-SNAPSHOT-osgipackage/opendaylight/
+./run.sh
+
+Wait for the osgi console to startup and then point a browser at 
+
+http:localhost:8080/
+
+
+
+
+
index 11a4923c8dbdc87d7001d314b1b61db1f70d4daf..bd66993b1933680b3bf7a7e44b39163299b22360 100755 (executable)
   <artifactId>commons.ovsdb</artifactId>
   <version>1.0.0-SNAPSHOT</version>
   <packaging>pom</packaging>
-
+  <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
+  <scm>
+    <connection>scm:git:https://git.opendaylight.org/gerrit/p/ovsdb.git</connection>
+  </scm>
+  <properties>
+    <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <modules>
+    <module>../ovsdb/</module>
+    <module>../distribution/opendaylight</module>
+  </modules>
   <repositories>
     <!-- jsonrpc4j mirror -->
     <repository>
       <name>central2</name>
       <url>http://nexus.opendaylight.org/content/repositories/central2/</url>
     </pluginRepository>
+    <pluginRepository>
+      <id>opendaylight-snapshot</id>
+      <name>central2</name>
+      <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+    </pluginRepository>
   </pluginRepositories>
 </project>
diff --git a/commons/space_and_tabs_checks.xml b/commons/space_and_tabs_checks.xml
deleted file mode 100755 (executable)
index 49a5802..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>\r
-<!DOCTYPE module PUBLIC\r
-    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"\r
-    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">\r
-\r
-<module name="Checker">\r
-    <module name="FileTabCharacter">\r
-        <property name="eachLine" value="true"/>\r
-    </module>\r
-\r
-    <module name="RegexpSingleline">\r
-        <!-- \s matches whitespace character, $ matches end of line. -->\r
-        <property name="format" value="\s+$"/>\r
-        <property name="message" value="Line has trailing spaces."/>\r
-    </module>\r
-\r
-</module>\r
diff --git a/distribution/opendaylight/pom.xml b/distribution/opendaylight/pom.xml
new file mode 100755 (executable)
index 0000000..15509b8
--- /dev/null
@@ -0,0 +1,88 @@
+<!--
+Adapted from David Erickson's Distribution pom.xml
+see https://git.opendaylight.org/gerrit/#/c/390/
+-->
+<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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.opendaylight.ovsdb</groupId>
+    <artifactId>commons.ovsdb</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <relativePath>../../commons/</relativePath>
+  </parent>
+
+  <artifactId>distribution.ovsdb</artifactId>
+  <packaging>pom</packaging>
+  <name>ovsdb Distribution</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>distribution.opendaylight</artifactId>
+      <version>0.1.0-SNAPSHOT</version>
+      <type>zip</type>
+      <classifier>osgipackage</classifier>
+      <!-- Make sure this isn't included on any classpath-->
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.ovsdb</groupId>
+      <artifactId>ovsdb</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <resources>
+      <resource>
+        <directory>${basedir}/src/main/resources</directory>
+      </resource>
+      <resource>
+        <directory>${project.build.directory}/generated-resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.8</version>
+        <executions>
+          <execution>
+            <id>unpack-shared-resources</id>
+            <goals>
+              <goal>unpack-dependencies</goal>
+            </goals>
+            <phase>generate-resources</phase>
+            <configuration>
+             <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
+             <includeArtifacIds>distribution.opendaylight</includeArtifacIds>
+             <includeGroupIds>org.opendaylight.controller</includeGroupIds>
+             <excludeTransitive>true</excludeTransitive>
+             <ignorePermissions>false</ignorePermissions>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>distro-assembly</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <configuration>
+              <descriptors>
+                <descriptor>src/assemble/bin.xml</descriptor>
+              </descriptors>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/distribution/opendaylight/src/assemble/bin.xml b/distribution/opendaylight/src/assemble/bin.xml
new file mode 100644 (file)
index 0000000..b06e147
--- /dev/null
@@ -0,0 +1,45 @@
+<assembly
+  xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+  <id>osgipackage</id>
+  <formats>
+    <format>dir</format>
+    <format>zip</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <fileSets>
+    <fileSet>
+      <directory>${project.build.directory}/generated-resources</directory>
+      <outputDirectory>/</outputDirectory>
+    </fileSet>
+  </fileSets>
+  <dependencySets>
+    <dependencySet>
+      <outputDirectory>opendaylight/plugins</outputDirectory>
+      <excludes>
+        <exclude>equinoxSDK381:org.eclipse.osgi</exclude>
+        <exclude>equinoxSDK381:org.eclipse.equinox.console</exclude>
+        <exclude>equinoxSDK381:org.eclipse.equinox.launcher</exclude>
+        <exclude>equinoxSDK381:org.eclipse.equinox.ds</exclude>
+        <exclude>equinoxSDK381:org.eclipse.equinox.util</exclude>
+        <exclude>equinoxSDK381:org.eclipse.osgi.services</exclude>
+        <exclude>virgomirror:org.eclipse.jdt.core.compiler.batch</exclude>
+        <exclude>org.apache.felix:org.apache.felix.fileinstall</exclude>
+        <exclude>geminiweb:org.eclipse.virgo.kernel.equinox.extensions</exclude>
+        <exclude>org.slf4j:slf4j-api</exclude>
+        <exclude>ch.qos.logback:logback-core</exclude>
+        <exclude>ch.qos.logback:logback-classic</exclude>
+        <exclude>com.sun.jersey:jersey-core</exclude>
+        <exclude>com.sun.jersey:jersey-json</exclude>
+        <exclude>com.sun.jersey:jersey-server</exclude>
+      </excludes>
+      <outputFileNameMapping>
+        ${artifact.groupId}.${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}
+      </outputFileNameMapping>
+      <unpack>false</unpack>
+      <scope>runtime</scope>
+      <useTransitiveDependencies>false</useTransitiveDependencies>
+    </dependencySet>
+  </dependencySets>
+</assembly>