Update to Apex jmx files
[policy/apex-pdp.git] / examples / examples-onap-vcpe / pom.xml
index d60667b..10ee41d 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   ============LICENSE_START=======================================================
    Copyright (C) 2018 Ericsson. All rights reserved.
-   Copyright (C) 2019 Nordix Foundation.
+   Modifications Copyright (C) 2019-2020 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.onap.policy.apex-pdp.examples</groupId>
         <artifactId>examples</artifactId>
-        <version>2.1.0-SNAPSHOT</version>
+        <version>4.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>examples-onap-vcpe</artifactId>
@@ -33,6 +33,9 @@
 
     <properties>
         <policymodel.name>ONAPvCPEPolicyModel</policymodel.name>
+        <toscapolicy.name>ONAPvCPEToscaPolicy</toscapolicy.name>
+        <policymodelstandalone.name>ONAPvCPEPolicyModelStandalone</policymodelstandalone.name>
+        <toscapolicystandalone.name>ONAPvCPEToscaPolicyStandalone</toscapolicystandalone.name>
         <apex-domains-onap-vcpe-dir>${project.basedir}/src</apex-domains-onap-vcpe-dir>
     </properties>
 
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.glassfish.jersey.containers</groupId>
-            <artifactId>jersey-container-grizzly2-http</artifactId>
-            <version>${version.jersey}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.glassfish.jersey.inject</groupId>
-            <artifactId>jersey-hk2</artifactId>
-            <version>${version.jersey}</version>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
             <artifactId>plugins-context-schema-avro</artifactId>
             <artifactId>events</artifactId>
             <version>${version.policy.models}</version>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>policy-endpoints</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>
         <plugins>
-            <!-- Generate the APEX Policy JSON from the APEX CLI command -->
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>exec-maven-plugin</artifactId>
                 <executions>
+                    <!-- Generate the APEX Policy JSON from the APEX CLI command -->
                     <execution>
                         <id>generate-policy</id>
                         <phase>compile</phase>
                             </arguments>
                         </configuration>
                     </execution>
+                    <!-- Generate the APEX ToscaPolicy JSON file-->
+                    <execution>
+                        <id>generate-tosca-policy</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>java</goal>
+                        </goals>
+                        <configuration>
+                            <mainClass>org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain</mainClass>
+                            <classpathScope>compile</classpathScope>
+                            <arguments>
+                                <argument>--command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex</argument>
+                                <argument>--output-tosca-file=${project.build.directory}/classes/${toscapolicy.name}.json</argument>
+                                <argument>--log-file=${project.build.directory}/${policymodel.name}_policygeneration.log</argument>
+                                <argument>--apex-config-file=${project.basedir}/src/main/resources/examples/config/ONAPvCPE/ApexConfig.json</argument>
+                                <argument>--tosca-template-file=${project.basedir}/src/main/resources/tosca/ToscaTemplate.json</argument>
+                            </arguments>
+                        </configuration>
+                    </execution>
+                    <!-- Generate the Standalone APEX Policy JSON from the APEX CLI command -->
+                    <execution>
+                        <id>generate-standalone-policy</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>java</goal>
+                        </goals>
+                        <configuration>
+                            <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
+                            <classpathScope>compile</classpathScope>
+                            <arguments>
+                                <argument>--command-file=${project.basedir}/src/main/resources/policy/${policymodelstandalone.name}.apex</argument>
+                                <argument>--output-model-file=${project.build.directory}/classes/${policymodelstandalone.name}.json</argument>
+                                <argument>--log-file=${project.build.directory}/${policymodelstandalone.name}_policygeneration.log</argument>
+                                <argument>--working-dir=${project.basedir}</argument>
+                            </arguments>
+                        </configuration>
+                    </execution>
+                    <!-- Generate the standalone APEX ToscaPolicy JSON file-->
+                    <execution>
+                        <id>generate-standalone-tosca-policy</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>java</goal>
+                        </goals>
+                        <configuration>
+                            <mainClass>org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain</mainClass>
+                            <classpathScope>compile</classpathScope>
+                            <arguments>
+                                <argument>--command-file=${project.basedir}/src/main/resources/policy/${policymodelstandalone.name}.apex</argument>
+                                <argument>--output-tosca-file=${project.build.directory}/classes/${toscapolicystandalone.name}.json</argument>
+                                <argument>--log-file=${project.build.directory}/${policymodelstandalone.name}_policygeneration.log</argument>
+                                <argument>--apex-config-file=${project.basedir}/src/main/resources/examples/config/ONAPvCPEStandalone/ApexConfig.json</argument>
+                                <argument>--tosca-template-file=${project.basedir}/src/main/resources/tosca/ToscaTemplate.json</argument>
+                            </arguments>
+                        </configuration>
+                    </execution>
                 </executions>
             </plugin>
         </plugins>
     </build>
-
-    <profiles>
-        <profile>
-            <id>apexSite</id>
-            <activation>
-                <property>
-                    <name>apexSite</name>
-                </property>
-            </activation>
-            <properties>
-                <adsite-examples-onap-vcpe-dir>${project.basedir}/src</adsite-examples-onap-vcpe-dir>
-            </properties>
-            <distributionManagement>
-                <site>
-                    <id>${project.artifactId}-site</id>
-                    <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
-                </site>
-            </distributionManagement>
-        </profile>
-    </profiles>
 </project>