1 | <?xml version="1.0" encoding="UTF-8"?>
|
2 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
3 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
4 | <modelVersion>4.0.0</modelVersion>
|
5 |
|
6 |
|
7 |
|
8 | <properties>
|
9 | <node.version>4.0.0</node.version>
|
10 | <npm.version>2.13.1</npm.version>
|
11 | </properties>
|
12 |
|
13 | <profiles>
|
14 |
|
15 | |
16 |
|
17 |
|
18 |
|
19 |
|
20 | <profile>
|
21 | <id>node-classifier-linux</id>
|
22 | <activation>
|
23 | <os><family>Linux</family><arch>amd64</arch></os>
|
24 | </activation>
|
25 | <properties>
|
26 | <node.download.file>node-v${node.version}-linux-x64.tar.gz</node.download.file>
|
27 | <node.download.classifier />
|
28 | </properties>
|
29 | </profile>
|
30 | <profile>
|
31 | <id>node-classifier-mac</id>
|
32 | <activation>
|
33 | <os><family>mac</family></os>
|
34 | </activation>
|
35 | <properties>
|
36 | <node.download.file>node-v${node.version}-darwin-x64.tar.gz</node.download.file>
|
37 | <node.download.classifier />
|
38 | </properties>
|
39 | </profile>
|
40 | <profile>
|
41 | <id>node-classifier-windows</id>
|
42 | <activation>
|
43 | <os><family>windows</family><arch>x64</arch></os>
|
44 | </activation>
|
45 | <properties>
|
46 | <node.download.file>win-x64/node.exe</node.download.file>
|
47 | <node.download.classifier>/x64</node.download.classifier>
|
48 | </properties>
|
49 | </profile>
|
50 | <profile>
|
51 | <id>node-classifier-windows-amd64</id>
|
52 | <activation>
|
53 | <os><family>windows</family><arch>amd64</arch></os>
|
54 | </activation>
|
55 | <properties>
|
56 | <node.download.file>win-x64/node.exe</node.download.file>
|
57 | <node.download.classifier>/x64</node.download.classifier>
|
58 | </properties>
|
59 | </profile>
|
60 | <profile>
|
61 | <id>node-classifier-windows-x86</id>
|
62 | <activation>
|
63 | <os><family>windows</family><arch>x86</arch></os>
|
64 | </activation>
|
65 | <properties>
|
66 | <node.download.file>win-x86/node.exe</node.download.file>
|
67 | <node.download.classifier />
|
68 | </properties>
|
69 | </profile>
|
70 | <profile>
|
71 | <id>node-download</id>
|
72 | <activation>
|
73 | <file>
|
74 | <exists>package.json</exists>
|
75 | </file>
|
76 | </activation>
|
77 | <build>
|
78 | <plugins>
|
79 | <plugin>
|
80 | <groupId>com.googlecode.maven-download-plugin</groupId>
|
81 | <artifactId>download-maven-plugin</artifactId>
|
82 | <version>1.2.1</version>
|
83 | <executions>
|
84 | <execution>
|
85 | <id>get-node</id>
|
86 | <phase>initialize</phase>
|
87 | <goals>
|
88 | <goal>wget</goal>
|
89 | </goals>
|
90 | <configuration>
|
91 | <url>https://nodejs.org/dist/v${node.version}/${node.download.file}</url>
|
92 | <unpack>false</unpack>
|
93 | <outputDirectory>${project.build.directory}/frontend/v${node.version}${node.download.classifier}</outputDirectory>
|
94 | </configuration>
|
95 | </execution>
|
96 | <execution>
|
97 | <id>get-npm</id>
|
98 | <phase>initialize</phase>
|
99 | <goals>
|
100 | <goal>wget</goal>
|
101 | </goals>
|
102 | <configuration>
|
103 | <url>http://registry.npmjs.org/npm/-/npm-${npm.version}.tgz</url>
|
104 | <unpack>false</unpack>
|
105 | <outputDirectory>${project.build.directory}/frontend/</outputDirectory>
|
106 | <outputFileName>npm-${npm.version}.tgz</outputFileName>
|
107 | </configuration>
|
108 | </execution>
|
109 | </executions>
|
110 | </plugin>
|
111 | </plugins>
|
112 | </build>
|
113 | </profile>
|
114 | <profile>
|
115 | <id>gulp-execution</id>
|
116 | <activation>
|
117 | <file>
|
118 | <exists>gulpfile.js</exists>
|
119 | </file>
|
120 | </activation>
|
121 | <build>
|
122 | <plugins>
|
123 | <plugin>
|
124 | <groupId>org.apache.maven.plugins</groupId>
|
125 | <artifactId>maven-enforcer-plugin</artifactId>
|
126 | <version>1.3.1</version>
|
127 | <executions>
|
128 | <execution>
|
129 | <id>enforce-versions</id>
|
130 | <goals>
|
131 | <goal>enforce</goal>
|
132 | </goals>
|
133 | <configuration>
|
134 | <rules>
|
135 | <requireMavenVersion>
|
136 | <version>3.1.0</version>
|
137 | </requireMavenVersion>
|
138 | </rules>
|
139 | </configuration>
|
140 | </execution>
|
141 | </executions>
|
142 | </plugin>
|
143 | <plugin>
|
144 | <groupId>com.github.eirslett</groupId>
|
145 | <artifactId>frontend-maven-plugin</artifactId>
|
146 | <version>0.0.23</version>
|
147 |
|
148 | <executions>
|
149 |
|
150 | <execution>
|
151 | <phase>initialize</phase>
|
152 | <id>install node and npm</id>
|
153 | <goals>
|
154 | <goal>install-node-and-npm</goal>
|
155 | </goals>
|
156 | <configuration>
|
157 | <nodeVersion>v${node.version}</nodeVersion>
|
158 | <npmVersion>${npm.version}</npmVersion>
|
159 |
|
160 | <downloadRoot>${project.baseUri}target/frontend/</downloadRoot>
|
161 | </configuration>
|
162 | </execution>
|
163 |
|
164 | <execution>
|
165 | <phase>initialize</phase>
|
166 | <id>npm install</id>
|
167 | <goals>
|
168 | <goal>npm</goal>
|
169 | </goals>
|
170 | <configuration>
|
171 |
|
172 | <arguments>install</arguments>
|
173 | </configuration>
|
174 | </execution>
|
175 |
|
176 | <execution>
|
177 | <phase>generate-sources</phase>
|
178 | <id>gulp bundle</id>
|
179 | <goals>
|
180 | <goal>gulp</goal>
|
181 | </goals>
|
182 | <configuration>
|
183 | <arguments>bundle</arguments>
|
184 | </configuration>
|
185 | </execution>
|
186 |
|
187 | <execution>
|
188 | <phase>test</phase>
|
189 | <id>gulp test</id>
|
190 | <goals>
|
191 | <goal>gulp</goal>
|
192 | </goals>
|
193 | </execution>
|
194 |
|
195 | </executions>
|
196 | </plugin>
|
197 | </plugins>
|
198 | </build>
|
199 | </profile>
|
200 |
|
201 | <profile>
|
202 | <id>clean-node</id>
|
203 | <activation>
|
204 | <file>
|
205 | <exists>package.json</exists>
|
206 | </file>
|
207 | <property>
|
208 | <name>cleanNode</name>
|
209 | </property>
|
210 | </activation>
|
211 | <build>
|
212 | <plugins>
|
213 | <plugin>
|
214 | <groupId>org.apache.maven.plugins</groupId>
|
215 | <artifactId>maven-clean-plugin</artifactId>
|
216 | <configuration>
|
217 | <filesets>
|
218 | <fileset>
|
219 | <directory>node</directory>
|
220 | <followSymlinks>false</followSymlinks>
|
221 | </fileset>
|
222 | <fileset>
|
223 | <directory>node_modules</directory>
|
224 | <followSymlinks>false</followSymlinks>
|
225 | </fileset>
|
226 | </filesets>
|
227 | </configuration>
|
228 | </plugin>
|
229 | </plugins>
|
230 | </build>
|
231 | </profile>
|
232 | </profiles>
|
233 |
|
234 | </project>
|