blob: 9923a6bfa5c16bde7788f56764b40f559c703aac [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>
53 </executions>
Michael Lando451a3402017-02-19 10:28:42 +020054 </plugin>
55
ml636r0649e652017-02-20 21:10:54 +020056
ml636rfdb69b52017-02-19 17:04:06 +020057 <plugin>
Michael Lando451a3402017-02-19 10:28:42 +020058 <artifactId>maven-resources-plugin</artifactId>
59 <version>2.7</version>
60 <executions>
61 <execution>
62 <id>copy-resources</id>
63 <phase>package</phase>
64 <goals>
65 <goal>copy-resources</goal>
66 </goals>
67 <configuration>
68 <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
69 <resources>
70 <resource>
Michael Landoed64b5e2017-06-09 03:19:04 +030071 <directory>${project.basedir}/dist</directory>
Michael Lando451a3402017-02-19 10:28:42 +020072 <filtering>false</filtering>
73 </resource>
74 </resources>
75 </configuration>
76 </execution>
77 </executions>
78 </plugin>
Michael Landoed64b5e2017-06-09 03:19:04 +030079 <plugin>
80 <groupId>com.github.eirslett</groupId>
81 <artifactId>frontend-maven-plugin</artifactId>
82 <version>1.4</version>
83
84 <executions>
85
86 <execution>
87 <id>install node and npm</id>
88 <goals>
89 <goal>install-node-and-npm</goal>
90 </goals>
91 <configuration>
92 <!-- See https://nodejs.org/en/download/ for latest node and npm (lts) versions -->
93 <nodeVersion>v6.9.5</nodeVersion>
94 <npmVersion>3.10.10</npmVersion>
95 </configuration>
96 </execution>
97
98 <execution>
99 <id>npm install</id>
100 <goals>
101 <goal>npm</goal>
102 </goals>
103 <!-- Optional configuration which provides for running any npm command -->
104 <configuration>
105 <arguments>install</arguments>
106 </configuration>
107 </execution>
108
109 <execution>
110 <id>npm run build</id>
111 <goals>
112 <goal>npm</goal>
113 </goals>
114 <configuration>
115 <arguments>run build:prod</arguments>
116 </configuration>
117 </execution>
118 </executions>
119 </plugin>
120
Michael Lando451a3402017-02-19 10:28:42 +0200121 </plugins>
122 </build>
123
Michael Landoed64b5e2017-06-09 03:19:04 +0300124
125
Michael Lando451a3402017-02-19 10:28:42 +0200126 <profiles>
ml636rfdb69b52017-02-19 17:04:06 +0200127 <profile>
Michael Landoed64b5e2017-06-09 03:19:04 +0300128 <id>CI</id>
Michael Lando451a3402017-02-19 10:28:42 +0200129 <activation>
130 <activeByDefault>false</activeByDefault>
131 </activation>
132
133 <build>
134 <plugins>
135 <plugin>
136 <artifactId>maven-resources-plugin</artifactId>
137 <version>2.7</version>
138 <executions>
139 <execution>
140 <id>copy-resources</id>
141 <phase>package</phase>
142 <goals>
143 <goal>copy-resources</goal>
144 </goals>
Michael Landoed64b5e2017-06-09 03:19:04 +0300145
Michael Lando451a3402017-02-19 10:28:42 +0200146 <configuration>
147 <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
148 <resources>
149 <resource>
Michael Landoed64b5e2017-06-09 03:19:04 +0300150 <directory>${project.basedir}/dist</directory>
Michael Lando451a3402017-02-19 10:28:42 +0200151 <filtering>false</filtering>
152 </resource>
153 </resources>
154 </configuration>
155 </execution>
156 </executions>
157 </plugin>
Michael Landoed64b5e2017-06-09 03:19:04 +0300158
159
160
161 <!-- ============================================= -->
162 <!-- Build the UI module node code -->
163 <!-- ============================================= -->
164 <plugin>
165 <groupId>org.codehaus.mojo</groupId>
166 <artifactId>exec-maven-plugin</artifactId>
167 <version>1.4.0</version>
168 <executions>
169
170 <!-- Set execution permissions for the build script -->
171 <execution>
172 <id>set.script.permissions</id>
173 <phase>generate-sources</phase>
174 <goals>
175 <goal>exec</goal>
176 </goals>
177
178 <configuration>
179 <workingDirectory>${project.basedir}</workingDirectory>
180 <executable>/bin/chmod</executable>
181 <arguments>
182 <argument>755</argument>
183 <argument>./build_catalog_ui.sh</argument>
184 </arguments>
185 </configuration>
186 </execution>
187
188 <!-- Run the build script -->
189 <execution>
190 <id>execute grant build</id>
191 <phase>generate-sources</phase>
192 <goals>
193 <goal>exec</goal>
194 </goals>
195
196 <configuration>
197 <workingDirectory>${project.basedir}</workingDirectory>
198 <executable>./build_catalog_ui.sh</executable>
199 </configuration>
200 </execution>
201
202 <!-- Undo checkout the build script -->
203 <execution>
204 <id>undo.checkout.script</id>
205 <phase>generate-sources</phase>
206 <goals>
207 <goal>exec</goal>
208 </goals>
209
210 <configuration>
211 <workingDirectory>${project.basedir}</workingDirectory>
212 <executable>/usr/bin/git</executable>
213 <arguments>
214 <argument>checkout</argument>
215 <argument>--</argument>
216 <argument>./build_catalog_ui.sh</argument>
217 </arguments>
218 </configuration>
219 </execution>
220 </executions>
221 </plugin>
Michael Lando451a3402017-02-19 10:28:42 +0200222 </plugins>
223 </build>
224 </profile>
Michael Landoed64b5e2017-06-09 03:19:04 +0300225
226
227 <profile>
228 <id>Fortify</id>
229 <activation>
230 <activeByDefault>false</activeByDefault>
231 </activation>
232
233 <build>
234 <plugins>
235 <plugin>
236 <groupId>com.fortify.ps.maven.plugin</groupId>
237 <artifactId>sca-maven-plugin</artifactId>
238 <version>4.30</version>
239 <configuration>
240 <source>1.8</source>
241 <buildId>${project.parent.artifactId}</buildId>
242 <toplevelArtifactId>${project.parent.artifactId}</toplevelArtifactId>
243 </configuration>
244 </plugin>
245 </plugins>
246 </build>
247 </profile>
248
249 <profile>
250 <id>not-minified</id>
251 <activation>
252 <activeByDefault>false</activeByDefault>
253 </activation>
254
255 <build>
256 <plugins>
257 <plugin>
258 <artifactId>maven-resources-plugin</artifactId>
259 <version>2.7</version>
260 <executions>
261 <execution>
262 <id>copy-resources</id>
263 <phase>package</phase>
264 <goals>
265 <goal>copy-resources</goal>
266 </goals>
267 <configuration>
268 <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
269 <resources>
270 <resource>
271 <directory>${project.basedir}/app</directory>
272 <includes>
273 <include>languages/**</include>
274 <include>scripts/**</include>
275 <include>styles/**</include>
276 <include>third-party/**</include>
277 <include>index.html</include>
278 <include>robots.txt</include>
279 <include>favicon.png</include>
280 </includes>
281 <filtering>false</filtering>
282 </resource>
283 <resource>
284 <directory>${project.basedir}</directory>
285 <includes>
286 <include>bower_components/**</include>
287 </includes>
288 <filtering>false</filtering>
289 </resource>
290 </resources>
291 </configuration>
292 </execution>
293 </executions>
294 </plugin>
295 </plugins>
296 </build>
297 </profile>
Michael Lando451a3402017-02-19 10:28:42 +0200298 </profiles>
299</project>
300