frontend-maven-plugin
frontend-maven-plugin copied to clipboard
Allow sef-singed certificates when downloading npm and node
Do you want to request a feature or report a bug? feature
What is the current behavior? Goal: install-node-and-npm Could not download artifacts (node and npm) from custom location due to missing certificates. Error message:
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
What is the expected behavior? Please add a configuration parameter to goal install-node-and-npm to be able to skip ssl validation. I guess changes have to made in class FileDownloader: https://github.com/eirslett/frontend-maven-plugin/blob/master/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/FileDownloader.java
Following code creates HttpClient that can handle self-singed certificates:
SSLContextBuilder sslContextBuilder = new SSLContextBuilder();
sslContextBuilder.loadTrustMaterial(null, new TrustSelfSignedStrategy());
SSLConnectionSocketFactory sslConSocketFactory = new SSLConnectionSocketFactory(sslContextBuilder.build());
HttpClients.custom().setSSLSocketFactory(sslConSocketFactory).build();
Please mention your frontend-maven-plugin and operating system version. 1.8.0 Windows 7
https://issues.apache.org/jira/browse/HTTPCLIENT-1128