Skip to content

Instantly share code, notes, and snippets.

@yusiwen
Created March 25, 2020 16:13
Show Gist options
  • Save yusiwen/fe7eb9fc62c2d80e02987affef4b6603 to your computer and use it in GitHub Desktop.
Save yusiwen/fe7eb9fc62c2d80e02987affef4b6603 to your computer and use it in GitHub Desktop.
[frontend-maven-plugin use download mirrors] #java #maven #frontend-maven-plugin
<plugin>
...
<execution>
<!-- optional: you don't really need execution ids, but it looks nice in your build log. -->
<id>install node and yarn</id>
<goals>
<goal>install-node-and-yarn</goal>
</goals>
<!-- optional: default phase is "generate-resources" -->
<phase>generate-resources</phase>
</execution>
<configuration>
<nodeVersion>v6.9.1</nodeVersion>
<yarnVersion>v0.16.1</yarnVersion>
<!-- optional: where to download node from. Defaults to https://nodejs.org/dist/ -->
<nodeDownloadRoot>https://npm.taobao.org/mirrors/node/</nodeDownloadRoot>
<!-- optional: where to download yarn from. Defaults to https://github.com/yarnpkg/yarn/releases/download/ -->
<yarnDownloadRoot>http://myproxy.example.org/yarn/</yarnDownloadRoot>
</configuration>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment