Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
698 views
in Technique[技术] by (71.8m points)

node.js - Cannot download nodes with eirslett's frontend-maven-plugin - 404

I am using the frontend-maven-plugin from https://github.com/eirslett/ to install node and build my angular app via maven. Unfortunatly I get following exception while building.

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.0:install-node-and-npm (install node and npm) on project frontend: **Could not download Node.js: Got error code 404 from the server.** -> 
[Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.0:install-node-and-npm (install node and npm) 
on project frontend: Could not download Node.js: Got error code 404 from the server. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) ...

The URL of the node root ist correct and can be downloaded manually by me:

   [INFO] Found proxies: [xxx-proxy{protocol='http', host='proxy.xxx', port=8080, nonProxyHosts='*.xxx'}]
   [INFO] Installing node version v12.9.1
   [INFO] Downloading http://nodejs.org/dist/v12.9.1/node-v12.9.1-linux-x64.tar.gz to /home/myname/.m2/repository/com/github/eirslett/node/12.9.1/node-12.9.1-linux-x64.tar.gz
   [INFO] Downloading via proxy xxx-proxy{protocol='http', host='proxy.xxx', port=8080, nonProxyHosts='*.xxx'}`

This is my maven setting:

    <plugin>
                   <groupId>com.github.eirslett</groupId>
                   <artifactId>frontend-maven-plugin</artifactId>
                  <version>1.11.0</version>
                   <configuration>
                       <nodeVersion>v12.9.1</nodeVersion>
                       <npmVersion>5.6.0</npmVersion>
                       <workingDirectory>src/main/resources/cmdbui/</workingDirectory>
                       <installDirectory>target/tmp</installDirectory>
                   </configuration>
                   <executions>
                       <execution>
                           <id>install node and npm</id>
                           <goals>
                               <goal>install-node-and-npm</goal>
                           </goals>
                       </execution>
                       <execution>
                           <id>npm install</id>
                           <goals>
                               <goal>npm</goal>
                           </goals>
                       </execution>
                       <execution>
                           <id>npm run build</id>
                           <goals>
                               <goal>npm</goal>
                           </goals>
                           <configuration>
                               <arguments>run build</arguments>
                           </configuration>
                       </execution>
                       <execution>
                           <id>prod</id>
                           <goals>
                               <goal>npm</goal>
                           </goals>
                           <configuration>
                               <arguments>run-script build</arguments>
                           </configuration>
                           <phase>generate-resources</phase>
                       </execution>
                   </executions>
               </plugin>

In my maven settings.xml our corp. proxy is also set

   <proxy>  
       <id>xxx-proxy</id>  
        <active>true</active>    
        <protocol>http</protocol>     
        <host>proxy.xxx</host>
        <port>8080</port>
        <nonProxyHosts>*.xxx</nonProxyHosts>
  </proxy>

So the plugin should use the proxy correctly given my the maven settings, but still I cannot download node.

question from:https://stackoverflow.com/questions/65626690/cannot-download-nodes-with-eirsletts-frontend-maven-plugin-404

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...