Merge "Replaced all the dependencies of"
[sdc.git] / openecomp-ui / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0"
2          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3          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
6     <groupId>org.openecomp.sdc</groupId>
7     <artifactId>onboarding-fe</artifactId>
8     <name>onboarding-ui-war</name>
9     <packaging>war</packaging>
10
11     <parent>
12         <groupId>org.openecomp.sdc</groupId>
13         <artifactId>sdc-onboarding</artifactId>
14         <version>1.1.0-SNAPSHOT</version>
15         <relativePath>../onboarding</relativePath>
16     </parent>
17
18     <properties>
19         <maven.war.plugin.version>3.0.0</maven.war.plugin.version>
20     </properties>
21
22     <build>
23         <plugins>
24             <plugin>
25                 <artifactId>maven-clean-plugin</artifactId>
26                 <version>2.6.1</version>
27                 <executions>
28                     <execution>
29                         <id>clean.dist.folder</id>
30                         <phase>clean</phase>
31                         <goals>
32                             <goal>clean</goal>
33                         </goals>
34                         <configuration>
35                             <filesets>
36                                 <fileset>
37                                     <directory>${basedir}/dist</directory>
38                                 </fileset>
39                                 <fileset>
40                                     <directory>${basedir}/node_modules</directory>
41                                 </fileset>
42                                 <fileset>
43                                     <directory>${basedir}/../dox-sequence-diagram-ui/dist
44                                     </directory>
45                                 </fileset>
46                                 <fileset>
47                                     <directory>${basedir}/../dox-sequence-diagram-ui/node_modules
48                                     </directory>
49                                 </fileset>
50                             </filesets>
51                         </configuration>
52                     </execution>
53                 </executions>
54             </plugin>
55
56             <!-- ============================================= -->
57             <!-- Build the UI module node code -->
58             <!-- ============================================= -->
59             <plugin>
60                 <groupId>com.github.eirslett</groupId>
61                 <artifactId>frontend-maven-plugin</artifactId>
62                 <version>1.4</version>
63
64                 <configuration>
65                     <installDirectory>${project.parent.parent.basedir}</installDirectory>
66                 </configuration>
67
68                 <executions>
69
70                     <execution>
71                         <id>install node and npm</id>
72                         <goals>
73                             <goal>install-node-and-npm</goal>
74                         </goals>
75                         <configuration>
76                             <nodeVersion>v6.9.5</nodeVersion>
77                             <npmVersion>3.10.10</npmVersion>
78                         </configuration>
79                     </execution>
80
81                     <execution>
82                         <id>npm set progress off</id>
83                         <goals>
84                             <goal>npm</goal>
85                         </goals>
86                         <configuration>
87                             <arguments>set progress=false</arguments>
88                         </configuration>
89                     </execution>
90
91                     <execution>
92                         <id>npm install in dox-sequence-diagram-ui</id>
93                         <goals>
94                             <goal>npm</goal>
95                         </goals>
96                         <configuration>
97                             <workingDirectory>${project.basedir}/../dox-sequence-diagram-ui
98                             </workingDirectory>
99                             <arguments>install</arguments>
100                         </configuration>
101                     </execution>
102
103                     <!-- Fix jQuery dependency in restful-js -->
104                     <execution>
105                         <id>npm restful-js</id>
106                         <goals>
107                             <goal>npm</goal>
108                         </goals>
109                         <configuration>
110                             <arguments>install restful-js</arguments>
111                         </configuration>
112                     </execution>
113                     <execution>
114                         <id>npm install restful-js dependencies</id>
115                         <goals>
116                             <goal>npm</goal>
117                         </goals>
118                         <configuration>
119                             <workingDirectory>${project.basedir}/node_modules/restful-js
120                             </workingDirectory>
121                             <arguments>install --production</arguments>
122                         </configuration>
123                     </execution>
124
125                     <execution>
126                         <id>npm install</id>
127                         <goals>
128                             <goal>npm</goal>
129                         </goals>
130                         <configuration>
131                             <arguments>install</arguments>
132                         </configuration>
133                     </execution>
134
135                     <execution>
136                         <id>npm run build</id>
137                         <goals>
138                             <goal>npm</goal>
139                         </goals>
140                         <configuration>
141                             <arguments>run build -- --version=${project.version}</arguments>
142                         </configuration>
143                     </execution>
144                 </executions>
145             </plugin>
146
147             <plugin>
148                 <artifactId>maven-antrun-plugin</artifactId>
149                 <executions>
150                     <execution>
151                         <id>repack war</id>
152                         <phase>prepare-package</phase>
153                         <configuration>
154                             <tasks>
155                                 <echo message="Building test environment"/>
156                                 <unzip src="dist/onboarding.war" dest="${basedir}/target/dist">
157                                     <patternset>
158                                         <include name="**/*"/>
159                                     </patternset>
160                                 </unzip>
161                             </tasks>
162                         </configuration>
163                         <goals>
164                             <goal>run</goal>
165                         </goals>
166                     </execution>
167                 </executions>
168             </plugin>
169
170             <plugin>
171                 <groupId>org.apache.maven.plugins</groupId>
172                 <artifactId>maven-war-plugin</artifactId>
173                 <version>${maven.war.plugin.version}</version>
174                 <configuration>
175                     <webResources>
176                         <resource>
177                             <directory>${basedir}/target/dist</directory>
178                         </resource>
179                     </webResources>
180                 </configuration>
181             </plugin>
182         </plugins>
183     </build>
184
185 </project>