blob: 2bfe6d8fa75565a1c5bce03cfecaa7dcb92eff7f [file] [log] [blame]
Hengye7fa12fd2020-02-25 09:15:58 +08001<!--
2 ============LICENSE_START=======================================================
danielhanrahana8af9622021-08-30 17:35:18 +01003 Copyright (C) 2020-2021 Nordix Foundation.
Jim Hahn37f7cd92021-04-09 14:52:54 -04004 Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
Hengye7fa12fd2020-02-25 09:15:58 +08005 ================================================================================
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17
18 SPDX-License-Identifier: Apache-2.0
19 ============LICENSE_END=========================================================
20-->
21<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23 <modelVersion>4.0.0</modelVersion>
24 <parent>
25 <groupId>org.onap.policy.gui</groupId>
26 <artifactId>policy-gui</artifactId>
liamfallon48808f22021-09-15 21:55:59 +010027 <version>2.1.1-SNAPSHOT</version>
Hengye7fa12fd2020-02-25 09:15:58 +080028 </parent>
29
30 <artifactId>gui-pdp-monitoring</artifactId>
31 <name>${project.artifactId}</name>
liamfallon2de08a62020-07-16 10:24:08 +010032 <description>GUI for monitoring PDP Statistics</description>
Hengye7fa12fd2020-02-25 09:15:58 +080033
huaxing4d4f41c2020-03-11 09:50:37 +080034 <properties>
35 <webapp.dir>src/webapp</webapp.dir>
waynedunican0bdca952020-08-24 13:36:15 +010036 <sonar.nodejs.executable>${project.basedir}/src/webapp/node/node</sonar.nodejs.executable>
waynedunican483f0f82020-09-07 12:21:03 +010037 <sonar.sources>${project.basedir}/src/main/java,${project.basedir}/src/webapp/js</sonar.sources>
waynedunican0bdca952020-08-24 13:36:15 +010038 <sonar.exclusions>src/webapp/js/__test__/**</sonar.exclusions>
huaxing4d4f41c2020-03-11 09:50:37 +080039 </properties>
40
Hengye7fa12fd2020-02-25 09:15:58 +080041 <dependencies>
42 <dependency>
43 <groupId>org.onap.policy.common</groupId>
44 <artifactId>policy-endpoints</artifactId>
Hengye7fa12fd2020-02-25 09:15:58 +080045 </dependency>
46 <dependency>
47 <groupId>org.onap.policy.common</groupId>
48 <artifactId>utils-test</artifactId>
49 <version>${policy.common.version}</version>
50 <scope>test</scope>
51 </dependency>
52 <dependency>
53 <groupId>org.onap.policy.models</groupId>
54 <artifactId>policy-models-pdp</artifactId>
55 <version>${policy.models.version}</version>
56 </dependency>
57 <dependency>
58 <groupId>commons-cli</groupId>
59 <artifactId>commons-cli</artifactId>
60 </dependency>
61 <dependency>
62 <groupId>org.mockito</groupId>
63 <artifactId>mockito-all</artifactId>
64 <scope>test</scope>
65 </dependency>
Hengye7fa12fd2020-02-25 09:15:58 +080066 </dependencies>
67
68 <build>
69 <defaultGoal>install</defaultGoal>
70 <outputDirectory>${project.build.directory}/classes</outputDirectory>
71 <plugins>
72 <plugin>
huaxing4d4f41c2020-03-11 09:50:37 +080073 <groupId>com.github.eirslett</groupId>
74 <artifactId>frontend-maven-plugin</artifactId>
75 <version>1.9.1</version>
76 <configuration>
brunomilitzer87111ee2021-05-18 12:50:32 +010077 <nodeVersion>v14.17.0</nodeVersion>
huaxing4d4f41c2020-03-11 09:50:37 +080078 <installDirectory>${webapp.dir}</installDirectory>
79 <workingDirectory>${webapp.dir}</workingDirectory>
Jim Hahn37f7cd92021-04-09 14:52:54 -040080 <npmDownloadRoot>${repo.npm}</npmDownloadRoot>
huaxing4d4f41c2020-03-11 09:50:37 +080081 </configuration>
82 <executions>
83 <execution>
84 <id>install node</id>
85 <goals>
86 <goal>install-node-and-npm</goal>
87 </goals>
88 <configuration>
Jim Hahn37f7cd92021-04-09 14:52:54 -040089 <npmVersion>6.14.5</npmVersion>
huaxing4d4f41c2020-03-11 09:50:37 +080090 </configuration>
91 </execution>
92 <execution>
93 <id>npm install</id>
94 <goals>
95 <goal>npm</goal>
96 </goals>
waynedunican0bdca952020-08-24 13:36:15 +010097 <configuration>
98 <arguments>install</arguments>
99 </configuration>
huaxing4d4f41c2020-03-11 09:50:37 +0800100 </execution>
101 <execution>
102 <id>npm test</id>
103 <goals>
104 <goal>npm</goal>
105 </goals>
waynedunican0bdca952020-08-24 13:36:15 +0100106 <phase>test</phase>
huaxing4d4f41c2020-03-11 09:50:37 +0800107 <configuration>
108 <arguments>test</arguments>
109 </configuration>
110 </execution>
111 <execution>
112 <id>webpack build</id>
113 <goals>
114 <goal>webpack</goal>
115 </goals>
116 </execution>
117 </executions>
118 </plugin>
119 <plugin>
120 <groupId>org.apache.maven.plugins</groupId>
danielhanrahana8af9622021-08-30 17:35:18 +0100121 <artifactId>maven-assembly-plugin</artifactId>
huaxing4d4f41c2020-03-11 09:50:37 +0800122 <executions>
123 <execution>
danielhanrahana8af9622021-08-30 17:35:18 +0100124 <id>generate-gui-pdp-monitoring-tar</id>
125 <phase>package</phase>
huaxing4d4f41c2020-03-11 09:50:37 +0800126 <goals>
danielhanrahana8af9622021-08-30 17:35:18 +0100127 <goal>single</goal>
huaxing4d4f41c2020-03-11 09:50:37 +0800128 </goals>
129 <configuration>
danielhanrahana8af9622021-08-30 17:35:18 +0100130 <descriptors>
131 <descriptor>src/main/assembly/frontend.xml</descriptor>
132 </descriptors>
133 <finalName>${project.artifactId}-${project.version}</finalName>
huaxing4d4f41c2020-03-11 09:50:37 +0800134 </configuration>
135 </execution>
136 </executions>
137 </plugin>
138 <plugin>
139 <groupId>org.apache.maven.plugins</groupId>
140 <artifactId>maven-clean-plugin</artifactId>
141 <version>3.0.0</version>
142 <configuration>
143 <filesets>
144 <fileset>
145 <directory>${webapp.dir}/node</directory>
146 </fileset>
147 <fileset>
148 <directory>${webapp.dir}/node_modules</directory>
149 </fileset>
150 <fileset>
danielhanrahanaa3754b2021-09-15 16:35:40 +0100151 <directory>${webapp.dir}</directory>
152 <includes>
153 <include>package-lock.json</include>
154 <include>dist/bundle.js</include>
155 </includes>
huaxing4d4f41c2020-03-11 09:50:37 +0800156 </fileset>
157 </filesets>
158 </configuration>
159 </plugin>
160 <plugin>
Hengye7fa12fd2020-02-25 09:15:58 +0800161 <groupId>org.apache.maven.plugins</groupId>
162 <artifactId>maven-shade-plugin</artifactId>
163 <executions>
164 <execution>
165 <phase>package</phase>
166 <goals>
167 <goal>shade</goal>
168 </goals>
169 </execution>
170 </executions>
171 <configuration>
172 <finalName>${project.artifactId}-uber-${project.version}</finalName>
173 <shadedArtifactAttached>true</shadedArtifactAttached>
174 <shadedClassifierName>monitoring</shadedClassifierName>
175 <artifactSet>
176 <includes>
177 <include>*:*</include>
178 </includes>
179 </artifactSet>
180 <filters>
181 <filter>
182 <artifact>*:*</artifact>
183 <excludes>
184 <exclude>META-INF/*.SF</exclude>
185 <exclude>META-INF/*.DSA</exclude>
186 <exclude>META-INF/*.RSA</exclude>
187 </excludes>
188 </filter>
189 </filters>
190 <transformers>
191 <transformer
192 implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
193 <transformer
194 implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
195 <resource>reference.conf</resource>
196 </transformer>
197 <transformer
198 implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
199 <resource>log4j.properties</resource>
200 </transformer>
201 <transformer
202 implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
203 <mainClass>org.onap.policy.gui.pdp.monitoring.PdpMonitoringMain</mainClass>
204 </transformer>
205 </transformers>
206 </configuration>
207 </plugin>
208 <plugin>
209 <groupId>org.codehaus.mojo</groupId>
210 <artifactId>build-helper-maven-plugin</artifactId>
211 <version>3.0.0</version>
212 <executions>
213 <execution>
214 <id>attach-artifacts</id>
215 <phase>package</phase>
216 <goals>
217 <goal>attach-artifact</goal>
218 </goals>
219 <configuration>
220 <artifacts>
221 <artifact>
222 <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
223 <type>uber.jar</type>
224 </artifact>
225 </artifacts>
226 </configuration>
227 </execution>
228 </executions>
229 </plugin>
230 </plugins>
231 </build>
liamfallonee414152020-07-17 09:22:46 +0100232</project>