相关疑难解决方法(0)

Maven Exec插件没有读取配置

我正在尝试使用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>
Run Code Online (Sandbox Code Playgroud)

当我运行时,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'
Run Code Online (Sandbox Code Playgroud)

我已经尝试过重新组织<plugin>我能想到的每一个但没有任何区别的东西?该项目是一个POM而不是一个罐子.

有任何想法吗?

maven-2 maven-plugin

4
推荐指数
1
解决办法
6478
查看次数

标签 统计

maven-2 ×1

maven-plugin ×1