blob: 80d534c669cc0ed6e7ad1d4a836d7232cf956ef9 [file] [log] [blame]
Michael Lando451a3402017-02-19 10:28:42 +02001<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
4 <modelVersion>4.0.0</modelVersion>
5
6 <groupId>org.openecomp.sdc</groupId>
7 <artifactId>catalog-ui</artifactId>
Michael Landoed64b5e2017-06-09 03:19:04 +03008 <packaging>pom</packaging>
Michael Lando451a3402017-02-19 10:28:42 +02009
10
11 <parent>
12 <groupId>org.openecomp.sdc</groupId>
13 <artifactId>sdc-main</artifactId>
Michael Landoebd7c8f2017-03-15 20:38:00 +020014 <version>1.1.0-SNAPSHOT</version>
Michael Lando451a3402017-02-19 10:28:42 +020015 </parent>
16
17
18
19 <build>
20 <plugins>
21
22 <!-- ============================================= -->
23 <!-- Clean webapps folder -->
24 <!-- ============================================= -->
25 <plugin>
26 <artifactId>maven-clean-plugin</artifactId>
27 <version>2.6.1</version>
Michael Landoed64b5e2017-06-09 03:19:04 +030028 <executions>
29 <execution>
30 <id>clean.fe.webapp.folder</id>
31 <phase>initialize</phase>
32 <goals>
33 <goal>clean</goal>
34 </goals>
35 <configuration>
Michael Lando451a3402017-02-19 10:28:42 +020036
Michael Landoed64b5e2017-06-09 03:19:04 +030037 <filesets>
38 <fileset>
39 <directory>${project.parent.basedir}/catalog-fe/src/main/webapp</directory>
40 <includes>
41 <include>**/*</include>
42 <include>*</include>
43 </includes>
44 <excludes>
45 <exclude>META-INF/*</exclude>
46 <exclude>WEB-INF/*</exclude>
47 </excludes>
48 <followSymlinks>false</followSymlinks>
49 </fileset>
50 </filesets>
51 </configuration>
52 </execution>
Tal Gitelman153a3582017-07-03 20:16:55 +030053 <!-- <execution>
54 <id>clean.dist.folder</id>
55 <phase>clean</phase>
56 <goals>
57 <goal>clean</goal>
58 </goals>
59 <configuration>
60 <filesets>
61 <fileset>
62 <directory>${basedir}/node_modules</directory>
63 </fileset>
64 <fileset>
65 <directory>${basedir}/dist</directory>
66 </fileset>
67 </filesets>
68 </configuration>
69 </execution> -->
Michael Landoed64b5e2017-06-09 03:19:04 +030070 </executions>
Michael Lando451a3402017-02-19 10:28:42 +020071 </plugin>
72
ml636r0649e652017-02-20 21:10:54 +020073
ml636rfdb69b52017-02-19 17:04:06 +020074 <plugin>
Michael Lando451a3402017-02-19 10:28:42 +020075 <artifactId>maven-resources-plugin</artifactId>
76 <version>2.7</version>
77 <executions>
78 <execution>
79 <id>copy-resources</id>
80 <phase>package</phase>
81 <goals>
82 <goal>copy-resources</goal>
83 </goals>
84 <configuration>
85 <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
86 <resources>
87 <resource>
Michael Landoed64b5e2017-06-09 03:19:04 +030088 <directory>${project.basedir}/dist</directory>
Michael Lando451a3402017-02-19 10:28:42 +020089 <filtering>false</filtering>
90 </resource>
91 </resources>
92 </configuration>
93 </execution>
94 </executions>
95 </plugin>
Michael Landoed64b5e2017-06-09 03:19:04 +030096 <plugin>
97 <groupId>com.github.eirslett</groupId>
98 <artifactId>frontend-maven-plugin</artifactId>
99 <version>1.4</version>
Michael Lando75aacbb2017-07-17 21:12:03 +0300100
Tal Gitelman153a3582017-07-03 20:16:55 +0300101 <configuration>
102 <installDirectory>${project.parent.basedir}</installDirectory>
103 </configuration>
Michael Lando75aacbb2017-07-17 21:12:03 +0300104
Michael Landoed64b5e2017-06-09 03:19:04 +0300105 <executions>
Michael Landoed64b5e2017-06-09 03:19:04 +0300106 <execution>
107 <id>install node and npm</id>
108 <goals>
109 <goal>install-node-and-npm</goal>
110 </goals>
111 <configuration>
112 <!-- See https://nodejs.org/en/download/ for latest node and npm (lts) versions -->
113 <nodeVersion>v6.9.5</nodeVersion>
114 <npmVersion>3.10.10</npmVersion>
115 </configuration>
116 </execution>
Michael Lando75aacbb2017-07-17 21:12:03 +0300117
Tal Gitelman153a3582017-07-03 20:16:55 +0300118 <execution>
119 <id>npm set progress off</id>
120 <goals>
121 <goal>npm</goal>
122 </goals>
123 <configuration>
124 <arguments>set progress=false</arguments>
125 </configuration>
126 </execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300127
128 <execution>
129 <id>npm install</id>
130 <goals>
131 <goal>npm</goal>
132 </goals>
133 <!-- Optional configuration which provides for running any npm command -->
134 <configuration>
135 <arguments>install</arguments>
136 </configuration>
137 </execution>
138
139 <execution>
140 <id>npm run build</id>
141 <goals>
142 <goal>npm</goal>
143 </goals>
144 <configuration>
145 <arguments>run build:prod</arguments>
146 </configuration>
147 </execution>
148 </executions>
149 </plugin>
150
Michael Lando451a3402017-02-19 10:28:42 +0200151 </plugins>
152 </build>
153
Michael Landoed64b5e2017-06-09 03:19:04 +0300154
155
Michael Lando451a3402017-02-19 10:28:42 +0200156 <profiles>
ml636rfdb69b52017-02-19 17:04:06 +0200157 <profile>
Michael Landoed64b5e2017-06-09 03:19:04 +0300158 <id>CI</id>
Michael Lando451a3402017-02-19 10:28:42 +0200159 <activation>
160 <activeByDefault>false</activeByDefault>
161 </activation>
162
163 <build>
164 <plugins>
165 <plugin>
166 <artifactId>maven-resources-plugin</artifactId>
167 <version>2.7</version>
168 <executions>
169 <execution>
170 <id>copy-resources</id>
171 <phase>package</phase>
172 <goals>
173 <goal>copy-resources</goal>
174 </goals>
Michael Landoed64b5e2017-06-09 03:19:04 +0300175
Michael Lando451a3402017-02-19 10:28:42 +0200176 <configuration>
177 <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
178 <resources>
179 <resource>
Michael Landoed64b5e2017-06-09 03:19:04 +0300180 <directory>${project.basedir}/dist</directory>
Michael Lando451a3402017-02-19 10:28:42 +0200181 <filtering>false</filtering>
182 </resource>
183 </resources>
184 </configuration>
185 </execution>
186 </executions>
187 </plugin>
Michael Landoed64b5e2017-06-09 03:19:04 +0300188
189
190
191 <!-- ============================================= -->
192 <!-- Build the UI module node code -->
193 <!-- ============================================= -->
194 <plugin>
195 <groupId>org.codehaus.mojo</groupId>
196 <artifactId>exec-maven-plugin</artifactId>
197 <version>1.4.0</version>
198 <executions>
199
200 <!-- Set execution permissions for the build script -->
201 <execution>
202 <id>set.script.permissions</id>
203 <phase>generate-sources</phase>
204 <goals>
205 <goal>exec</goal>
206 </goals>
207
208 <configuration>
209 <workingDirectory>${project.basedir}</workingDirectory>
210 <executable>/bin/chmod</executable>
211 <arguments>
212 <argument>755</argument>
213 <argument>./build_catalog_ui.sh</argument>
214 </arguments>
215 </configuration>
216 </execution>
217
218 <!-- Run the build script -->
219 <execution>
220 <id>execute grant build</id>
221 <phase>generate-sources</phase>
222 <goals>
223 <goal>exec</goal>
224 </goals>
225
226 <configuration>
227 <workingDirectory>${project.basedir}</workingDirectory>
228 <executable>./build_catalog_ui.sh</executable>
229 </configuration>
230 </execution>
231
232 <!-- Undo checkout the build script -->
233 <execution>
234 <id>undo.checkout.script</id>
235 <phase>generate-sources</phase>
236 <goals>
237 <goal>exec</goal>
238 </goals>
239
240 <configuration>
241 <workingDirectory>${project.basedir}</workingDirectory>
242 <executable>/usr/bin/git</executable>
243 <arguments>
244 <argument>checkout</argument>
245 <argument>--</argument>
246 <argument>./build_catalog_ui.sh</argument>
247 </arguments>
248 </configuration>
249 </execution>
250 </executions>
251 </plugin>
Michael Lando451a3402017-02-19 10:28:42 +0200252 </plugins>
253 </build>
254 </profile>
Michael Landoed64b5e2017-06-09 03:19:04 +0300255
256
Michael Landoed64b5e2017-06-09 03:19:04 +0300257 <profile>
258 <id>not-minified</id>
259 <activation>
260 <activeByDefault>false</activeByDefault>
261 </activation>
262
263 <build>
264 <plugins>
265 <plugin>
266 <artifactId>maven-resources-plugin</artifactId>
267 <version>2.7</version>
268 <executions>
269 <execution>
270 <id>copy-resources</id>
271 <phase>package</phase>
272 <goals>
273 <goal>copy-resources</goal>
274 </goals>
275 <configuration>
276 <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
277 <resources>
278 <resource>
279 <directory>${project.basedir}/app</directory>
280 <includes>
281 <include>languages/**</include>
282 <include>scripts/**</include>
283 <include>styles/**</include>
284 <include>third-party/**</include>
285 <include>index.html</include>
286 <include>robots.txt</include>
287 <include>favicon.png</include>
288 </includes>
289 <filtering>false</filtering>
290 </resource>
291 <resource>
292 <directory>${project.basedir}</directory>
293 <includes>
294 <include>bower_components/**</include>
295 </includes>
296 <filtering>false</filtering>
297 </resource>
298 </resources>
299 </configuration>
300 </execution>
301 </executions>
302 </plugin>
303 </plugins>
304 </build>
305 </profile>
Michael Lando451a3402017-02-19 10:28:42 +0200306 </profiles>
307</project>
308