【发布时间】:2018-04-12 23:49:21
【问题描述】:
我正在尝试执行一个在 maven 构建期间写入文件的 powershell 脚本。
我正在通过 Eclipse IDE 使用 mvn clean install 调用构建。
这是我的 pom.xml 中的插件:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>${project.basedir}/.my-file.ps1</executable>
</configuration>
</plugin>
</plugins>
powershell 脚本是一个隐藏文件,所以我在文件名前面有一个.。
但是,插件没有执行,我按照官方documentation中的说明进行操作。
【问题讨论】:
-
也许可执行文件实际上是
powershell.exe,而脚本是一个参数。 -
@brendan62269 插件本身甚至没有运行;插件没有启动。如果它确实启动并尝试运行,我会得到某种输出,说明是否执行了 powershell 脚本。但是插件本身没有执行。
标签: eclipse maven powershell plugins maven-exec-plugin