【发布时间】:2016-10-06 03:04:19
【问题描述】:
set homepath=%userprofile%
set a=%1
set b=%2
set c=%3
set uuid=%4
set zipDirectory=%5
set pluginDirectory=%6
cd %homepath%\%a%
mvn archetype:generate -DarchetypeCatalog=file://%homepath%/.m2/repository
到这里一切正常,然后命令行停止执行。它不打印 1,也不打印后续命令。
1
c
b
c
%uuid%
Y
cd %homepath%\%a%\%b%
mvn clean install
cd %homepath%\%a%\%b%\%b%-plugin\target
jar -xvf %zipDirectory%
cd %homepath%\%a%\%b%\%b%-plugin\target\META-INF\maven\%c%\%b%-plugin
copy pom.xml + %pluginDirectory%
cd %pluginDirectory%
rename pom.xml %b%-plugin-1.0.0.pom
问题:关于 maven 有什么我不知道会中断批处理的吗?用孤号1执行命令不明白吗?
【问题讨论】:
-
在windows的批处理文件中你需要通过
call mvn ...运行mvn和其他批处理文件... -
酷。
jar、copy和rename这样的命令是否相同? -
嗯...即使我调用它仍然不会在 mvn 命令之后直接执行
1。
标签: shell maven batch-file command maven-archetype