exec-maven-plugin can not run gulp when build in windows
phxism opened this issue · 2 comments
when run this demo in windows , mvn spring-boot:run -Dstatic-ui ,it gets an error :
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:exec (g ulp-build) on project angularjs-springmvc-sample-boot: Command execution failed. Cannot run program "C:\Users\HAP\AppData\Roaming\npm\gulp" (in directory "G:\IT \Java_Samples\angularjs with spring\angularjs-springmvc-sample-boot-master"): Cr eateProcess error=193, %1 不是有效的 Win32 应用程序。 -> [Help 1]
因为 npm目录下有两个gulp和 gulp.cmd文件,当运行exec-maven-plugin插件的gulp命令时会先找到gulp文件而不是gulp.cmd.在windows系统下gulp文件是不能被执行的,换成使用groupId:com.github.eirslett artifactId:frontend-maven-plugin这个插件可以满足跨平台执行 mvn spring-boot:run -Dstatic-ui 的需求.
It seems it is a bug introduced in 1.5.0. mojohaus/exec-maven-plugin#42