除了bguiz的答案(这将是最佳解决方案)之外,我还使用Maven配置文件创建了一种解决方法,绕过了这个问题。
这是一个临时解决方案,直到修复了maven-exec-plugin的错误为止。
请在此处更新错误报告:http :
//jira.prehaus.org/browse/MEXEC-118
编辑: 该错误已解决,您可以指向1.4-SNAPSHOT对其进行修复。
<project>(...) <profiles> <profile> <id>grunt-exec-windows</id> <activation> <os> <family>Windows</family> </os> </activation> <build> <plugins> <plugin> <groupId>org.prehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>${exec-maven-plugin.version}</version> <executions> <execution> <id>grunt-default</id> <phase>generate-resources</phase> <configuration> <executable>cmd</executable> <arguments> <argument>/C</argument> <argument>grunt</argument> </arguments> </configuration> <goals> <goal>exec</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles></project>


