diff options
author | liamfallon <liam.fallon@ericsson.com> | 2018-11-06 12:02:46 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@ericsson.com> | 2018-11-07 12:41:09 +0000 |
commit | 53d8916cc60d97e2ce7ae345f8cc25f5602567da (patch) | |
tree | ee2f3a8e543c31993c51a58257354ccffb648dfe /tools/model-generator/pom.xml | |
parent | 9dc414a0cabc9074e87a7c9cd5c3e5ceee733e5a (diff) |
Refactor unit test data
There were many copies of test policies and examples
strewn through the Apex unit tests. This change cleans
up the unit tests so that a single version of all example
policies is used in all tests.
Also added a new relative file root command line parameter
to Apex to allow the root of relative paths in configuration
files to be set.
Apologies for the size of this review but unfortunately
all of this must be done in one shot.
Issue-ID: POLICY-1252
Change-Id: Ibbb18fbf18e3897a1c61301d0a65e62bc643a0e9
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'tools/model-generator/pom.xml')
-rw-r--r-- | tools/model-generator/pom.xml | 73 |
1 files changed, 72 insertions, 1 deletions
diff --git a/tools/model-generator/pom.xml b/tools/model-generator/pom.xml index 0c297bf82..6387eb33d 100644 --- a/tools/model-generator/pom.xml +++ b/tools/model-generator/pom.xml @@ -17,7 +17,8 @@ SPDX-License-Identifier: Apache-2.0 ============LICENSE_END========================================================= --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.onap.policy.apex-pdp.tools</groupId> @@ -63,6 +64,76 @@ </dependency> </dependencies> + <build> + <plugins> + <!-- Copy required resources and examples --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>unpack-examples</id> + <phase>generate-test-resources</phase> + <goals> + <goal>unpack</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId> + <artifactId>integration-common</artifactId> + <version>${project.version}</version> + <type>jar</type> + <overWrite>false</overWrite> + <outputDirectory>${project.build.directory}</outputDirectory> + <includes>examples/**/*</includes> + </artifactItem> + <artifactItem> + <groupId>org.onap.policy.apex-pdp.examples</groupId> + <artifactId>examples-aadm</artifactId> + <version>${project.version}</version> + <type>jar</type> + <overWrite>false</overWrite> + <outputDirectory>${project.build.directory}</outputDirectory> + <includes>examples/**/*</includes> + </artifactItem> + <artifactItem> + <groupId>org.onap.policy.apex-pdp.examples</groupId> + <artifactId>examples-adaptive</artifactId> + <version>${project.version}</version> + <type>jar</type> + <overWrite>false</overWrite> + <outputDirectory>${project.build.directory}</outputDirectory> + <includes>examples/**/*</includes> + </artifactItem> + <artifactItem> + <groupId>org.onap.policy.apex-pdp.examples</groupId> + <artifactId>examples-pcvs</artifactId> + <version>${project.version}</version> + <type>jar</type> + <overWrite>false</overWrite> + <outputDirectory>${project.build.directory}</outputDirectory> + <includes>examples/**/*</includes> + </artifactItem> + <artifactItem> + <groupId>org.onap.policy.apex-pdp.examples</groupId> + <artifactId>examples-myfirstpolicy</artifactId> + <version>${project.version}</version> + <type>jar</type> + <overWrite>false</overWrite> + <outputDirectory>${project.build.directory}</outputDirectory> + <includes>examples/**/*</includes> + </artifactItem> + </artifactItems> + <overWriteReleases>true</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + <profiles> <profile> <id>apexSite</id> |