Clean up eclipse and document warnings 51/72351/3
authorliamfallon <liam.fallon@ericsson.com>
Sat, 10 Nov 2018 00:39:12 +0000 (00:39 +0000)
committerliamfallon <liam.fallon@ericsson.com>
Mon, 12 Nov 2018 11:07:31 +0000 (11:07 +0000)
Parent versions in some POMs only called on the test profile
were incorrect
Warnings in Eclipse on POM including from outside its project
are fixed
Some checkstyle fixes
Some javadoc warnings fixed

Issue-ID: POLICY-954
Change-Id: I640bc842dc79a9fa580015abb9a76c84a7845efe
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
16 files changed:
client/client-common/pom.xml
client/client-common/src/main/assembly/assembly.xml [deleted file]
client/client-deployment/pom.xml
client/client-editor/pom.xml
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/ApexEditorRestResource.java
client/client-full/pom.xml
client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestMain.java
client/client-monitoring/pom.xml
packages/apex-pdp-package-full/pom.xml
pom.xml
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineWorkerTest.java
testsuites/integration/integration-context-test/pom.xml
testsuites/integration/integration-uservice-test/pom.xml
testsuites/performance/performance-benchmark-test/pom.xml
testsuites/performance/performance-context-metrics/pom.xml
tools/model-generator/pom.xml

index 7c679ad..92174c8 100644 (file)
     </parent>
 
     <artifactId>client-common</artifactId>
-    <packaging>pom</packaging>
+    <packaging>jar</packaging>
     <name>${project.artifactId}</name>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>make shared resources</id>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <phase>package</phase>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/assembly.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
     <profiles>
         <profile>
             <id>apexSite</id>
diff --git a/client/client-common/src/main/assembly/assembly.xml b/client/client-common/src/main/assembly/assembly.xml
deleted file mode 100644 (file)
index ddc56e5..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
-  ============LICENSE_START=======================================================
-   Copyright (C) 2016-2018 Ericsson. All rights reserved.
-  ================================================================================
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-  
-       http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  
-  SPDX-License-Identifier: Apache-2.0
-  ============LICENSE_END=========================================================
--->
-<assembly>
-    <id>resources</id>
-    <formats>
-        <format>zip</format>
-    </formats>
-    <includeBaseDirectory>false</includeBaseDirectory>
-    <fileSets>
-        <fileSet>
-            <directory>src/main/resources</directory>
-            <outputDirectory></outputDirectory>
-        </fileSet>
-    </fileSets>
-</assembly>
\ No newline at end of file
index 41e0e05..02ecb4a 100644 (file)
@@ -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.client</groupId>
@@ -39,9 +40,6 @@
             <groupId>org.onap.policy.apex-pdp.client</groupId>
             <artifactId>client-common</artifactId>
             <version>${project.version}</version>
-            <classifier>resources</classifier>
-            <type>zip</type>
-            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.glassfish.jersey.containers</groupId>
         <defaultGoal>install</defaultGoal>
         <outputDirectory>${project.build.directory}/classes</outputDirectory>
         <plugins>
+             <!-- Copy common resources to this client's webapp directory -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>unpack-client-deployment-shared-resources-war</id>
-                        <goals>
-                            <goal>unpack-dependencies</goal>
-                        </goals>
+                        <id>unpack-examples</id>
                         <phase>validate</phase>
-                        <configuration>
-                            <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
-                            <includeArtifacIds>client-common</includeArtifacIds>
-                            <includeGroupIds>${project.groupId}</includeGroupIds>
-                            <excludeTransitive>true</excludeTransitive>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy-common-resources-to-jar</id>
-                        <phase>initialize</phase>
                         <goals>
