blob: 1e14d9f60e3c3c0c390c3bbeb8a8ece25c0955b6 [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
Michael Lando451a3402017-02-19 10:28:42 +02006 <artifactId>catalog-ui</artifactId>
Michael Landoed64b5e2017-06-09 03:19:04 +03007 <packaging>pom</packaging>
Michael Lando451a3402017-02-19 10:28:42 +02008
9
10 <parent>
11 <groupId>org.openecomp.sdc</groupId>
12 <artifactId>sdc-main</artifactId>
Michael Lando0ad3c802017-09-19 16:32:59 +030013 <version>1.2.0-SNAPSHOT</version>
Michael Lando451a3402017-02-19 10:28:42 +020014 </parent>
15
16
17
18 <build>
19 <plugins>
20
21 <!-- ============================================= -->
22 <!-- Clean webapps folder -->
23 <!-- ============================================= -->
24 <plugin>
25 <artifactId>maven-clean-plugin</artifactId>
26 <version>2.6.1</version>
Michael Landoed64b5e2017-06-09 03:19:04 +030027 <executions>
28 <execution>
29 <id>clean.fe.webapp.folder</id>
30 <phase>initialize</phase>
31 <goals>
32 <goal>clean</goal>
33 </goals>
34 <configuration>
Michael Lando451a3402017-02-19 10:28:42 +020035
Michael Landoed64b5e2017-06-09 03:19:04 +030036 <filesets>
37 <fileset>
38 <directory>${project.parent.basedir}/catalog-fe/src/main/webapp</directory>
39 <includes>
40 <include>**/*</include>
41 <include>*</include>
42 </includes>
43 <excludes>
44 <exclude>META-INF/*</exclude>
45 <exclude>WEB-INF/*</exclude>
46 </excludes>
47 <followSymlinks>false</followSymlinks>
48 </fileset>
49 </filesets>
50 </configuration>
51 </execution>
Tal Gitelman153a3582017-07-03 20:16:55 +030052 <!-- <execution>
53 <id>clean.dist.folder</id>
54 <phase>clean</phase>
55 <goals>
56 <goal>clean</goal>
57 </goals>
58 <configuration>
59 <filesets>
60 <fileset>
61 <directory>${basedir}/node_modules</directory>
62 </fileset>
63 <fileset>
64 <directory>${basedir}/dist</directory>
65 </fileset>
66 </filesets>
67 </configuration>
68 </execution> -->
Michael Landoed64b5e2017-06-09 03:19:04 +030069 </executions>
Michael Lando451a3402017-02-19 10:28:42 +020070 </plugin>
71
ml636r0649e652017-02-20 21:10:54 +020072
ml636rfdb69b52017-02-19 17:04:06 +020073 <plugin>
Michael Lando451a3402017-02-19 10:28:42 +020074 <artifactId>maven-resources-plugin</artifactId>
75 <version>2.7</version>
76 <executions>
77 <execution>
78 <id>copy-resources</id>
79 <phase>package</phase>
80 <goals>
81 <goal>copy-resources</goal>
82 </goals>
83 <configuration>
84 <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
85 <resources>
86 <resource>
Michael Landoed64b5e2017-06-09 03:19:04 +030087 <directory>${project.basedir}/dist</directory>
Michael Lando451a3402017-02-19 10:28:42 +020088 <filtering>false</filtering>
89 </resource>
90 </resources>
91 </configuration>
92 </execution>
93 </executions>
94 </plugin>
Michael Landoed64b5e2017-06-09 03:19:04 +030095 <plugin>
96 <groupId>com.github.eirslett</groupId>
97 <artifactId>frontend-maven-plugin</artifactId>
98 <version>1.4</version>
Michael Lando75aacbb2017-07-17 21:12:03 +030099
Tal Gitelman153a3582017-07-03 20:16:55 +0300100 <configuration>
101 <installDirectory>${project.parent.basedir}</installDirectory>
102 </configuration>
Michael Lando75aacbb2017-07-17 21:12:03 +0300103
Michael Landoed64b5e2017-06-09 03:19:04 +0300104 <executions>
Michael Landoed64b5e2017-06-09 03:19:04 +0300105 <execution>
106 <id>install node and npm</id>
107 <goals>
108 <goal>install-node-and-npm</goal>
109 </goals>
110 <configuration>
111 <!-- See https://nodejs.org/en/download/ for latest node and npm (lts) versions -->
112 <nodeVersion>v6.9.5</nodeVersion>
113 <npmVersion>3.10.10</npmVersion>
114 </configuration>
115 </execution>
Michael Lando75aacbb2017-07-17 21:12:03 +0300116
Tal Gitelman153a3582017-07-03 20:16:55 +0300117 <execution>
118 <id>npm set progress off</id>
119 <goals>
120 <goal>npm</goal>
121 </goals>
122 <configuration>
123 <arguments>set progress=false</arguments>
124 </configuration>
125 </execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300126
127 <execution>
128 <id>npm install</id>
129 <goals>
130 <goal>npm</goal>
131 </goals>
132 <!-- Optional configuration which provides for running any npm command -->
133 <configuration>
134 <arguments>install</arguments>
135 </configuration>
136 </execution>
137
138 <execution>
139 <id>npm run build</id>
140 <goals>
141 <goal>npm</goal>
142 </goals>
143 <configuration>
144 <arguments>run build:prod</arguments>
145 </configuration>
146 </execution>
147 </executions>
148 </plugin>
149
Michael Lando451a3402017-02-19 10:28:42 +0200150 </plugins>
151 </build>
152
Michael Landoed64b5e2017-06-09 03:19:04 +0300153
154
Michael Lando451a3402017-02-19 10:28:42 +0200155 <profiles>
ml636rfdb69b52017-02-19 17:04:06 +0200156 <profile>
Michael Landoed64b5e2017-06-09 03:19:04 +0300157 <id>CI</id>
Michael Lando451a3402017-02-19 10:28:42 +0200158 <activation>
159 <activeByDefault>false</activeByDefault>
160 </activation>
161
162 <build>
163 <plugins>
164 <plugin>
165 <artifactId>maven-resources-plugin</artifactId>
166 <version>2.7</version>
167 <executions>
168 <execution>
169 <id>copy-resources</id>
170 <phase>package</phase>
171 <goals>
172 <goal>copy-resources</goal>
173 </goals>
Michael Landoed64b5e2017-06-09 03:19:04 +0300174
Michael Lando451a3402017-02-19 10:28:42 +0200175 <configuration>
176 <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
177 <resources>
178 <resource>
Michael Landoed64b5e2017-06-09 03:19:04 +0300179 <directory>${project.basedir}/dist</directory>
Michael Lando451a3402017-02-19 10:28:42 +0200180 <filtering>false</filtering>
181 </resource>
182 </resources>
183 </configuration>
184 </execution>
185 </executions>
186 </plugin>
Michael Landoed64b5e2017-06-09 03:19:04 +0300187
188
189
190 <!-- ============================================= -->
191 <!-- Build the UI module node code -->
192 <!-- ============================================= -->
193 <plugin>
194 <groupId>org.codehaus.mojo</groupId>
195 <artifactId>exec-maven-plugin</artifactId>
196 <version>1.4.0</version>
197 <executions>
198
199 <!-- Set execution permissions for the build script -->
200 <execution>
201 <id>set.script.permissions</id>
202 <phase>generate-sources</phase>
203 <goals>
204 <goal>exec</goal>
205 </goals>
206
207 <configuration>
208 <workingDirectory>${project.basedir}</workingDirectory>
209 <executable>/bin/chmod</executable>
210 <arguments>
211 <argument>755</argument>
212 <argument>./build_catalog_ui.sh</argument>
213 </arguments>
214 </configuration>
215 </execution>
216
217 <!-- Run the build script -->
218 <execution>
219 <id>execute grant build</id>
220 <phase>generate-sources</phase>
221 <goals>
222 <goal>exec</goal>
223 </goals>
224
225 <configuration>
226 <workingDirectory>${project.basedir}</workingDirectory>
227 <executable>./build_catalog_ui.sh</executable>
228 </configuration>
229 </execution>
230
231 <!-- Undo checkout the build script -->
232 <execution>
233 <id>undo.checkout.script</id>
234 <phase>generate-sources</phase>
235 <goals>
236 <goal>exec</goal>
237 </goals>
238
239 <configuration>
240 <workingDirectory>${project.basedir}</workingDirectory>
241 <executable>/usr/bin/git</executable>
242 <arguments>
243 <argument>checkout</argument>
244 <argument>--</argument>
245 <argument>./build_catalog_ui.sh</argument>
246 </arguments>
247 </configuration>
248 </execution>
249 </executions>
250 </plugin>
Michael Lando451a3402017-02-19 10:28:42 +0200251 </plugins>
252 </build>
253 </profile>
Michael Landoed64b5e2017-06-09 03:19:04 +0300254
255
Michael Landoed64b5e2017-06-09 03:19:04 +0300256 <profile>
257 <id>not-minified</id>
258 <activation>
259 <activeByDefault>false</activeByDefault>
260 </activation>
261
262 <build>
263 <plugins>
264 <plugin>
265 <artifactId>maven-resources-plugin</artifactId>
266 <version>2.7</version>
267 <executions>
268 <execution>
269 <id>copy-resources</id>
270 <phase>package</phase>
271 <goals>
272 <goal>copy-resources</goal>
273 </goals>
274 <configuration>
275 <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
276 <resources>
277 <resource>
278 <directory>${project.basedir}/app</directory>
279 <includes>
280 <include>languages/**</include>
281 <include>scripts/**</include>
282 <include>styles/**</include>
283 <include>third-party/**</include>
284 <include>index.html</include>
285 <include>robots.txt</include>
286 <include>favicon.png</include>
287 </includes>
288 <filtering>false</filtering>
289 </resource>
290 <resource>
291 <directory>${project.basedir}</directory>
292 <includes>
293 <include>bower_components/**</include>
294 </includes>
295 <filtering>false</filtering>
296 </resource>
297 </resources>
298 </configuration>
299 </execution>
300 </executions>
301 </plugin>
302 </plugins>
303 </build>
304 </profile>
Michael Lando451a3402017-02-19 10:28:42 +0200305 </profiles>
306</project>
307