diff options
author | liamfallon <liam.fallon@ericsson.com> | 2018-11-10 00:39:12 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@ericsson.com> | 2018-11-12 11:07:31 +0000 |
commit | 32497610bd7bc721bb73f0d753fc1426bba677e2 (patch) | |
tree | 44167f3feb03c84b3cff784d9758b03528f1eb0b | |
parent | 53d8916cc60d97e2ce7ae345f8cc25f5602567da (diff) |
Clean up eclipse and document warnings
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, 440 insertions, 276 deletions
diff --git a/client/client-common/pom.xml b/client/client-common/pom.xml index 7c679ad41..92174c87f 100644 --- a/client/client-common/pom.xml +++ b/client/client-common/pom.xml @@ -26,32 +26,9 @@ </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 index ddc56e57f..000000000 --- a/client/client-common/src/main/assembly/assembly.xml +++ /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 diff --git a/client/client-deployment/pom.xml b/client/client-deployment/pom.xml index 41e0e0508..02ecb4ae6 100644 --- a/client/client-deployment/pom.xml +++ b/client/client-deployment/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.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> @@ -73,65 +71,36 @@ <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> @@ -163,14 +132,18 @@ </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> @@ -224,6 +197,45 @@ <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> <property> diff --git a/client/client-editor/pom.xml b/client/client-editor/pom.xml index 47ce007ac..4bae1013d 100644 --- a/client/client-editor/pom.xml +++ b/client/client-editor/pom.xml @@ -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> @@ -99,65 +96,37 @@ <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> @@ -250,6 +219,45 @@ <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> <property> diff --git a/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/ApexEditorRestResource.java b/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/ApexEditorRestResource.java index e5660c9fa..fdd310150 100644 --- a/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/ApexEditorRestResource.java +++ b/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/ApexEditorRestResource.java @@ -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 diff --git a/client/client-full/pom.xml b/client/client-full/pom.xml index a157d7657..ae987c55c 100644 --- a/client/client-full/pom.xml +++ b/client/client-full/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.client</groupId> @@ -60,51 +61,92 @@ <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> @@ -136,14 +178,18 @@ </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> @@ -197,6 +243,58 @@ <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> <property> diff --git a/client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestMain.java b/client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestMain.java index 7b9f4187d..02670511c 100644 --- a/client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestMain.java +++ b/client/client-full/src/main/java/org/onap/policy/apex/client/full/rest/ApexServicesRestMain.java @@ -199,6 +199,7 @@ public class ApexServicesRestMain { } } } + /** * Main method, main entry point for command. * diff --git a/client/client-monitoring/pom.xml b/client/client-monitoring/pom.xml index 61c1775b7..17f2cc178 100644 --- a/client/client-monitoring/pom.xml +++ b/client/client-monitoring/pom.xml @@ -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> @@ -73,65 +70,36 @@ <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> @@ -224,6 +192,45 @@ <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> <property> diff --git a/packages/apex-pdp-package-full/pom.xml b/packages/apex-pdp-package-full/pom.xml index 954b28348..e357290c3 100644 --- a/packages/apex-pdp-package-full/pom.xml +++ b/packages/apex-pdp-package-full/pom.xml @@ -744,7 +744,7 @@ <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> @@ -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> @@ -152,8 +153,9 @@ <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> @@ -161,6 +163,19 @@ <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> diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineWorkerTest.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineWorkerTest.java index 87a523506..a6040d969 100644 --- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineWorkerTest.java +++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineWorkerTest.java @@ -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())); diff --git a/testsuites/integration/integration-context-test/pom.xml b/testsuites/integration/integration-context-test/pom.xml index e74bffcbd..239bc684d 100644 --- a/testsuites/integration/integration-context-test/pom.xml +++ b/testsuites/integration/integration-context-test/pom.xml @@ -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> diff --git a/testsuites/integration/integration-uservice-test/pom.xml b/testsuites/integration/integration-uservice-test/pom.xml index 38a892377..5c595e589 100644 --- a/testsuites/integration/integration-uservice-test/pom.xml +++ b/testsuites/integration/integration-uservice-test/pom.xml @@ -224,6 +224,45 @@ </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> diff --git a/testsuites/performance/performance-benchmark-test/pom.xml b/testsuites/performance/performance-benchmark-test/pom.xml index 2d8b16be7..584b63898 100644 --- a/testsuites/performance/performance-benchmark-test/pom.xml +++ b/testsuites/performance/performance-benchmark-test/pom.xml @@ -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> diff --git a/testsuites/performance/performance-context-metrics/pom.xml b/testsuites/performance/performance-context-metrics/pom.xml index 990d66c3b..3e65f466c 100644 --- a/testsuites/performance/performance-context-metrics/pom.xml +++ b/testsuites/performance/performance-context-metrics/pom.xml @@ -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> diff --git a/tools/model-generator/pom.xml b/tools/model-generator/pom.xml index 6387eb33d..3832f914b 100644 --- a/tools/model-generator/pom.xml +++ b/tools/model-generator/pom.xml @@ -136,6 +136,45 @@ <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> <property> |