frontend-maven-plugin
frontend-maven-plugin copied to clipboard
Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.0:install-node-and-npm unknow host
i want to use frontend-maven-plugin to build a .zip for my web-app "Gulp bower npm node" purpose, i get these error, i'm in entreprise network , maven proxy is coonfigured the proxy environement is set the same project configuration work in my proper laptop and a generate my zip but not in the entreprise Help !!!
[INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Front end load offre 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- frontend-maven-plugin:1.0:install-node-and-npm (install node and npm) @ webApp --- [INFO] Installing node version v5.11.0 [INFO] Downloading https://nodejs.org/dist/v5.11.0/win-x86/node.exe to C:\Users\uuu.m2\repository\com\github\eirslett\node\5.11.0\node-5.11.0-windows -x86.exe [INFO] No proxies configured [INFO] No proxy was configured, downloading directly [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.750 s [INFO] Finished at: 2016-05-10T18:21:03+02:00 [INFO] Final Memory: 8M/20M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.0:install-node-and-npm (install node and npm) on project webApp: Could not downlo ad Node.js from: https://nodejs.org/dist/v5.11.0/win-x86/node.exe: Could not download https://nodejs.org/dist/v5.11.0/win-x86/node.exe: Unknown host Ceci es t habituellement une erreur temporaire qui se produit durant la résolution du nom d?hôte et qui signifie que le serveur local n?a pas reçu de réponse d?un s erveur faisant autorité -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.0:install-node-and-npm (install n ode and npm) on project webApp: Could not download Node.js from: https://nodejs.org/dist/v5.11.0/win-x86/node.exe: Could not download https://nodejs.org/dis t/v5.11.0/win-x86/node.exe at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoFailureException: Could not download Node.js from: https://nodejs.org/dist/v5.11.0/win-x86/node.exe: Could not downlo ad https://nodejs.org/dist/v5.11.0/win-x86/node.exe at com.github.eirslett.maven.plugins.frontend.mojo.MojoUtils.toMojoFailureException(MojoUtils.java:25) at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:97) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ... 20 more Caused by: com.github.eirslett.maven.plugins.frontend.lib.InstallationException: Could not download Node.js from: https://nodejs.org/dist/v5.11.0/win-x86/no de.exe at com.github.eirslett.maven.plugins.frontend.lib.DefaultNodeAndNPMInstaller$NodeAndNPMInstallAction.installNodeForWindows(NodeAndNPMInstaller.java: 254) at com.github.eirslett.maven.plugins.frontend.lib.DefaultNodeAndNPMInstaller$NodeAndNPMInstallAction.install(NodeAndNPMInstaller.java:71) at com.github.eirslett.maven.plugins.frontend.lib.DefaultNodeAndNPMInstaller.install(NodeAndNPMInstaller.java:46) at com.github.eirslett.maven.plugins.frontend.mojo.InstallNodeAndNpmMojo.execute(InstallNodeAndNpmMojo.java:72) at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:89) ... 22 more Caused by: com.github.eirslett.maven.plugins.frontend.lib.DownloadException: Could not download https://nodejs.org/dist/v5.11.0/win-x86/node.exe at com.github.eirslett.maven.plugins.frontend.lib.DefaultFileDownloader.download(FileDownloader.java:71) at com.github.eirslett.maven.plugins.frontend.lib.DefaultNodeAndNPMInstaller$NodeAndNPMInstallAction.downloadFile(NodeAndNPMInstaller.java:298) at com.github.eirslett.maven.plugins.frontend.lib.DefaultNodeAndNPMInstaller$NodeAndNPMInstallAction.downloadFileIfMissing(NodeAndNPMInstaller.java: 292) at com.github.eirslett.maven.plugins.frontend.lib.DefaultNodeAndNPMInstaller$NodeAndNPMInstallAction.installNodeForWindows(NodeAndNPMInstaller.java: 247) ... 26 more Caused by: java.net.UnknownHostException: Ceci est habituellement une erreur temporaire qui se produit durant la résolution du nom d?hôte et qui signifie qu e le serveur local n?a pas reçu de réponse d?un serveur faisant autorité at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at com.github.eirslett.maven.plugins.frontend.lib.DefaultFileDownloader.execute(FileDownloader.java:86) at com.github.eirslett.maven.plugins.frontend.lib.DefaultFileDownloader.download(FileDownloader.java:59) ... 29 more [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Maybe it was a random failure?
I don't think so, in the Readme i found this: If you have configured proxy settings for Maven in your settings.xml file, the plugin will automatically use the proxy for downloading node and npm, as well as passing the proxy to npm commands. but the "install-node-and-npm" command not able to pass the proxy so it don't get access to download node.exe. i think it has to be a configuration for proxy to add to the plugin because by default it doesn't use the maven or the environement path proxy.
In your build log, it says:
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
That means it cannot find any settings.xml file in your .m2 directory (In C:\Users\yboug.m2\settings.xml or something like that) that contains proxy configuration.
On thing that might be confusing is that it's referring to a HTTP proxy here, while you're probably thinking of a Maven proxy, which is somethine else entirely. If you look at a couple of closed issues in the Github repo, you'll find other people in the same situation, and how they've solved it in their nexus repository.
I will see this !! i will share the solution thx eirslett
Was there any solution here?
I didn't find any solutions. Now i use Jenkins with nodejs pluggin
please provide any solution for Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.0:gulp
I did not find a solution for this issue, the problem is cosed by your Proxy config if you are in internal network, for me he check in the nexus maven repo so it can't find it. I installed nodeJS on Jenkins to use frontend zip directly.
Hi, it wasn't real obvious, but it does work if you use the 《downloadRoot》attribute of the 《configuration》 element of the frontend-maven-plugin. See readme for https://github.com/eirslett/frontend-maven-plugin for details.
Regards, Dave McLure
On Sep 9, 2016 11:48 PM, "mishrkam" [email protected] wrote:
please provide any solution for Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.0:gulp
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/eirslett/frontend-maven-plugin/issues/416#issuecomment-245521463, or mute the thread https://github.com/notifications/unsubscribe-auth/AAq5YTSJ_mlUm94Shrcam-Yj4agYow5pks5qn789gaJpZM4IbSXZ .
You can use npm scripts as a workaround for this issue.
in your package.json add :
"scripts": {
"bower-install" : "bower install"
}
and in pom.xml :
<execution>
<id>npm bower-install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run bower-install</arguments>
</configuration>
</execution>
it does not work my maven is 3.1.0
Its so silly but,
In my case, Angular v5.1.0
was hiding the real errors. Reinstalling v5.1.0
didn't fix the issue, but once I downgraded back to v5.0.3
, module errors started to pop up and I was able to fix them one by one.
For me the problem was that for my npm version I had v6.14.6 instead of 6.14.6. Switching that worked.
you can use env var -DproxyHost=myproxy.com -DproxyPort=portNumber in your jenkins file.