<!--
============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.
<parent>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
<artifactId>examples</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>4.0.0-SNAPSHOT</version>
</parent>
<artifactId>examples-onap-vcpe</artifactId>
<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>
</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>