Installation de node et npm avec maven
Installation de node et npm avec maven
Il faut utiliser l'outils : frontend-maven-plugin
Exemple :
1<plugin>
2 ...
3 <executions>
4 <execution>
5 <!-- optional: you don't really need execution ids, but it looks nice in your build log. -->
6 <id>install node and npm</id>
7 <goals>
8 <goal>install-node-and-npm</goal>
9 </goals>
10 <!-- optional: default phase is "generate-resources" -->
11 <phase>generate-resources</phase>
12 </execution>
13 </executions>
14 <configuration>
15 <nodeVersion>v4.6.0</nodeVersion>
16
17 <!-- optional: with node version greater than 4.0.0 will use npm provided by node distribution -->
18 <npmVersion>2.15.9</npmVersion>
19
20 <!-- optional: where to download node and npm from. Defaults to https://nodejs.org/dist/ -->
21 <downloadRoot>http://myproxy.example.org/nodejs/</downloadRoot>
22 </configuration>
23</plugin>