When running yarn install through maven-front-end plugin behind a corporate proxy, the installation is failing at goal "yarn" with the following error:
[ERROR] error An unexpected error occurred: "https://registry.yarnpkg.com/@angular/forms/-/forms-4.4.3.tgz: Request failed \"403 Forbidden\"".
The appropriate section of the pom.xml
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>install node and yarn</id>
<phase>generate-resources</phase>
<goals>
<goal>install-node-and-yarn</goal>
</goals>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<yarnVersion>${yarn.version}</yarnVersion>
</configuration>
</execution>
<execution>
<id>yarn set proxy config</id>
<phase>generate-resources</phase>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>config set strict-ssl false -g</arguments>
</configuration>
</execution>
<execution>
<id>yarn install</id>
<phase>generate-resources</phase>
<goals>
<goal>yarn</goal> --- Fails here
</goals>
</execution>
</executions>
</plugin>
Can anyone please point out what may be the issue ? Here is the log:
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ plmapp-web2
[INFO] --- frontend-maven-plugin:1.6:install-node-and-yarn (install node and yarn) @ plmapp-web2 ---
[INFO] Found proxies: [optional{protocol='http', host='proxy', port=8080}, optional_https{protocol='https', host='proxy', port=8080}]
[INFO] Node v6.11.3 is already installed. [INFO] Yarn 1.1.0 is already installed.
[INFO] Found proxies: [optional{protocol='http', host='proxy', port=8080}, optional_https{protocol='https', host='proxy', port=8080}]
[INFO] Running 'yarn config set strict-ssl false -g --https-proxy=http://proxy:8080 --proxy=http://proxy:8080' in /tmp/plm/build-dir/PWA-PWA-JOB1/plmapp-web2
[INFO] yarn config v1.1.0
[INFO] success Set "strict-ssl" to "false". [INFO] Done in 0.09s.
[INFO] [INFO] --- frontend-maven-plugin:1.6:yarn (yarn install) @ plmapp-web2 ---
[INFO] Found proxies: [optional{protocol='http', host='proxy', port=8080}, optional_https{protocol='https', host='proxy', port=8080}]
[INFO] Running 'yarn --https-proxy=http://proxy:8080 --proxy=http://proxy:8080' in /tmp/plm/build-dir/PWA-PWA-JOB1/plmapp-web2
[INFO] yarn install v1.1.0
[INFO] [1/4] Resolving packages...
[INFO] [2/4] Fetching packages...
[INFO] info If you think this is a bug, please open a bug report with the information provided in "/tmp/plm/build-dir/PWA-PWA-JOB1/plmapp-web2/yarn-error.log".
[INFO] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[ERROR] error An unexpected error occurred: "https://registry.yarnpkg.com/@angular/forms/-/forms-4.4.3.tgz: Request failed \"403 Forbidden\"".