Frontend maven plugin

本文介绍如何使用frontend-maven-plugin将Maven与Node.js项目整合,通过配置package.json中的脚本来实现项目的构建、测试等操作。示例中包含了清洁(clean)、构建(build)、测试(test)及为Maven打包做准备(prepare-for-maven-war)等任务。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<plugins>
    <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <!-- Use the latest released version:
        https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
        <version>0.0.27</version>
        ...

</plugin>

maven call the package.json file's script part:

 {
 "name": "npm-to-maven-adapator",
 "version": "0.0.1-SNAPSHOT",
 "description": "Example of node project with maven build scripts",
 "private": true,
 "scripts": {
 "clean": "node node_modules/gulp/bin/gulp.js --no-color clean",
"build": "node node_modules/gulp/bin/gulp.js --no-color build",
"test": "node node_modules/gulp/bin/gulp.js --no-color test",
"prepare-for-maven-war": "node node_modules/gulp/bin/gulp.js --no-color prepare-for-maven-war"
 },
 "devDependencies": {
 "del": "^1.1.1",
 "gulp": "^3.8.11",
 "gulp-util": "^3.0.1",
 "mkdirp": "^0.5.0",
 "touch": "0.0.3",
 "yargs": "^1.3.3"
 }
 }

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值