summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-27 15:40:13 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-27 15:40:21 +0100
commit3595f7c277778a64d1d828b66ed8127d92c010b5 (patch)
tree099ad9a2bf07c900b4f6402f4338c8c5151c8760
parent2b21188b82e21eb87c4e79a6f31beff9325ab2ea (diff)
Add missing example policy models to install
The policy models for the decision maker, periodic, and vCPE examples were not included in the install because the policy model json files are generated from CLI commands. THis review installs the generated policy models. Issue-ID: POLICY-954 Change-Id: Ie2076ddfb6199dac0c8b272de8d7c47f1652485e Signed-off-by: liamfallon <liam.fallon@ericsson.com>
-rw-r--r--packages/apex-pdp-package-full/pom.xml27
-rw-r--r--tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliMain.java4
2 files changed, 29 insertions, 2 deletions
diff --git a/packages/apex-pdp-package-full/pom.xml b/packages/apex-pdp-package-full/pom.xml
index 070d2d86f..8f788127a 100644
--- a/packages/apex-pdp-package-full/pom.xml
+++ b/packages/apex-pdp-package-full/pom.xml
@@ -336,6 +336,15 @@
</artifactItem>
<artifactItem>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
+ <artifactId>examples-decisionmaker</artifactId>
+ <version>${project.version}</version>
+ <type>jar</type>
+ <overWrite>false</overWrite>
+ <outputDirectory>${project.build.directory}/examples/models/DecisionMaker</outputDirectory>
+ <includes>DecisionMakerPolicyModel.json</includes>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.onap.policy.apex-pdp.examples</groupId>
<artifactId>examples-periodic</artifactId>
<version>${project.version}</version>
<type>jar</type>
@@ -345,6 +354,15 @@
</artifactItem>
<artifactItem>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
+ <artifactId>examples-periodic</artifactId>
+ <version>${project.version}</version>
+ <type>jar</type>
+ <overWrite>false</overWrite>
+ <outputDirectory>${project.build.directory}/examples/models/Periodic</outputDirectory>
+ <includes>PeriodicPolicyModel.json</includes>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.onap.policy.apex-pdp.examples</groupId>
<artifactId>examples-onap-vcpe</artifactId>
<version>${project.version}</version>
<type>jar</type>
@@ -354,6 +372,15 @@
</artifactItem>
<artifactItem>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
+ <artifactId>examples-onap-vcpe</artifactId>
+ <version>${project.version}</version>
+ <type>jar</type>
+ <overWrite>false</overWrite>
+ <outputDirectory>${project.build.directory}/examples/models/ONAPvCPE</outputDirectory>
+ <includes>ONAPvCPEPolicyModel.json</includes>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.onap.policy.apex-pdp.examples</groupId>
<artifactId>examples-servlet</artifactId>
<version>${project.version}</version>
<type>war</type>
diff --git a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliMain.java b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliMain.java
index 5c40b029b..1fd96b9ea 100644
--- a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliMain.java
+++ b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliMain.java
@@ -121,12 +121,12 @@ public final class Model2CliMain {
*/
private String getHelpString(final CliParser cli) {
HelpFormatter formatter = new HelpFormatter();
-
+
final StringWriter helpStringWriter = new StringWriter();
final PrintWriter helpPrintWriter = new PrintWriter(helpStringWriter);
formatter.printHelp(helpPrintWriter, 120, APP_NAME, APP_DESCRIPTION, cli.getOptions(), 2, 4, "");
-
+
return helpStringWriter.toString();
}