Fix apex-pdp packaging issue 51/56751/2
authorramverma <ram.krishna.verma@ericsson.com>
Wed, 18 Jul 2018 15:28:07 +0000 (16:28 +0100)
committerramverma <ram.krishna.verma@ericsson.com>
Wed, 18 Jul 2018 15:53:01 +0000 (16:53 +0100)
Fix apex-pdp packaging issue and add SampleDomain examples to try out
how apex-pdp works.

Change-Id: I4018b0902d06345e86ddbef80100e63232cee49d
Issue-ID: POLICY-861
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
packages/apex-pdp-package-full/pom.xml
pom.xml
testsuites/integration/integration-common/pom.xml

index 2b05807..7bb3a7b 100644 (file)
             <version>${project.version}</version>
         </dependency>
 
+        <!-- Test Data used by examples -->
         <dependency>
-            <groupId>org.onap.policy.apex-pdp.model</groupId>
-            <artifactId>utilities</artifactId>
+            <groupId>org.onap.policy.apex-pdp.context</groupId>
+            <artifactId>context-test-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
+            <artifactId>integration-common</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>
                                 <artifactItem>
                                     <groupId>org.onap.policy.apex-pdp.auth</groupId>
                                     <artifactId>cli-editor</artifactId>
+                                    <version>${project.version}</version>
                                     <type>jar</type>
                                     <overWrite>false</overWrite>
                                     <outputDirectory>${project.build.directory}</outputDirectory>
                                     <includes>etc/**/*,examples/**/*</includes>
                                 </artifactItem>
                                 <artifactItem>
-                                    <groupId>org.onap.policy.apex-pdp.model</groupId>
-                                    <artifactId>utilities</artifactId>
+                                    <groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
+                                    <artifactId>integration-common</artifactId>
+                                    <version>${project.version}</version>
                                     <type>jar</type>
                                     <overWrite>false</overWrite>
-                                    <outputDirectory>${project.build.directory}/etc</outputDirectory>
-                                    <includes>/app-version.txt</includes>
+                                    <outputDirectory>${project.build.directory}</outputDirectory>
+                                    <includes>etc/**/*,examples/**/*</includes>
                                 </artifactItem>
                             </artifactItems>
                             <overWriteReleases>true</overWriteReleases>
diff --git a/pom.xml b/pom.xml
index a07dc79..b983c6c 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                                                 <versionRange>[1.6.0,)</versionRange>
                                                 <goals>
                                                     <goal>java</goal>
+                                                    <goal>exec</goal>
                                                 </goals>
                                             </pluginExecutionFilter>
                                             <action>
index 20be79a..46f913b 100644 (file)
                     </excludes>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>exec-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>generate-models</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>exec</goal>
+                        </goals>
+                        <configuration>
+                            <executable>java</executable>
+                            <classpathScope>test</classpathScope>
+                            <arguments>
+                                <argument>-classpath</argument>
+                                <!-- automatically creates the classpath using all project dependencies, also adding the project build directory -->
+                                <classpath />
+                                <argument>org.onap.policy.apex.test.common.model.SampleDomainModelSaver</argument>
+                                <argument>${project.build.directory}/classes/examples/models/SampleDomain</argument>
+                            </arguments>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>