node.js - 如何在构建 Maven 项目时设置目标路径?
问题描述
我正在尝试将节点和 npm 安装到特定位置,但路径自动设置为“C:/Users.../webapp/node/node.exe”并且节点目录不存在。所以我想知道是否有一种方法可以改变路径,以便我可以将所有东西安装在正确的位置。
这是我运行 Maven 构建时出现的命令提示符消息: --- frontend-maven-plugin:1.3:install-node-and-npm (install node and npm) @ webside --- [INFO] 安装节点版本v8.12.0 [INFO] 将节点二进制文件从 C:\Users\Q1011804.m2\repository\com\github\eirslett\node\8.12.0\node-8.12.0-win-x64.exe 复制到 C:\Users\ Q1011804\eclipse-workspace\par ent\webside\src\main\webapp\node\node.exe [错误] 无法执行目标 com.github.eirslett:frontend-maven-plugin:1.3:install-node-and-npm项目webside(安装node和npm):Could not install Node.js: C:\Users\Q1011804\eclipse-workspace\parent\webside\src\main\webapp\node\node.exe(系统找不到路径指定)-> [帮助 1]
解决方案
我想你需要添加
<configuration>
<installDirectory>someDir</installDirectory>
</configuration>
到您的 pom.xml 中的插件定义。
推荐阅读
- sql - 创建在更新表后自动更新单独的“审计表”的触发器
- graphics - 非抗锯齿线和锯齿线的最佳算法是什么
- qt - QTableWidget 设置标题标签
- angular - 通过 Laravel 服务器服务时延迟加载模块的 ChunkLoadError
- jquery - 如果我选择是或否,如何清除复选框和警报?
- c# - AutoFixture - 创建“有效”和“无效”实例和 [AutoData]
- reactjs - 反应弹簧过渡。如何平滑地向下移动表单以使 div 出现?无论 div 的高度如何
- javascript - 如何在 aspx/c 中执行服务器端循环时更新文本框#
- android - Google 地图活动错误:set_timerslack_ns 写入失败:不允许操作?
- php - 在 docker laravel php-fpm nginx 上使用 umask 0 创建会话