← All tasks
javaapache/incubator-seata #8189Not a task: already works

Bug: The frontend-maven-plugin fails to use the -DnodeVersion property to override the Node version that will be downloaded

envgap__apache__incubator-seata-8189

01 / FAILURE SIGNATURE

As reported upstream

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.15.0:install-node-and-npm (install node and npm) on project seata-console: Could not download Node.js: Got error code 404 from the server. -> [Help 1]
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
47c6f82278224d279864410e42baeb9c583bc319
Manifest
build/pom.xml
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

apache/incubator-seata #8189 · read the original issue
### Check Ahead

- [x] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.

- [x] I am willing to try to fix this bug myself.


### Ⅰ. Issue Description

- Unable to use `-DnodeVersion` to modify the Node version number to be downloaded.

    ```xml
    <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <configuration>
            <workingDirectory>src/main/resources/static/console-fe</workingDirectory>
        </configuration>
        <executions>
            <execution>
                <id>install node and npm</id>
                <goals>
                    <goal>install-node-and-npm</goal>
                </goals>
                <phase>generate-resources</phase>
                <configuration>
                    <nodeVersion>v19.5.0</nodeVersion>
                </configuration>
            </execution>
            <!-- ... -->
        </executions>
    </plugin>
    ```

### Ⅱ. Describe what happened

1. While executing the compilation commands on a Loongson (LoongArch) computer, it was observed that the Node.js 19.5.0 release for the Loongson architecture is not available at https://unofficial-builds.nodejs.org/download/release/.

    ```shell
    mvn -V -T 1C package -pl console -am -DskipTests -Dgrpc.version=1.54.2 -DnodeDownloadRoot=https://unofficial-builds.nodejs.org/download/release/ 
    ```

    ```shell
    debian-14:/srv/java/incubator-seata# mvn -V -T 1C package -pl console -am -DskipTests -Dgrpc.version=1.54.2 -DnodeDownloadRoot=https://unofficial-builds.nodejs.org/download/release/ 
    Apache Maven 3.9.16 (2bdd9fddda4b155ebf8000e807eb73fd829a51d5)
    Maven home: /srv/apache-maven-3.9.16
    Java version: 25.0.3, vendor: Loongson, runtime: /srv/jdk-25.0.3
    Default locale: en_US, platform encoding: UTF-8
    OS name: "linux", version: "7.1.3+deb14-loong64", arch: "loongarch64", family: "unix"
    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Detecting the operating system and CPU architecture
    [INFO] ------------------------------------------------------------------------
    [INFO] os.detected.name: linux
    [INFO] os.detected.arch: loongarch_64
    [INFO] os.detected.version: 7.1
    [INFO] os.detected.version.major: 7
    [INFO] os.detected.version.minor: 1
    [INFO] os.detected.release: debian
    [INFO] os.detected.release.like.debian: true
    [INFO] os.detected.classifier: linux-loongarch_64
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Build Order:
    [INFO] 
    [INFO] Seata Build 2.8.0-SNAPSHOT                                         [pom]
    [INFO] Seata Parent POM 2.8.0-SNAPSHOT                                    [pom]
    [INFO] seata-common 2.8.0-SNAPSHOT                                        [jar]
    [INFO] seata-console 2.8.0-SNAPSHOT                                       [jar]
    [INFO] 
    
    ......
    
    [INFO] --- frontend:1.15.0:install-node-and-npm (install node and npm) @ seata-console ---
    [WARNING] Unable to determine current node version: org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2)
    [INFO] Installing node version v19.5.0
    [INFO] Downloading https://unofficial-builds.nodejs.org/download/release/v19.5.0/node-v19.5.0-linux-loong64.tar.gz to /srv/apache-maven-repo/com/github/eirslett/node/19.5.0/node-19.5.0-linux-loong64.tar.gz
    [INFO] No proxies configured
    [INFO] No proxy was configured, downloading directly
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary for Seata Parent POM 2.8.0-SNAPSHOT 2.8.0-SNAPSHOT:
    [INFO] 
    [INFO] Seata Build 2.8.0-SNAPSHOT ......................... SUCCESS [  1.239 s]
    [INFO] Seata Parent POM 2.8.0-SNAPSHOT .................... SUCCESS [  2.278 s]
    [INFO] seata-common 2.8.0-SNAPSHOT ........................ SUCCESS [  1.650 s]
    [INFO] seata-console 2.8.0-SNAPSHOT ....................... FAILURE [  2.766 s]
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  9.135 s (Wall Clock)
    [INFO] Finished at: 2026-07-29T01:09:21+08:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.15.0:install-node-and-npm (install node and npm) on project seata-console: Could not download Node.js: Got error code 404 from the server. -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [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
    [ERROR] 
    [ERROR] After correcting the problems, you can resume the build with the command
    [ERROR]   mvn <args> -rf :seata-console
    debian-14:/srv/java/incubator-seata# 
    ```

