summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/client-common/pom.xml32
-rw-r--r--client/client-common/src/main/assembly/resources.xml32
-rw-r--r--client/client-deployment/pom.xml103
-rw-r--r--client/client-deployment/src/main/assembly/resources.xml32
-rw-r--r--client/client-editor/pom.xml119
-rw-r--r--client/client-editor/src/main/assembly/resources.xml32
-rw-r--r--client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/RestCommandHandler.java30
-rw-r--r--client/client-full/pom.xml129
-rw-r--r--client/client-monitoring/pom.xml118
-rw-r--r--client/client-monitoring/src/main/assembly/resources.xml32
10 files changed, 365 insertions, 294 deletions
diff --git a/client/client-common/pom.xml b/client/client-common/pom.xml
index 92174c87f..da0aa392c 100644
--- a/client/client-common/pom.xml
+++ b/client/client-common/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>
@@ -26,9 +27,36 @@
</parent>
<artifactId>client-common</artifactId>
- <packaging>jar</packaging>
+ <packaging>pom</packaging>
<name>${project.artifactId}</name>
+ <build>
+ <plugins>
+
+<!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
+ <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/resources.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+
+ </build>
+
<profiles>
<profile>
<id>apexSite</id>
diff --git a/client/client-common/src/main/assembly/resources.xml b/client/client-common/src/main/assembly/resources.xml
new file mode 100644
index 000000000..2a6d326cc
--- /dev/null
+++ b/client/client-common/src/main/assembly/resources.xml
@@ -0,0 +1,32 @@
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 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 02ecb4ae6..25972ea47 100644
--- a/client/client-deployment/pom.xml
+++ b/client/client-deployment/pom.xml
@@ -37,11 +37,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.apex-pdp.client</groupId>
- <artifactId>client-common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
<version>${version.jersey}</version>
@@ -65,42 +60,67 @@
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>
+
+ <dependency>
+ <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>
+
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<plugins>
- <!-- Copy common resources to this client's webapp directory -->
+
+<!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
- <id>unpack-examples</id>
- <phase>validate</phase>
+ <id>unpack-shared-resources</id>
<goals>
- <goal>unpack</goal>
+ <goal>unpack-dependencies</goal>
</goals>
+ <phase>generate-resources</phase>
<configuration>
- <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>
+ <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
+ <!--use as much as needed to be specific...also scope,type,classifier etc-->
+ <includeArtifacIds>client-common</includeArtifacIds>
+ <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds>
+ <excludeTransitive>true</excludeTransitive>
+ <excludeTransitive>true</excludeTransitive>
+ <excludeTypes>jar</excludeTypes>
+ <includeTypes>zip</includeTypes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <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/resources.xml</descriptor>
+ </descriptors>
</configuration>
</execution>
</executions>
</plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
@@ -197,45 +217,6 @@
<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-deployment/src/main/assembly/resources.xml b/client/client-deployment/src/main/assembly/resources.xml
new file mode 100644
index 000000000..f0632c54e
--- /dev/null
+++ b/client/client-deployment/src/main/assembly/resources.xml
@@ -0,0 +1,32 @@
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 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>target/classes/webapp</directory>
+ <outputDirectory>deployment</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly> \ No newline at end of file
diff --git a/client/client-editor/pom.xml b/client/client-editor/pom.xml
index 4bae1013d..a72f88c76 100644
--- a/client/client-editor/pom.xml
+++ b/client/client-editor/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>
@@ -45,11 +46,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.apex-pdp.client</groupId>
- <artifactId>client-common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
<version>${version.jersey}</version>
@@ -90,43 +86,67 @@
<version>${version.jersey}</version>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <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>
+
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<plugins>
- <!-- Copy common resources to this client's webapp directory -->
+
+<!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
- <id>unpack-examples</id>
- <phase>validate</phase>
+ <id>unpack-shared-resources</id>
<goals>
- <goal>unpack</goal>
+ <goal>unpack-dependencies</goal>
</goals>
+ <phase>generate-resources</phase>
<configuration>
- <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>
+ <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
+ <!--use as much as needed to be specific...also scope,type,classifier etc-->
+ <includeArtifacIds>client-common</includeArtifacIds>
+ <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds>
+ <excludeTransitive>true</excludeTransitive>
+ <excludeTransitive>true</excludeTransitive>
+ <excludeTypes>jar</excludeTypes>
+ <includeTypes>zip</includeTypes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <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/resources.xml</descriptor>
+ </descriptors>
</configuration>
</execution>
</executions>
</plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
@@ -158,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.editor.rest.ApexEditorMain</mainClass>
</transformer>
</transformers>
@@ -219,45 +243,6 @@
<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/assembly/resources.xml b/client/client-editor/src/main/assembly/resources.xml
new file mode 100644
index 000000000..0205c3d5d
--- /dev/null
+++ b/client/client-editor/src/main/assembly/resources.xml
@@ -0,0 +1,32 @@
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 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>target/classes/webapp</directory>
+ <outputDirectory>editor</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly> \ No newline at end of file
diff --git a/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/RestCommandHandler.java b/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/RestCommandHandler.java
index 5921c8960..968a98572 100644
--- a/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/RestCommandHandler.java
+++ b/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/RestCommandHandler.java
@@ -5,15 +5,15 @@
* 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=========================================================
*/
@@ -38,7 +38,7 @@ public interface RestCommandHandler {
* @return the apex api result the result of the execution
*/
public ApexApiResult executeRestCommand(final RestSession session, final RestCommandType commandType,
- final RestCommand command);
+ final RestCommand command);
/**
* Process a REST command.
@@ -50,7 +50,7 @@ public interface RestCommandHandler {
* @return the apex api result the result of the execution
*/
public ApexApiResult executeRestCommand(final RestSession session, final RestCommandType commandType,
- final RestCommand command, final String jsonString);
+ final RestCommand command, final String jsonString);
/**
* Process a REST command.
@@ -63,7 +63,7 @@ public interface RestCommandHandler {
* @return the apex api result the result of the execution
*/
public ApexApiResult executeRestCommand(final RestSession session, final RestCommandType commandType,
- final RestCommand command, final String name, final String version);
+ final RestCommand command, final String name, final String version);
/**
* Get an unsupported command result message.
@@ -71,16 +71,17 @@ public interface RestCommandHandler {
* @param session the Apex editor session
* @param commandType the type of REST command to execute
* @param command the REST command to execute
+ * @return the apex api result the result of the execution
*/
public default ApexApiResult getUnsupportedCommandResultMessage(final RestSession session,
- final RestCommandType commandType, final RestCommand command) {
+ final RestCommandType commandType, final RestCommand command) {
return new ApexApiResult(Result.FAILED, "session " + session.getSessionId() + ", command type " + commandType
- + ", command" + command + " invalid");
+ + ", command" + command + " invalid");
}
-
+
/**
* Convert blank incoming fields to nulls.
- *
+ *
* @param incomingField the field to check
* @return null if the field is blank, otherwise, the field trimmed
*/
@@ -88,13 +89,12 @@ public interface RestCommandHandler {
if (incomingField == null) {
return null;
}
-
- String trimmedField = incomingField.trim();
-
+
+ final String trimmedField = incomingField.trim();
+
if (trimmedField.isEmpty()) {
return null;
- }
- else {
+ } else {
return trimmedField;
}
}
diff --git a/client/client-full/pom.xml b/client/client-full/pom.xml
index ae987c55c..591dcada3 100644
--- a/client/client-full/pom.xml
+++ b/client/client-full/pom.xml
@@ -51,9 +51,40 @@
<artifactId>jersey-container-grizzly2-http</artifactId>
<version>${version.jersey}</version>
</dependency>
+
+
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.client</groupId>
+ <artifactId>client-monitoring</artifactId>
+ <version>${project.version}</version>
+ <classifier>resources</classifier>
+ <type>zip</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.client</groupId>
+ <artifactId>client-deployment</artifactId>
+ <version>${project.version}</version>
+ <classifier>resources</classifier>
+ <type>zip</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.client</groupId>
+ <artifactId>client-editor</artifactId>
+ <version>${project.version}</version>
+ <classifier>resources</classifier>
+ <type>zip</type>
+ <scope>provided</scope>
+ </dependency>
+
+
+
+
</dependencies>
<build>
+<!--
<resources>
<resource>
<directory>src/main/resources</directory>
@@ -62,53 +93,31 @@
</includes>
</resource>
</resources>
-
+-->
<defaultGoal>install</defaultGoal>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<plugins>
- <!-- Copy sub-clients this client's webapp directory -->
+
+<!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
- <id>unpack-examples</id>
- <phase>validate</phase>
+ <id>unpack-MONITOR-resources</id>
<goals>
- <goal>unpack</goal>
+ <goal>unpack-dependencies</goal>
</goals>
+ <phase>generate-resources</phase>
<configuration>
- <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>
+ <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
+ <!--use as much as needed to be specific...also scope,type,classifier etc-->
+ <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds>
+ <includeArtifacIds>client-monitoring, client-deployment, client-editor</includeArtifacIds>
+ <excludeTransitive>true</excludeTransitive>
+ <excludeTypes>jar</excludeTypes>
+ <includeTypes>zip</includeTypes>
+ <scope>provided</scope>
</configuration>
</execution>
</executions>
@@ -116,39 +125,6 @@
<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>
<executions>
<execution>
@@ -265,20 +241,7 @@
<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>
+ <goal>unpack-dependencies</goal>
</goals>
</pluginExecutionFilter>
<action>
diff --git a/client/client-monitoring/pom.xml b/client/client-monitoring/pom.xml
index 17f2cc178..6d0c34e6e 100644
--- a/client/client-monitoring/pom.xml
+++ b/client/client-monitoring/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>
@@ -36,11 +37,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.apex-pdp.client</groupId>
- <artifactId>client-common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
<version>${version.jersey}</version>
@@ -64,42 +60,67 @@
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <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>
+
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<plugins>
- <!-- Copy common resources to this client's webapp directory -->
+
+<!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
- <id>unpack-examples</id>
- <phase>validate</phase>
+ <id>unpack-shared-resources</id>
<goals>
- <goal>unpack</goal>
+ <goal>unpack-dependencies</goal>
</goals>
+ <phase>generate-resources</phase>
<configuration>
- <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>
+ <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
+ <!--use as much as needed to be specific...also scope,type,classifier etc-->
+ <includeArtifacIds>client-common</includeArtifacIds>
+ <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds>
+ <excludeTransitive>true</excludeTransitive>
+ <excludeTypes>jar</excludeTypes>
+ <includeTypes>zip</includeTypes>
+ <excludeTransitive>true</excludeTransitive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <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/resources.xml</descriptor>
+ </descriptors>
</configuration>
</execution>
</executions>
</plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
@@ -131,14 +152,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.monitoring.rest.ApexMonitoringRestMain</mainClass>
</transformer>
</transformers>
@@ -192,45 +217,6 @@
<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-monitoring/src/main/assembly/resources.xml b/client/client-monitoring/src/main/assembly/resources.xml
new file mode 100644
index 000000000..bed1588b6
--- /dev/null
+++ b/client/client-monitoring/src/main/assembly/resources.xml
@@ -0,0 +1,32 @@
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 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>target/classes/webapp</directory>
+ <outputDirectory>monitoring</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly> \ No newline at end of file