首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何在BAT文件中执行多个maven命令?

如何在BAT文件中执行多个maven命令?
EN

Stack Overflow用户
提问于 2018-05-03 07:14:59
回答 2查看 0关注 0票数 0

我制作了一个bat文件,如:

mvn clean;
mvn包;

但它不起作用,只有第一个命令被执行。

有人能帮我吗?

EN

回答 2

Stack Overflow用户

发布于 2018-05-03 16:01:49

使用

call mvn clean
call mvn package
票数 0
EN

Stack Overflow用户

发布于 2018-05-03 17:01:11

在Windows中从批处理文件构建多个maven项目:

REM maven itself uses a batch file so each mvn must be preceded by "call"
REM the -f flag specifies where the pom.xml is found for the project
REM mvn install will save the target output to %userprofile%\.m2\repository ...

call mvn install -f c:\Users\John\workspace\PropertiesReader\pom.xml

call mvn install -f c:\Users\John\workspace\PropertiesWriter\pom.xml
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/-100008343

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档