-                            <goal>copy-resources</goal>
+                            <goal>unpack</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
-                            <filtering>false</filtering>
-                            <resources>
-                                <resource>
-                                    <directory>../client-common/src/main/resources</directory>
-                                </resource>
-                            </resources>
-                            <overwrite>true</overwrite>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>copy-local-resources-to-jar</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>copy-resources</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
-                            <filtering>false</filtering>
-                            <resources>
-                                <resource>
-                                    <directory>src/main/resources/webapp</directory>
-                                </resource>
-                            </resources>
-                            <overwrite>true</overwrite>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.onap.policy.apex-pdp.client</groupId>
+                                    <artifactId>client-common</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>jar</type>
+                                    <overWrite>false</overWrite>
+                                    <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
+                                    <excludes>META-INF/</excludes>
+                                </artifactItem>
+                            </artifactItems>
+                            <overWriteReleases>true</overWriteReleases>
+                            <overWriteSnapshots>true</overWriteSnapshots>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
                         </filter>
                     </filters>
                     <transformers>
-                        <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
-                        <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                        <transformer
+                            implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
+                        <transformer
+                            implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                             <resource>reference.conf</resource>
                         </transformer>
-                        <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
+                        <transformer
+                            implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                             <resource>log4j.properties</resource>
                         </transformer>
-                        <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                        <transformer
+                            implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                             <mainClass>org.onap.policy.apex.client.deployment.rest.ApexDeploymentRestMain</mainClass>
                         </transformer>
                     </transformers>
     </build>
 
     <profiles>
+        <profile>
+            <id>only-eclipse</id>
+            <activation>
+                <property>
+                    <name>m2e.version</name>
+                </property>
+            </activation>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.eclipse.m2e</groupId>
+                            <artifactId>lifecycle-mapping</artifactId>
+                            <version>1.0.0</version>
+                            <configuration>
+                                <lifecycleMappingMetadata>
+                                    <pluginExecutions>
+                                        <pluginExecution>
+                                            <pluginExecutionFilter>
+                                                <groupId>org.apache.maven.plugins</groupId>
+                                                <artifactId>maven-dependency-plugin</artifactId>
+                                                <versionRange>[2.0,)</versionRange>
+                                                <goals>
+                                                    <goal>unpack</goal>
+                                                </goals>
+                                            </pluginExecutionFilter>
+                                            <action>
+                                                <ignore />
+                                            </action>
+                                        </pluginExecution>
+                                    </pluginExecutions>
+                                </lifecycleMappingMetadata>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
         <profile>
             <id>apexSite</id>
             <activation>
index 47ce007..4bae101 100644 (file)
@@ -48,9 +48,6 @@
             <groupId>org.onap.policy.apex-pdp.client</groupId>
             <artifactId>client-common</artifactId>
             <version>${project.version}</version>
-            <classifier>resources</classifier>
-            <type>zip</type>
-            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.glassfish.jersey.containers</groupId>
         <defaultGoal>install</defaultGoal>
         <outputDirectory>${project.build.directory}/classes</outputDirectory>
         <plugins>
+             <!-- Copy common resources to this client's webapp directory -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>unpack-client-editor-shared-resources</id>
-                        <goals>
-                            <goal>unpack-dependencies</goal>
-                        </goals>
+                        <id>unpack-examples</id>
                         <phase>validate</phase>
-                        <configuration>
-                            <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
-                            <includeArtifacIds>client-common</includeArtifacIds>
-                            <includeGroupIds>${project.groupId}</includeGroupIds>
-                            <excludeTransitive>true</excludeTransitive>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy-common-resources-to-jar</id>
-                        <phase>initialize</phase>
                         <goals>
-                            <goal>copy-resources</goal>
+                            <goal>unpack</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
-                            <filtering>false</filtering>
-                            <resources>
-                                <resource>
-                                    <directory>../client-common/src/main/resources</directory>
-                                </resource>
-                            </resources>
-                            <overwrite>true</overwrite>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>copy-local-resources-to-jar</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>copy-resources</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
-                            <filtering>false</filtering>
-                            <resources>
-                                <resource>
-                                    <directory>src/main/resources/webapp</directory>
-                                </resource>
-                            </resources>
-                            <overwrite>true</overwrite>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.onap.policy.apex-pdp.client</groupId>
+                                    <artifactId>client-common</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>jar</type>
+                                    <overWrite>false</overWrite>
+                                    <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
+                                    <excludes>META-INF/</excludes>
+                                    <excludes>webapp/css/styles.css, webapp/css/interfaceAssets.css</excludes>
+                                </artifactItem>
+                            </artifactItems>
+                            <overWriteReleases>true</overWriteReleases>
+                            <overWriteSnapshots>true</overWriteSnapshots>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
     </build>
 
     <profiles>