2. Although Node.js v20.20.2 is available at https://unofficial-builds.nodejs.org/download/release/ , we used the parameter `-DnodeVersion=v20.20.2` to specify that version, but found that the parameter was ignored and it still downloaded Node.js 19.5.0.

    ```shell
    mvn -V -T 1C package -pl console -am -DskipTests -Dgrpc.version=1.54.2 -DnodeDownloadRoot=https://unofficial-builds.nodejs.org/download/release/ -DnodeVersion=v20.20.2
    ```

3. After searching the source code, we found that the Node.js version is hardcoded.

    ```shell
    grep -r --include="pom.xml" -B 16 "19.5.0" .
    ```

    ```shell
    debian-14:/srv/java/incubator-seata# grep -r --include="pom.xml" -B 16 "19.5.0" .
    ./console/pom.xml-    <build>
    ./console/pom.xml-        <plugins>
    ./console/pom.xml-            <plugin>
    ./console/pom.xml-                <groupId>com.github.eirslett</groupId>
    ./console/pom.xml-                <artifactId>frontend-maven-plugin</artifactId>
    ./console/pom.xml-                <configuration>
    ./console/pom.xml-                    <workingDirectory>src/main/resources/static/console-fe</workingDirectory>
    ./console/pom.xml-                </configuration>
    ./console/pom.xml-                <executions>
    ./console/pom.xml-                    <execution>
    ./console/pom.xml-                        <id>install node and npm</id>
    ./console/pom.xml-                        <goals>
    ./console/pom.xml-                            <goal>install-node-and-npm</goal>
    ./console/pom.xml-                        </goals>
    ./console/pom.xml-                        <phase>generate-resources</phase>
    ./console/pom.xml-                        <configuration>
    ./console/pom.xml:                            <nodeVersion>v19.5.0</nodeVersion>
    debian-14:/srv/java/incubator-seata# 
    ```


### Ⅲ. Describe what you expected to happen

Supports using `-DnodeVersion=` to specify the Node.js version to be downloaded and used.


### Ⅳ. How to reproduce it (as minimally and precisely as possible)

1. Use `mvn -V -T 1C package -pl console -am -DskipTests -DnodeVersion=v20.20.2` to specify the Node.js version to be downloaded and used.
2. Run `./console/src/main/resources/static/console-fe/node/node -v` to check the Node version, and find that it is not the one you specified.

    ```
     xuxiaowei@xiaomi  ~/IdeaProjects/github.com/xuxiaowei-com-cn/incubator-seata   2.x  ./console/src/main/resources/static/console-fe/node/node -v
    v19.5.0
     xuxiaowei@xiaomi  ~/IdeaProjects/github.com/xuxiaowei-com-cn/incubator-seata   2.x  
    ```

### Ⅴ. Anything else we need to know?



### Ⅵ. Environment

- JDK:25
- This issue can be reproduced on any operating system.
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]