Merge "Fix UI and docker"
[sdc.git] / catalog-ui / pom.xml
1 <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>
8         <packaging>pom</packaging>
9
10
11         <parent>
12                 <groupId>org.openecomp.sdc</groupId>
13                 <artifactId>sdc-main</artifactId>
14                 <version>1.0.0-SNAPSHOT</version>
15         </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>
28                                 <executions>
29                                         <execution>
30                                                 <id>clean.fe.webapp.folder</id>
31                                                 <phase>initialize</phase>
32                                                 <goals>
33                                                         <goal>clean</goal>
34                                                 </goals>
35                                                 <configuration>
36
37                                                         <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>
54                         </plugin>
55
56
57                         <plugin>
58                                 <groupId>io.wcm.maven.plugins</groupId>
59                                 <artifactId>nodejs-maven-plugin</artifactId>
60                                 <executions>
61                                         <execution>
62                                                 <phase>compile</phase>
63                                                 <goals>
64                                                         <goal>run</goal>
65                                                 </goals>
66                                         </execution>
67                                 </executions>
68                                 <configuration>
69                                         <tasks>
70                                                 <npmInstallTask>
71                                                         <workingDirectory>${project.basedir}</workingDirectory>
72                                                 </npmInstallTask>
73                                                 <nodeJsTask>
74                                                         <workingDirectory>${project.basedir}</workingDirectory>
75                                                         <moduleName>bower</moduleName>
76                                                         <arguments>
77                                                                 <argument>install</argument>
78                                                         </arguments>
79                                                 </nodeJsTask>
80                                                 <nodeJsTask>
81                                                         <workingDirectory>${project.basedir}</workingDirectory>
82                                                         <moduleName>grunt</moduleName>
83                                                         <arguments>
84                                                                 <argument>build</argument>
85                                                         </arguments>
86                                                 </nodeJsTask>
87                                                 <!-- <npmInstallTask>
88                                                         <workingDirectory>${project.basedir}</workingDirectory>
89                                                 </npmInstallTask>
90                                                 <nodeJsTask>
91                                                         <workingDirectory>${project.basedir}</workingDirectory>
92                                                         <moduleName>gulp</moduleName>
93                                                         <arguments>
94                                                                 <argument>build</argument>
95                                                         </arguments>
96                                                 </nodeJsTask> -->
97                                         </tasks>
98                                 </configuration>
99                         </plugin>
100
101
102                         <!-- <plugin>
103                                 <groupId>com.github.eirslett</groupId>
104                                 <artifactId>frontend-maven-plugin</artifactId>
105                                 <version>1.3</version>
106                                 <configuration>
107                                         <nodeVersion>v7.5.0</nodeVersion>
108                                         <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
109                                         <npmDownloadRoot>https://nodejs.org/dist/npm/</npmDownloadRoot>
110                                         <installDirectory>./</installDirectory>
111                                 </configuration>
112                                 <executions>
113                                         <execution>
114                                                 <id>install node and npm</id>
115                                                 <goals>
116                                                         <goal>install-node-and-npm</goal>
117                                                 </goals>
118                                                 <phase>generate-resources</phase>
119                                         </execution>
120
121                                         <execution>
122                                                 <id>npm install bower</id>
123                                                 <goals>
124                                                         <goal>npm</goal>
125                                                 </goals>
126
127                                                 <phase>generate-resources</phase>
128
129                                                 <configuration>
130                                                         <arguments>install bower</arguments>
131                                                 </configuration>
132                                         </execution>
133                                         
134                                         <execution>
135                                                 <id>npm install grunt-cli</id>
136                                                 <goals>
137                                                         <goal>npm</goal>
138                                                 </goals>
139
140                                                 <phase>generate-resources</phase>
141
142                                                 <configuration>
143                                                         <arguments>install grunt-cli</arguments>
144                                                 </configuration>
145                                         </execution>
146                                         
147                                         <execution>
148                                                 <id>npm install</id>
149                                                 <goals>
150                                                         <goal>npm</goal>
151                                                 </goals>
152
153                                                 <phase>generate-resources</phase>
154
155                                                 <configuration>
156                                                         <arguments>install</arguments>
157                                                 </configuration>
158                                         </execution>
159
160                                         <execution>
161                                                 <id>bower install</id>
162                                                 <goals>
163                                                         <goal>bower</goal>
164                                                 </goals>
165
166                                                 <configuration>
167                                                         <arguments>install</arguments>
168                                                 </configuration>
169                                         </execution>
170                                         
171                                         <execution>
172                                                 <id>grunt build</id>
173                                                 <goals>
174                                                         <goal>grunt</goal>
175                                                 </goals>
176
177                                                 <phase>generate-resources</phase>
178
179                                                 <configuration>
180                                                         <arguments>build</arguments>
181                                                 </configuration>
182                                         </execution>
183
184                                 </executions>
185                         </plugin>
186  -->
187                         <plugin>
188                                 <artifactId>maven-resources-plugin</artifactId>
189                                 <version>2.7</version>
190                                 <executions>
191                                         <execution>
192                                                 <id>copy-resources</id>
193                                                 <phase>package</phase>
194                                                 <goals>
195                                                         <goal>copy-resources</goal>
196                                                 </goals>
197                                                 <configuration>
198                                                         <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
199                                                         <resources>
200                                                                 <resource>
201                                                                         <directory>${project.basedir}/app/dist</directory>
202                                                                         <filtering>false</filtering>
203                                                                 </resource>
204                                                         </resources>
205                                                 </configuration>
206                                         </execution>
207                                 </executions>
208                         </plugin>
209                 </plugins>
210         </build>
211
212         <profiles>
213
214
215                 <profile>
216                         <id>not-minified</id>
217                         <activation>
218                                 <activeByDefault>false</activeByDefault>
219                         </activation>
220
221                         <build>
222                                 <plugins>
223                                         <plugin>
224                                                 <artifactId>maven-resources-plugin</artifactId>
225                                                 <version>2.7</version>
226                                                 <executions>
227                                                         <execution>
228                                                                 <id>copy-resources</id>
229                                                                 <phase>package</phase>
230                                                                 <goals>
231                                                                         <goal>copy-resources</goal>
232                                                                 </goals>
233                                                                 <configuration>
234                                                                         <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
235                                                                         <resources>
236                                                                                 <resource>
237                                                                                         <directory>${project.basedir}/app</directory>
238                                                                                         <includes>
239                                                                                                 <include>languages/**</include>
240                                                                                                 <include>scripts/**</include>
241                                                                                                 <include>styles/**</include>
242                                                                                                 <include>third-party/**</include>
243                                                                                                 <include>index.html</include>
244                                                                                                 <include>robots.txt</include>
245                                                                                                 <include>favicon.png</include>
246                                                                                         </includes>
247                                                                                         <filtering>false</filtering>
248                                                                                 </resource>
249                                                                                 <resource>
250                                                                                         <directory>${project.basedir}</directory>
251                                                                                         <includes>
252                                                                                                 <include>bower_components/**</include>
253                                                                                         </includes>
254                                                                                         <filtering>false</filtering>
255                                                                                 </resource>
256                                                                         </resources>
257                                                                 </configuration>
258                                                         </execution>
259                                                 </executions>
260                                         </plugin>
261                                 </plugins>
262                         </build>
263                 </profile>
264         </profiles>
265 </project>
266