+        <profile>
+            <id>only-eclipse</id>
+            <activation>
+                <property>
+                    <name>m2e.version</name>
+                </property>
+            </activation>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.eclipse.m2e</groupId>
+                            <artifactId>lifecycle-mapping</artifactId>
+                            <version>1.0.0</version>
+                            <configuration>
+                                <lifecycleMappingMetadata>
+                                    <pluginExecutions>
+                                        <pluginExecution>
+                                            <pluginExecutionFilter>
+                                                <groupId>org.apache.maven.plugins</groupId>
+                                                <artifactId>maven-dependency-plugin</artifactId>
+                                                <versionRange>[2.0,)</versionRange>
+                                                <goals>
+                                                    <goal>unpack</goal>
+                                                </goals>
+                                            </pluginExecutionFilter>
+                                            <action>
+                                                <ignore />
+                                            </action>
+                                        </pluginExecution>
+                                    </pluginExecutions>
+                                </lifecycleMappingMetadata>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
         <profile>
             <id>apexSite</id>
             <activation>
index e5660c9..fdd3101 100644 (file)
@@ -122,8 +122,8 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Load the model from a JSON string for this session.
      *
-     * @param jsonString the JSON string to be parsed. The returned value(s) will be similar to {@link AxPolicyModel},
-     *        with merged {@linkplain AxKeyInfo} for the root object.
+     * @param jsonString the JSON string to be parsed. The returned value(s) will be similar to {@code AxPolicyModel},
+     *        with merged {@code AxKeyInfo} for the root object.
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
      */
@@ -162,7 +162,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Creates the new model model for this session.
      *
-     * @param jsonString the JSON string to be parsed containing the new model. See {@linkplain BeanModel}
+     * @param jsonString the JSON string to be parsed containing the new model. See {@code BeanModel}
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
      */
@@ -175,7 +175,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Update the model for this session.
      *
-     * @param jsonString the JSON string to be parsed containing the updated model. See {@linkplain BeanModel}
+     * @param jsonString the JSON string to be parsed containing the updated model. See {@code BeanModel}
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
      */
@@ -187,7 +187,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
 
     /**
      * Gets the key for the model for this session. If successful the model key will be available in the first message
-     * in the result. See {@linkplain AxKey}
+     * in the result. See {@code AxKey}
      *
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
@@ -200,7 +200,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
 
     /**
      * Retrieve the model for this session. If successful the model will be available in the first message in the
-     * result. The returned value will be similar to a {@link AxPolicyModel}, with merged {@linkplain AxKeyInfo} for the
+     * result. The returned value will be similar to a {@code AxPolicyModel}, with merged {@code AxKeyInfo} for the
      * root object.
      *
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
@@ -215,7 +215,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Download the model for this session as a String.
      *
-     * @return the model represented as a JSON string. See {@linkplain AxPolicyModel}
+     * @return the model represented as a JSON string. See {@code AxPolicyModel}
      */
     @GET
     @Path("Model/Download")
@@ -242,7 +242,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
 
     /**
      * List key information with the given key names/versions. If successful the result(s) will be available in the
-     * result messages. See {@linkplain AxKeyInfo}
+     * result messages. See {@code AxKeyInfo}
      *
      * @param name the name to search for. If null or empty, then all names will be queried
      * @param version the version to search for. If null then all versions will be searched for.
@@ -259,7 +259,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Creates a context schema with the information in the JSON string passed.
      *
-     * @param jsonString the JSON string to be parsed. See {@linkplain BeanContextSchema}
+     * @param jsonString the JSON string to be parsed. See {@code BeanContextSchema}
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
      */
@@ -272,7 +272,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Update a context schema with the information in the JSON string passed.
      *
-     * @param jsonString the JSON string to be parsed. See {@linkplain BeanContextSchema}
+     * @param jsonString the JSON string to be parsed. See {@code BeanContextSchema}
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
      */
