blob: fd7a28342e0442294055800f28b22d87985e21d6 [file] [log] [blame]
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +03001<project
2 xmlns="http://maven.apache.org/POM/4.0.0"
3 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">
4 <modelVersion>4.0.0</modelVersion>
5 <groupId>org.onap.sdc</groupId>
6 <artifactId>dcae_fe</artifactId>
7 <version>1806.0.1-SNAPSHOT</version>
8 <packaging>war</packaging>
9 <name>DCAE FE application</name>
10 <description>DCAE FE</description>
11 <parent>
12 <groupId>org.springframework.boot</groupId>
13 <artifactId>spring-boot-starter-parent</artifactId>
14 <version>1.5.9.RELEASE</version>
15 <relativePath />
16 <!-- lookup parent from repository -->
17 </parent>
18 <properties>
19 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
21 </properties>
22 <dependencies>
23 <dependency>
24 <groupId>org.eclipse.jetty</groupId>
25 <artifactId>jetty-proxy</artifactId>
26 <version>${jetty.version}</version>
27 </dependency>
28 </dependencies>
29 <profiles>
30 <profile>
31 <id>local</id>
32 <activation>
33 <activeByDefault>false</activeByDefault>
34 </activation>
35 <dependencies>
36 <dependency>
37 <groupId>org.springframework.boot</groupId>
38 <artifactId>spring-boot-starter-web</artifactId>
39 <exclusions>
40 <exclusion>
41 <groupId>org.springframework.boot</groupId>
42 <artifactId>spring-boot-starter-tomcat</artifactId>
43 </exclusion>
44 </exclusions>
45 </dependency>
46 <dependency>
47 <groupId>org.springframework.boot</groupId>
48 <artifactId>spring-boot-starter-jetty</artifactId>
49 <exclusions>
50 <exclusion>
51 <groupId>org.eclipse.jetty.websocket</groupId>
52 <artifactId>*</artifactId>
53 </exclusion>
54 </exclusions>
55 </dependency>
56 <dependency>
57 <groupId>org.springframework.boot</groupId>
58 <artifactId>spring-boot-starter-test</artifactId>
59 <scope>test</scope>
60 </dependency>
61 <dependency>
62 <groupId>org.apache.commons</groupId>
63 <artifactId>commons-lang3</artifactId>
64 <version>3.5</version>
65 </dependency>
66 <dependency>
67 <groupId>commons-net</groupId>
68 <artifactId>commons-net</artifactId>
69 <version>3.3</version>
70 </dependency>
71 <dependency>
72 <groupId>com.jcraft</groupId>
73 <artifactId>jsch</artifactId>
74 <version>0.1.54</version>
75 </dependency>
76 <dependency>
77 <groupId>com.google.code.gson</groupId>
78 <artifactId>gson</artifactId>
79 </dependency>
80 <dependency>
81 <groupId>org.json</groupId>
82 <artifactId>json</artifactId>
83 <version>20160810</version>
84 </dependency>
85 <dependency>
86 <groupId>javax.servlet</groupId>
87 <artifactId>servlet-api</artifactId>
88 <version>2.5</version>
89 <scope>provided</scope>
90 </dependency>
91 <dependency>
92 <groupId>org.onap.sdc.dcae.property</groupId>
93 <artifactId>DCAE-DT-PROPERTY</artifactId>
94 <version>${project.version}</version>
95 </dependency>
96 </dependencies>
97 </profile>
98 <profile>
99 <id>server</id>
100 <activation>
101 <activeByDefault>true</activeByDefault>
102 </activation>
103 <dependencies>
104 <dependency>
105 <groupId>org.springframework.boot</groupId>
106 <artifactId>spring-boot-starter-web</artifactId>
107 <exclusions>
108 <exclusion>
109 <groupId>org.springframework.boot</groupId>
110 <artifactId>spring-boot-starter-tomcat</artifactId>
111 </exclusion>
112 </exclusions>
113 </dependency>
114 <dependency>
115 <groupId>org.springframework.boot</groupId>
116 <artifactId>spring-boot-starter-test</artifactId>
117 <scope>test</scope>
118 </dependency>
119 <dependency>
120 <groupId>org.apache.commons</groupId>
121 <artifactId>commons-lang3</artifactId>
122 <version>3.5</version>
123 </dependency>
124 <dependency>
125 <groupId>commons-net</groupId>
126 <artifactId>commons-net</artifactId>
127 <version>3.3</version>
128 </dependency>
129 <dependency>
130 <groupId>com.jcraft</groupId>
131 <artifactId>jsch</artifactId>
132 <version>0.1.54</version>
133 </dependency>
134 <dependency>
135 <groupId>com.google.code.gson</groupId>
136 <artifactId>gson</artifactId>
137 </dependency>
138 <dependency>
139 <groupId>org.json</groupId>
140 <artifactId>json</artifactId>
141 </dependency>
142 <dependency>
143 <groupId>javax.servlet</groupId>
144 <artifactId>javax.servlet-api</artifactId>
145 <scope>provided</scope>
146 </dependency>
147 <dependency>
148 <groupId>org.onap.sdc.dcae.property</groupId>
149 <artifactId>DCAE-DT-PROPERTY</artifactId>
150 <version>${project.version}</version>
151 </dependency>
152 </dependencies>
153 </profile>
154
155
156 <profile>
157 <id>docker</id>
158 <properties>
159 <!-- Docker tags -->
160 <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
161 <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag>
162 <docker.latest.tag>${project.version}-latest</docker.latest.tag>
163 <docker.staging.tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</docker.staging.tag>
164 </properties>
165 <activation>
166 <activeByDefault>false</activeByDefault>
167 </activation>
168 <build>
169 <plugins>
170 <plugin>
171 <groupId>org.codehaus.mojo</groupId>
172 <artifactId>build-helper-maven-plugin</artifactId>
173 <version>1.8</version>
174 <executions>
175 <execution>
176 <id>parse-version</id>
177 <goals>
178 <goal>parse-version</goal>
179 </goals>
180 </execution>
181 </executions>
182 </plugin>
183 <plugin>
184 <artifactId>maven-resources-plugin</artifactId>
185 <version>3.0.2</version>
186 <executions>
187 <execution>
188 <id>copy-dcae-fe-war</id>
189 <phase>validate</phase>
190 <goals>
191 <goal>copy-resources</goal>
192 </goals>
193 <configuration>
194 <outputDirectory>${project.basedir}/docker/target</outputDirectory>
195 <resources>
196 <resource>
197 <directory>${project.basedir}/dcaedt_fe/target</directory>
198 <includes>
199 <include>dcae.war</include>
200 </includes>
201 </resource>
202 </resources>
203 </configuration>
204 </execution>
205 <!-- Require to collect also war of Rule Engine -->
206 <!-- T. B. D. -->
207 </executions>
208 </plugin>
209 <plugin>
210 <groupId>io.fabric8</groupId>
211 <artifactId>docker-maven-plugin</artifactId>
212 <version>0.23.0</version>
213 <configuration>
214 <verbose>true</verbose>
215 <apiVersion>1.23</apiVersion>
216 <images>
217 <!-- Build front image -->
218 <image>
219 <name>onap/dcae-fe</name>
220 <alias>dcae-fe</alias>
221 <build>
222 <cleanup>try</cleanup>
223 <dockerFileDir>${project.basedir}/docker</dockerFileDir>
224 <tags>
225 <tag>${docker.tag}</tag>
226 <tag>${docker.latest.tag}</tag>
227 <tag>${docker.staging.tag}</tag>
228 </tags>
229 </build>
230 </image>
231 </images>
232 </configuration>
233 <executions>
234 <execution>
235 <id>clean-images</id>
236 <phase>pre-clean</phase>
237 <goals>
238 <goal>remove</goal>
239 </goals>
240 <configuration>
241 <removeAll>true</removeAll>
242 <image>onap/dcae-fe</image>
243 </configuration>
244 </execution>
245 <execution>
246 <id>generate-images</id>
247 <phase>package</phase>
248 <goals>
249 <goal>build</goal>
250 </goals>
251 </execution>
252 <execution>
253 <id>push-images</id>
254 <phase>deploy</phase>
255 <goals>
256 <goal>push</goal>
257 </goals>
258 <configuration>
259 <image>onap/dcae-fe</image>
260 </configuration>
261 </execution>
262 </executions>
263 </plugin>
264 </plugins>
265 </build>
266 <distributionManagement>
267 <site>
268 <id>nexus</id>
269 <url>dav:${nexus.url}${sitePath}</url>
270 </site>
271 </distributionManagement>
272 </profile>
273
274
275
276
277 </profiles>
278 <build>
279 <finalName>dcae_fe</finalName>
280 <!-- CLEAN -->
281 <plugins>
282 <plugin>
283 <artifactId>maven-clean-plugin</artifactId>
284 <executions>
285 <execution>
286 <id>auto-clean</id>
287 <phase>initialize</phase>
288 <goals>
289 <goal>clean</goal>
290 </goals>
291 </execution>
292 </executions>
293 </plugin>
294 <!-- install node+yarn and run yarn build -->
295 <plugin>
296 <groupId>com.github.eirslett</groupId>
297 <artifactId>frontend-maven-plugin</artifactId>
298 <version>1.6</version>
299 <configuration>
300 <workingDirectory>${project.basedir}/public</workingDirectory>
301 <installDirectory>target</installDirectory>
302 <nodeVersion>v8.7.0</nodeVersion>
303 <yarnVersion>v1.3.2</yarnVersion>
304 </configuration>
305 <executions>
306 <execution>
307 <id>install node and yarn</id>
308 <goals>
309 <goal>install-node-and-yarn</goal>
310 </goals>
311 <phase>generate-resources</phase>
312 </execution>
313 <execution>
314 <id>yarn install</id>
315 <goals>
316 <goal>yarn</goal>
317 </goals>
318 <configuration>
319 <arguments>install</arguments>
320 </configuration>
321 </execution>
322 <execution>
323 <id>angular cli build</id>
324 <goals>
325 <goal>yarn</goal>
326 </goals>
327 <phase>generate-resources</phase>
328 <configuration>
329 <arguments>run build</arguments>
330 </configuration>
331 </execution>
332 </executions>
333 </plugin>
334 <!-- COPT FROM DIST TO WEBAPPS -->
335 <plugin>
336 <artifactId>maven-resources-plugin</artifactId>
337 <executions>
338 <execution>
339 <id>copy-resources</id>
340 <phase>prepare-package</phase>
341 <goals>
342 <goal>copy-resources</goal>
343 </goals>
344 <configuration>
345 <outputDirectory>src/main/webapp</outputDirectory>
346 <resources>
347 <resource>
348 <directory>${project.basedir}/public/dist</directory>
349 <filtering>false</filtering>
350 </resource>
351 </resources>
352 </configuration>
353 </execution>
354 </executions>
355 </plugin>
356 <plugin>
357 <groupId>org.apache.maven.plugins</groupId>
358 <artifactId>maven-war-plugin</artifactId>
359 <version>3.0.0</version>
360 </plugin>
361 </plugins>
362 </build>
363</project>