Add aaa-cli dependency for the distribution
[netvirt.git] / vpnservice / distribution / karaf / pom.xml
index 700df1e923b73e3ff0859c01d38e8f411ff8aa32..697c56144cf5149a319cc2f15078d5a81eabad03 100644 (file)
@@ -8,77 +8,121 @@ 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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <parent>
-    <groupId>org.opendaylight.controller</groupId>
-    <artifactId>karaf-parent</artifactId>
-    <version>1.7.0-SNAPSHOT</version>
+    <groupId>org.opendaylight.odlparent</groupId>
+    <artifactId>karaf4-parent</artifactId>
+    <version>3.0.2</version>
     <relativePath/>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.netvirt</groupId>
   <artifactId>vpnservice-karaf</artifactId>
-  <version>0.3.0-SNAPSHOT</version>
-  <name>${project.artifactId}</name>
-  <prerequisites>
-    <maven>3.1.1</maven>
-  </prerequisites>
+  <version>0.6.0-SNAPSHOT</version>
+  <name>ODL :: netvirt :: ${project.artifactId}</name>
   <properties>
     <!-- <karaf.localFeature>odl-vpnservice-core</karaf.localFeature> -->
   </properties>
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>${project.groupId}</groupId>
-        <artifactId>vpnservice-artifacts</artifactId>
-        <version>${project.version}</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
+
   <dependencies>
     <dependency>
       <!-- scope is compile so all features (there is only one) are installed
       into startup.properties and the feature repo itself is not installed -->
       <groupId>org.apache.karaf.features</groupId>
       <artifactId>framework</artifactId>
+      <version>${karaf.version}</version>
       <type>kar</type>
+      <scope>compile</scope>
     </dependency>
 
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>vpnservice-features</artifactId>
+      <version>${project.version}</version>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+
+    <dependency>
+      <!-- This is here just so that we have the respective bundles for this development debug feature
+           in netvirt's Karaf distribution, and it is easy to do "feature:install odl-mdsal-trace" on
+           test environments to find memory leaks due to non-closed transactions.  This feature is NOT
+           intended for production, and not installed as a boot feature by default.  (If we do not do
+           this, then it's quite a pain/complicated to install this feature onto a non-dev environment
+           on a test server where an ODL binary was installed e.g. from an RPM package, because as is
+           we currently cannot easily, by a simple CLI command, add additional features from new remote
+           repos.)
+       -->
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>features-mdsal-trace</artifactId>
+      <version>1.7.0-SNAPSHOT</version>
       <classifier>features</classifier>
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
+
+    <dependency>
+      <!-- This ensures we have odl-jolokia in the distribution -->
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>features-extras</artifactId>
+      <version>1.10.0-SNAPSHOT</version>
+      <type>xml</type>
+      <classifier>features</classifier>
+      <scope>runtime</scope>
+    </dependency>
+
+    <dependency>
+      <!-- This ensures aaa-cli is available for the copy below -->
+      <groupId>org.opendaylight.aaa</groupId>
+      <artifactId>aaa-cli-jar</artifactId>
+      <version>0.7.0-SNAPSHOT</version>
+      <scope>runtime</scope>
+    </dependency>
   </dependencies>
 
   <build>
     <plugins>
-      <!-- DO NOT deploy the karaf artifact -->
+      <!-- Temporarily deploy the karaf artifact -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-deploy-plugin</artifactId>
         <configuration>
-          <skip>true</skip>
+          <skip>false</skip>
         </configuration>
       </plugin>
+
+      <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</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.opendaylight.aaa</groupId>
+                  <artifactId>aaa-cli-jar</artifactId>
+                  <version>0.7.0-SNAPSHOT</version>
+                </artifactItem>
+              </artifactItems>
+              <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>
 
-  <!--
-      Maven Site Configuration
-
-      The following configuration is necessary for maven-site-plugin to
-      correctly identify the correct deployment path for OpenDaylight Maven
-      sites.
-  -->
-  <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
-
-  <distributionManagement>
-    <site>
-      <id>opendaylight-site</id>
-      <url>${nexus.site.url}/${project.artifactId}/</url>
-    </site>
-  </distributionManagement>
 </project>