@@ -284,8 +284,8 @@ public class ApexEditorRestResource implements RestCommandHandler {
 
     /**
      * List context schemas with the given key names/versions. If successful the result(s) will be available in the
-     * result messages. The returned value(s) will be similar to {@link AxContextSchema}, with merged
-     * {@linkplain AxKeyInfo} for the root object.
+     * result messages. The returned value(s) will be similar to {@code AxContextSchema}, with merged
+     * {@code AxKeyInfo} for the root object.
      *
      * @param name the name to search for. If null or empty, then all names will be queried
      * @param version the version to search for. If null then all versions will be searched for.
@@ -333,7 +333,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Creates a context album with the information in the JSON string passed.
      *
-     * @param jsonString the JSON string to be parsed. See {@linkplain BeanContextAlbum}
+     * @param jsonString the JSON string to be parsed. See {@code BeanContextAlbum}
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
      */
@@ -346,7 +346,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Update a context album with the information in the JSON string passed.
      *
-     * @param jsonString the JSON string to be parsed. See {@linkplain BeanContextAlbum}
+     * @param jsonString the JSON string to be parsed. See {@code BeanContextAlbum}
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
      */
@@ -358,8 +358,8 @@ public class ApexEditorRestResource implements RestCommandHandler {
 
     /**
      * List context albums with the given key names/versions. If successful the result(s) will be available in the
-     * result messages. The returned value(s) will be similar to {@link AxContextAlbum}, with merged
-     * {@linkplain AxKeyInfo} for the root object.
+     * result messages. The returned value(s) will be similar to {@code AxContextAlbum}, with merged
+     * {@code AxKeyInfo} for the root object.
      *
      * @param name the name to search for. If null or empty, then all names will be queried
      * @param version the version to search for. If null then all versions will be searched for.
@@ -407,7 +407,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Creates an event with the information in the JSON string passed.
      *
-     * @param jsonString the JSON string to be parsed. See {@linkplain BeanEvent}
+     * @param jsonString the JSON string to be parsed. See {@code BeanEvent}
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
      */
@@ -420,7 +420,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Update an event with the information in the JSON string passed.
      *
-     * @param jsonString the JSON string to be parsed. See {@linkplain BeanEvent}
+     * @param jsonString the JSON string to be parsed. See {@code BeanEvent}
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
      */
@@ -432,7 +432,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
 
     /**
      * List events with the given key names/versions. If successful the result(s) will be available in the result
-     * messages. The returned value(s) will be similar to {@link AxEvent}, with merged {@linkplain AxKeyInfo} for the
+     * messages. The returned value(s) will be similar to {@code AxEvent}, with merged {@code AxKeyInfo} for the
      * root object.
      *
      * @param name the name to search for. If null or empty, then all names will be queried
@@ -477,7 +477,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Creates a task with the information in the JSON string passed.
      *
-     * @param jsonString the JSON string to be parsed. See {@linkplain BeanTask}
+     * @param jsonString the JSON string to be parsed. See {@code BeanTask}
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
      */
@@ -490,7 +490,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Update a task with the information in the JSON string passed.
      *
-     * @param jsonString the JSON string to be parsed. See {@linkplain BeanTask}
+     * @param jsonString the JSON string to be parsed. See {@code BeanTask}
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
      */
@@ -502,7 +502,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
 
     /**
      * List tasks with the given key names/versions. If successful the result(s) will be available in the result
-     * messages. The returned value(s) will be similar to {@link AxTask}, with merged {@linkplain AxKeyInfo} for the
+     * messages. The returned value(s) will be similar to {@code AxTask}, with merged {@code AxKeyInfo} for the
      * root object.
      *
      * @param name the name to search for. If null or empty, then all names will be queried
@@ -548,7 +548,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Creates a policy with the information in the JSON string passed.
      *
-     * @param jsonString the JSON string to be parsed See {@linkplain BeanPolicy}
+     * @param jsonString the JSON string to be parsed See {@code BeanPolicy}
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
      */
@@ -562,7 +562,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
      * Update a policy with the information in the JSON string passed.
      *
      * @param firstStatePeriodic indicates if periodic event should be created and added to model
-     * @param jsonString the JSON string to be parsed. See {@linkplain BeanPolicy}
+     * @param jsonString the JSON string to be parsed. See {@code BeanPolicy}
      * @return an ApexAPIResult object. If successful then {@link ApexApiResult#isOk()} will return true. Any
      *         messages/errors can be retrieved using {@link ApexApiResult#getMessages()}
      */
@@ -580,7 +580,7 @@ public class ApexEditorRestResource implements RestCommandHandler {
 
     /**
      * List policies with the given key names/versions. If successful the result(s) will be available in the result
-     * messages. The returned value(s) will be similar to {@link AxPolicy}, with merged {@linkplain AxKey Info} for the
+     * messages. The returned value(s) will be similar to {@code AxPolicy}, with merged {@code AxKeyInfo} for the
      * root object.
      *
      * @param name the name to search for. If null or empty, then all names will be queried
index a157d76..ae987c5 100644 (file)
@@ -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.client</groupId>
                     <include>webapp/**/*.*</include>
                 </includes>
             </resource>
-            <resource>
-                <directory>../client-monitoring/target/classes/webapp</directory>
-                <includes>
-                    <include>**/*.*</include>
-                </includes>
-                <targetPath>webapp/monitoring</targetPath>
-            </resource>
-            <resource>
-                <directory>../client-editor/target/classes/webapp</directory>
-                <includes>
-                    <include>**/*.*</include>
-                </includes>
-                <targetPath>webapp/editor</targetPath>
-            </resource>
-            <resource>
-                <directory>../client-deployment/target/classes/webapp</directory>
-                <includes>
-                    <include>**/*.*</include>
-                </includes>
-                <targetPath>webapp/deployment</targetPath>
-            </resource>
         </resources>
 
         <defaultGoal>install</defaultGoal>
         <outputDirectory>${project.build.directory}/classes</outputDirectory>
         <plugins>
+             <!-- Copy sub-clients this client's webapp directory -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>unpack-client-editor-shared-resources</id>
+                        <id>unpack-examples</id>
+                        <phase>validate</phase>
                         <goals>
-                            <goal>unpack-dependencies</goal>
+                            <goal>unpack</goal>
                         </goals>
-                        <phase>generate-resources</phase>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
-                            <includeArtifacIds>client-common</includeArtifacIds>
-                            <includeGroupIds>${project.groupId}</includeGroupIds>
-                            <excludeTransitive>true</excludeTransitive>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.onap.policy.apex-pdp.client</groupId>
+                                    <artifactId>client-monitoring</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>jar</type>
+                                    <overWrite>false</overWrite>
+                                    <outputDirectory>${project.build.directory}/classes/webapp/monitoring-temp</outputDirectory>
+                                    <excludes>META-INF/, org/</excludes>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.onap.policy.apex-pdp.client</groupId>
+                                    <artifactId>client-deployment</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>jar</type>
+                                    <overWrite>false</overWrite>
+                                    <outputDirectory>${project.build.directory}/classes/webapp/deployment-temp</outputDirectory>
+                                    <excludes>META-INF/, org/</excludes>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.onap.policy.apex-pdp.client</groupId>
+                                    <artifactId>client-editor</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>jar</type>
+                                    <overWrite>false</overWrite>
+                                    <outputDirectory>${project.build.directory}/classes/webapp/editor-temp</outputDirectory>
+                                    <excludes>META-INF/, org/</excludes>
+                                </artifactItem>
+                            </artifactItems>
+                            <overWriteReleases>true</overWriteReleases>
+                            <overWriteSnapshots>true</overWriteSnapshots>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.8</version>
+                <executions>
+                    <execution>
+                        <phase>initialize</phase>
+                        <configuration>
+                            <target>
+                                <copy todir="${project.build.directory}/classes/webapp/deployment">
+                                    <fileset dir="${project.build.directory}/classes/webapp/deployment-temp/webapp"
+                                        includes="**" />
+                                </copy>
+                                <copy todir="${project.build.directory}/classes/webapp/monitoring">
+                                    <fileset dir="${project.build.directory}/classes/webapp/monitoring-temp/webapp"
+                                        includes="**" />
+                                </copy>
+                                <copy todir="${project.build.directory}/classes/webapp/editor">
+                                    <fileset dir="${project.build.directory}/classes/webapp/editor-temp/webapp"
+                                        includes="**" />
+                                </copy>
+                                <delete dir="${project.build.directory}/classes/webapp/deployment-temp"/>
+                                <delete dir="${project.build.directory}/classes/webapp/monitoring-temp"/>
+                                <delete dir="${project.build.directory}/classes/webapp/editor-temp"/>
+                            </target>
                         </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
                     </execution>
                 </executions>
             </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
                         </filter>
                     </filters>
                     <transformers>
-                        <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
-                        <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                        <transformer
+                            implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
+                        <transformer
+                            implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                             <resource>reference.conf</resource>
                         </transformer>
-                        <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
+                        <transformer
+                            implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                             <resource>log4j.properties</resource>
                         </transformer>
-                        <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                        <transformer
+                            implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                             <mainClass>org.onap.policy.apex.client.full.rest.ApexServicesRestMain</mainClass>
                         </transformer>
                     </transformers>
     </build>
 
     <profiles>
+        <profile>
+            <id>only-eclipse</id>
+            <activation>
+                <property>
+                    <name>m2e.version</name>
+                </property>
+            </activation>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.eclipse.m2e</groupId>
+                            <artifactId>lifecycle-mapping</artifactId>
+                            <version>1.0.0</version>
+                            <configuration>
+                                <lifecycleMappingMetadata>
+                                    <pluginExecutions>
+                                        <pluginExecution>
+                                            <pluginExecutionFilter>
+                                                <groupId>org.apache.maven.plugins</groupId>
+                                                <artifactId>maven-dependency-plugin</artifactId>
+                                                <versionRange>[2.0,)</versionRange>
+                                                <goals>
+                                                    <goal>unpack</goal>
+                                                </goals>
+                                            </pluginExecutionFilter>
+                                            <action>
+                                                <ignore />
+                                            </action>
+                                        </pluginExecution>
+                                        <pluginExecution>
+                                            <pluginExecutionFilter>
+                                                <groupId>org.apache.maven.plugins</groupId>
+                                                <artifactId>maven-antrun-plugin</artifactId>
+                                                <versionRange>[1.0,)</versionRange>
+                                                <goals>
+                                                    <goal>run</goal>
+                                                </goals>
+                                            </pluginExecutionFilter>
+                                            <action>
+                                                <ignore />
+                                            </action>
+                                        </pluginExecution>
+                                    </pluginExecutions>
+                                </lifecycleMappingMetadata>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
         <profile>
             <id>apexSite</id>
             <activation>
index 61c1775..17f2cc1 100644 (file)
@@ -39,9 +39,6 @@
             <groupId>org.onap.policy.apex-pdp.client</groupId>
             <artifactId>client-common</artifactId>
             <version>${project.version}</version>
-            <classifier>resources</classifier>
-            <type>zip</type>
-            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.glassfish.jersey.containers</groupId>
         <defaultGoal>install</defaultGoal>
         <outputDirectory>${project.build.directory}/classes</outputDirectory>
         <plugins>
+             <!-- Copy common resources to this client's webapp directory -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>unpack-client-monitoring-shared-resources</id>
-                        <goals>
-                            <goal>unpack-dependencies</goal>
-                        </goals>
+                        <id>unpack-examples</id>
                         <phase>validate</phase>
-                        <configuration>
-                            <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
-                            <includeArtifacIds>client-common</includeArtifacIds>
-                            <includeGroupIds>${project.groupId}</includeGroupIds>
-                            <excludeTransitive>true</excludeTransitive>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy-common-resources-to-jar</id>
-                        <phase>initialize</phase>
                         <goals>
-                            <goal>copy-resources</goal>
+                            <goal>unpack</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
-                            <filtering>false</filtering>
-                            <resources>
-                                <resource>
-                                    <directory>../client-common/src/main/resources</directory>
-                                </resource>
-                            </resources>
-                            <overwrite>true</overwrite>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>copy-local-resources-to-jar</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>copy-resources</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
-                            <filtering>false</filtering>
-                            <resources>
-                                <resource>
-                                    <directory>src/main/resources/webapp</directory>
-                                </resource>
-                            </resources>
-                            <overwrite>true</overwrite>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.onap.policy.apex-pdp.client</groupId>
+                                    <artifactId>client-common</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>jar</type>
+                                    <overWrite>false</overWrite>
+                                    <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
+                                    <excludes>META-INF/</excludes>
+                                </artifactItem>
+                            </artifactItems>
+                            <overWriteReleases>true</overWriteReleases>
+                            <overWriteSnapshots>true</overWriteSnapshots>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
     </build>
 
     <profiles>
+        <profile>
+            <id>only-eclipse</id>
+            <activation>
+                <property>
+                    <name>m2e.version</name>
+                </property>
+            </activation>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.eclipse.m2e</groupId>
+                            <artifactId>lifecycle-mapping</artifactId>
+                            <version>1.0.0</version>
+                            <configuration>
+                                <lifecycleMappingMetadata>
+                                    <pluginExecutions>
+                                        <pluginExecution>
+                                            <pluginExecutionFilter>
+                                                <groupId>org.apache.maven.plugins</groupId>
+                                                <artifactId>maven-dependency-plugin</artifactId>
+                                                <versionRange>[2.0,)</versionRange>
+                                                <goals>
+                                                    <goal>unpack</goal>
+                                                </goals>
+                                            </pluginExecutionFilter>
+                                            <action>
+                                                <ignore />
+                                            </action>
+                                        </pluginExecution>
+                                    </pluginExecutions>
+                                </lifecycleMappingMetadata>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
         <profile>
             <id>apexSite</id>
             <activation>
index 954b283..e357290 100644 (file)
                                             <pluginExecutionFilter>
                                                 <groupId>org.apache.maven.plugins</groupId>
                                                 <artifactId>maven-dependency-plugin</artifactId>
-                                                <versionRange>${maven-dependency-plugin.version}</versionRange>
+                                                <versionRange>[2.0,)</versionRange>
                                                 <goals>
                                                     <goal>unpack</goal>
                                                     <goal>copy</goal>
diff --git a/pom.xml b/pom.xml
index ecc3434..31e3244 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -18,7 +18,8 @@
   ============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.parent</groupId>
                                             <pluginExecutionFilter>
                                                 <groupId>org.apache.maven.plugins</groupId>
                                                 <artifactId>maven-dependency-plugin</artifactId>
-                                                <versionRange>[3.0,)</versionRange>
+                                                <versionRange>[2.0,)</versionRange>
                                                 <goals>
+                                                    <goal>unpack</goal>
                                                     <goal>unpack-dependencies</goal>
                                                 </goals>
                                             </pluginExecutionFilter>
                                                 <execute />
                                             </action>
                                         </pluginExecution>
+                                        <pluginExecution>
+                                            <pluginExecutionFilter>
+                                                <groupId>org.apache.maven.plugins</groupId>
+                                                <artifactId>maven-antrun-plugin</artifactId>
+                                                <versionRange>[1.0,)</versionRange>
+                                                <goals>
+                                                    <goal>run</goal>
+                                                </goals>
+                                            </pluginExecutionFilter>
+                                            <action>
+                                                <ignore />
+                                            </action>
+                                        </pluginExecution>
                                     </pluginExecutions>
                                 </lifecycleMappingMetadata>
                             </configuration>
index 87a5235..a6040d9 100644 (file)
@@ -209,12 +209,12 @@ public class EngineWorkerTest {
         assertNull(worker.getApexModelKey());
 
         String runtimeInfo = worker.getRuntimeInfo(worker.getEngineKeys().iterator().next());
-        assertEquals("{\n  \"TimeStamp\":", runtimeInfo.substring(0, 16));
+        assertEquals("{\"TimeStamp\":", runtimeInfo.replaceAll("\\s+", "").substring(0, 13));
 
         assertEquals(AxEngineState.STOPPED, worker.getState());
 
         String status = worker.getStatus(worker.getEngineKeys().iterator().next());
-        assertEquals("{\n   \"apexEngineModel\" :", status.substring(0, 24));
+        assertEquals("{\"apexEngineModel\":{\"key\":", status.replaceAll("\\s+", "").substring(0, 26));
 
         assertFalse(worker.isStarted());
         assertFalse(worker.isStarted(null));
@@ -365,7 +365,7 @@ public class EngineWorkerTest {
         }
 
         String runtimeInfo = worker.getRuntimeInfo(worker.getEngineKeys().iterator().next());
-        assertEquals("{\n  \"TimeStamp\":", runtimeInfo.substring(0, 16));
+        assertEquals("{\"TimeStamp\":", runtimeInfo.replaceAll("\\s+", "").substring(0, 13));
 
         assertEquals(AxEngineState.STOPPED, worker.getState());
         worker.startAll();
@@ -373,7 +373,7 @@ public class EngineWorkerTest {
         assertEquals(AxEngineState.READY, worker.getState());
 
         String status = worker.getStatus(worker.getEngineKeys().iterator().next());
-        assertEquals("{\n   \"apexEngineModel\" :", status.substring(0, 24));
+        assertEquals("{\"apexEngineModel\":{\"key\":", status.replaceAll("\\s+", "").substring(0, 26));
 
         assertTrue(worker.isStarted());
         assertTrue(worker.isStarted(worker.getEngineKeys().iterator().next()));
index e74bffc..239bc68 100644 (file)
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
         <artifactId>integration</artifactId>
-        <version>2.0.1-SNAPSHOT</version>
+        <version>2.1.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>integration-context-test</artifactId>
index 38a8923..5c595e5 100644 (file)
     </build>
 
     <profiles>
+         <profile>
+            <id>only-eclipse</id>
+            <activation>
+                <property>
+                    <name>m2e.version</name>
+                </property>
+            </activation>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.eclipse.m2e</groupId>
+                            <artifactId>lifecycle-mapping</artifactId>
+                            <version>1.0.0</version>
+                            <configuration>
+                                <lifecycleMappingMetadata>
+                                    <pluginExecutions>
+                                        <pluginExecution>
+                                            <pluginExecutionFilter>
+                                                <groupId>org.apache.maven.plugins</groupId>
+                                                <artifactId>maven-dependency-plugin</artifactId>
+                                                <versionRange>[2.0,)</versionRange>
+                                                <goals>
+                                                    <goal>unpack</goal>
+                                                </goals>
+                                            </pluginExecutionFilter>
+                                            <action>
+                                                <ignore />
+                                            </action>
+                                        </pluginExecution>
+                                    </pluginExecutions>
+                                </lifecycleMappingMetadata>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
         <profile>
             <id>apexSite</id>
             <activation>
index 2d8b16b..584b638 100644 (file)
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.onap.policy.apex-pdp.testsuites.performance</groupId>
         <artifactId>performance</artifactId>
-        <version>2.0.1-SNAPSHOT</version>
+        <version>2.1.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>performance-benchmark-test</artifactId>
index 990d66c..3e65f46 100644 (file)
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.onap.policy.apex-pdp.testsuites.performance</groupId>
         <artifactId>performance</artifactId>
-        <version>2.0.1-SNAPSHOT</version>
+        <version>2.1.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>performance-context-metrics</artifactId>
index 6387eb3..3832f91 100644 (file)
     </build>
 
     <profiles>
+        <profile>
+            <id>only-eclipse</id>
+            <activation>
+                <property>
+                    <name>m2e.version</name>
+                </property>
+            </activation>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.eclipse.m2e</groupId>
+                            <artifactId>lifecycle-mapping</artifactId>
+                            <version>1.0.0</version>
+                            <configuration>
+                                <lifecycleMappingMetadata>
+                                    <pluginExecutions>
+                                        <pluginExecution>
+                                            <pluginExecutionFilter>
+                                                <groupId>org.apache.maven.plugins</groupId>
+                                                <artifactId>maven-dependency-plugin</artifactId>
+                                                <versionRange>[2.0,)</versionRange>
+                                                <goals>
+                                                    <goal>unpack</goal>
+                                                </goals>
+                                            </pluginExecutionFilter>
+                                            <action>
+                                                <ignore />
+                                            </action>
+                                        </pluginExecution>
+                                    </pluginExecutions>
+                                </lifecycleMappingMetadata>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
         <profile>
             <id>apexSite</id>
             <activation>