Make cli plugins target lib 03/6403/2
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Mon, 31 Jul 2017 07:08:40 +0000 (12:38 +0530)
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Mon, 31 Jul 2017 07:12:47 +0000 (12:42 +0530)
Helps to copy all cli plugins jar into
plugins/target/lib, from here deployment
project will take them.

CLI-21
Change-Id: I52f0a37878f5cd1267f9cf5a1f326a71fb704e79
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
16 files changed:
deployment/pom.xml
main/pom.xml
plugins/msb/pom.xml [moved from plugins/common-service/pom.xml with 78% similarity]
plugins/msb/src/main/java/org/onap/cli/cmd/cs/msb/OnapServiceCreateCommand.java [moved from plugins/common-service/src/main/java/org/onap/cli/cmd/cs/msb/OnapServiceCreateCommand.java with 100% similarity]
plugins/msb/src/main/java/org/onap/cli/cmd/cs/msb/OnapServiceDeleteCommand.java [moved from plugins/common-service/src/main/java/org/onap/cli/cmd/cs/msb/OnapServiceDeleteCommand.java with 100% similarity]
plugins/msb/src/main/java/org/onap/cli/cmd/cs/msb/OnapServiceListCommand.java [moved from plugins/common-service/src/main/java/org/onap/cli/cmd/cs/msb/OnapServiceListCommand.java with 100% similarity]
plugins/msb/src/main/java/org/onap/cli/cmd/cs/msb/OnapServiceShowCommand.java [moved from plugins/common-service/src/main/java/org/onap/cli/cmd/cs/msb/OnapServiceShowCommand.java with 100% similarity]
plugins/msb/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand [moved from plugins/common-service/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand with 100% similarity]
plugins/msb/src/main/resources/microservice-create-schema.yaml [moved from plugins/common-service/src/main/resources/microservice-create-schema.yaml with 100% similarity]
plugins/msb/src/main/resources/microservice-delete-schema.yaml [moved from plugins/common-service/src/main/resources/microservice-delete-schema.yaml with 100% similarity]
plugins/msb/src/main/resources/microservice-list-schema.yaml [moved from plugins/common-service/src/main/resources/microservice-list-schema.yaml with 100% similarity]
plugins/msb/src/main/resources/microservice-show-schema.yaml [moved from plugins/common-service/src/main/resources/microservice-show-schema.yaml with 100% similarity]
plugins/msb/src/test/resources/service-list-schema.yaml [moved from plugins/common-service/src/test/resources/service-list-schema.yaml with 100% similarity]
plugins/msb/src/test/resources/user-create-schema.yaml [moved from plugins/common-service/src/test/resources/user-create-schema.yaml with 100% similarity]
plugins/pom.xml
pom.xml

index b6f32c4..a3191a7 100644 (file)
@@ -79,6 +79,8 @@
                                 "${project.build.directory}/../../main/target/cli-main-${project.version}.jar")
                                 fileset(dir:
                                 "${project.build.directory}/../../main/target/lib/")
+                                fileset(dir:
+                                "${project.build.directory}/../../plugins/target/lib/")
                                 }
 
                                 ant.zip(destfile:
@@ -94,7 +96,7 @@
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>build-helper-maven-plugin</artifactId>
-                               <version>3.0.0</version>
+                <version>3.0.0</version>
                 <executions>
                     <execution>
                         <id>attach-artifacts</id>
index d1bc138..451c55d 100644 (file)
             <artifactId>cli-framework</artifactId>
             <version>${project.parent.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.onap.cli</groupId>
-            <artifactId>cli-plugin-common-service</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
         <dependency>
             <groupId>commons-io</groupId>
             <artifactId>commons-io</artifactId>
similarity index 78%
rename from plugins/common-service/pom.xml
rename to plugins/msb/pom.xml
index 0ca644e..18a76f8 100644 (file)
         <version>1.0.0-SNAPSHOT</version>
     </parent>
 
-    <artifactId>cli-plugin-common-service</artifactId>
-    <name>cli/plugins/common-service</name>
+    <artifactId>cli-plugins-msb</artifactId>
+    <name>cli/plugins/msb</name>
     <packaging>jar</packaging>
+    <build>
+        <plugins>
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-dependency-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>
index ecccc79..93ac3b0 100644 (file)
         <dependency>
             <groupId>org.onap.cli</groupId>
             <artifactId>cli-framework</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
+            <version>${project.parent.version}</version>
         </dependency>
     </dependencies>
     <modules>
-        <module>common-service</module>
+        <module>msb</module>
     </modules>
+     <build>
+         <pluginManagement>
+            <plugins>
+                <plugin>
+                  <groupId>org.apache.maven.plugins</groupId>
+                  <artifactId>maven-dependency-plugin</artifactId>
+                  <executions>
+                    <execution>
+                      <id>copy-artifact</id>
+                      <phase>package</phase>
+                      <goals>
+                        <goal>copy</goal>
+                      </goals>
+                      <configuration>
+                        <artifactItems>
+                            <artifactItem>
+                              <groupId>${project.groupId}</groupId>
+                              <artifactId>${project.artifactId}</artifactId>
+                              <version>${project.version}</version>
+                              <type>${project.packaging}</type>
+                            </artifactItem>
+                        </artifactItems>
+                        <!-- copy to plugin dependencies -->
+                        <outputDirectory>../../plugins/target/lib</outputDirectory>
+                      </configuration>
+                    </execution>
+                  </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
 </project>
diff --git a/pom.xml b/pom.xml
index 162b092..cc36173 100644 (file)
--- a/pom.xml
+++ b/pom.xml
  -->
 <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>
       <groupId>org.onap.oparent</groupId>
       <artifactId>oparent</artifactId>
-      <version>1.0.0-SNAPSHOT</version>    
+      <version>1.0.0-SNAPSHOT</version>
     </parent>
-  
+
     <groupId>org.onap.cli</groupId>
     <artifactId>cli</artifactId>
     <packaging>pom</packaging>