blob: e070d9da2032b5d8eb8dab03835a61b00a15e24f [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>
151 <directory>${webapp.dir}/dist/</directory>
152 <includes>bundle.js</includes>
153 </fileset>
154 </filesets>
155 </configuration>
156 </plugin>
157 <plugin>
Hengye7fa12fd2020-02-25 09:15:58 +0800158 <groupId>org.apache.maven.plugins</groupId>
159 <artifactId>maven-shade-plugin</artifactId>
160 <executions>
161 <execution>
162 <phase>package</phase>
163 <goals>
164 <goal>shade</goal>
165 </goals>
166 </execution>
167 </executions>
168 <configuration>
169 <finalName>${project.artifactId}-uber-${project.version}</finalName>
170 <shadedArtifactAttached>true</shadedArtifactAttached>
171 <shadedClassifierName>monitoring</shadedClassifierName>
172 <artifactSet>
173 <includes>
174 <include>*:*</include>
175 </includes>
176 </artifactSet>
177 <filters>
178 <filter>
179 <artifact>*:*</artifact>
180 <excludes>
181 <exclude>META-INF/*.SF</exclude>
182 <exclude>META-INF/*.DSA</exclude>
183 <exclude>META-INF/*.RSA</exclude>
184 </excludes>
185 </filter>
186 </filters>
187 <transformers>
188 <transformer
189 implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
190 <transformer
191 implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
192 <resource>reference.conf</resource>
193 </transformer>
194 <transformer
195 implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
196 <resource>log4j.properties</resource>
197 </transformer>
198 <transformer
199 implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
200 <mainClass>org.onap.policy.gui.pdp.monitoring.PdpMonitoringMain</mainClass>
201 </transformer>
202 </transformers>
203 </configuration>
204 </plugin>
205 <plugin>
206 <groupId>org.codehaus.mojo</groupId>
207 <artifactId>build-helper-maven-plugin</artifactId>
208 <version>3.0.0</version>
209 <executions>
210 <execution>
211 <id>attach-artifacts</id>
212 <phase>package</phase>
213 <goals>
214 <goal>attach-artifact</goal>
215 </goals>
216 <configuration>
217 <artifacts>
218 <artifact>
219 <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
220 <type>uber.jar</type>
221 </artifact>
222 </artifacts>
223 </configuration>
224 </execution>
225 </executions>
226 </plugin>
227 </plugins>
228 </build>
liamfallonee414152020-07-17 09:22:46 +0100229</project>