summaryrefslogtreecommitdiffstats
path: root/examples/examples-onap-vcpe/pom.xml
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@est.tech>2019-10-01 15:32:25 +0100
committera.sreekumar <ajith.sreekumar@est.tech>2019-10-02 11:01:34 +0100
commite578dc0239328dd7e318dbd05616a90bac45cd20 (patch)
tree88b39f58c2cc555f720cd931e8d106286ad022fe /examples/examples-onap-vcpe/pom.xml
parent22d0b57eae979f1a7b3d7bf0dee5f44a0e10cebb (diff)
Add example for creating apex policy in Tosca format
Change-Id: I30e7d162a2aecdfe5c51e920b48d659130ae74e4 Issue-ID: POLICY-2127 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
Diffstat (limited to 'examples/examples-onap-vcpe/pom.xml')
-rw-r--r--examples/examples-onap-vcpe/pom.xml26
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/examples-onap-vcpe/pom.xml b/examples/examples-onap-vcpe/pom.xml
index 89d688dca..fd59094b5 100644
--- a/examples/examples-onap-vcpe/pom.xml
+++ b/examples/examples-onap-vcpe/pom.xml
@@ -33,6 +33,7 @@
<properties>
<policymodel.name>ONAPvCPEPolicyModel</policymodel.name>
+ <toscapolicy.name>ONAPvCPEToscaPolicy</toscapolicy.name>
<apex-domains-onap-vcpe-dir>${project.basedir}/src</apex-domains-onap-vcpe-dir>
</properties>
@@ -123,6 +124,31 @@
</execution>
</executions>
</plugin>
+ <!-- Generate the APEX ToscaPolicy JSON file-->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <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>
+ </executions>
+ </plugin>
</plugins>
</build>