我正在尝试使用 Maven exec:exec 目标执行我的项目,并尝试使用以下代码段对其进行配置:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1.1</version>
<configuration>
<executable>java</executable>
<arguments>
<argument>-jar ${staging.dir}/project.jar</argument>
</arguments>
</configuration>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
当我运行时,mvn exec:exec
我得到输出:
------------------------------------------------------------------------
[ERROR]BUILD ERROR
------------------------------------------------------------------------
One or more required plugin parameters are invalid/missing for 'exec:exec'
[0] Inside the definition for plugin 'exec-maven-plugin' specify the following:
<configuration>
...
<executable>VALUE</executable>
</configuration>
-OR-
on the command line, specify: '-Dexec.executable=VALUE'
我已经尝试重新组织<plugin>
我能想到的一切,但没有任何区别?该项目是 POM 而不是 jar。
有任何想法吗?