summaryrefslogtreecommitdiffstats
path: root/examples/examples-grpc/pom.xml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/examples-grpc/pom.xml')
-rw-r--r--examples/examples-grpc/pom.xml23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/examples-grpc/pom.xml b/examples/examples-grpc/pom.xml
index b6b0a19a5..df4df5373 100644
--- a/examples/examples-grpc/pom.xml
+++ b/examples/examples-grpc/pom.xml
@@ -33,6 +33,8 @@
<properties>
<policymodel.name>APEXgRPCPolicy</policymodel.name>
<toscapolicy.name>APEXgRPCToscaPolicy</toscapolicy.name>
+ <!-- Update the required node type value for generating a node template -->
+ <nodeType.name>org.onap.nodetypes.policy.MetadataSet</nodeType.name>
</properties>
<dependencies>
<dependency>
@@ -128,6 +130,27 @@
</arguments>
</configuration>
</execution>
+ <!-- Generate Tosca policy with metadataSet reference and a node template json file with policy model -->
+ <execution>
+ <id>generate-tosca-policy-metadataSet</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}.metadataSet.json</argument>
+ <argument>--log-file=${project.build.directory}/${policymodel.name}_policygeneration.log</argument>
+ <argument>--apex-config-file=${project.basedir}/src/main/resources/examples/config/APEXgRPC/ApexConfig.json</argument>
+ <argument>--tosca-template-file=${project.basedir}/src/main/resources/tosca/ToscaTemplate.json</argument>
+ <argument>--node-type=${nodeType.name}</argument>
+ <argument>--output-node-template-file=${project.build.directory}/classes/${toscapolicy.name}.nodeTemplate.json</argument>
+ </arguments>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>