Maven exec プラグインを使用していくつかのタスクを実行しようとしています。1 つは、スクリプトを実行して、アプリが使用する外部データを生成することです。2 つ目は、コンパイル段階で便利な作業を行うために Java コードのチャンクを実行することです。
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
    <execution>
        <id>data_for_app</id>
        <phase>generate-sources</phase>
        <goals>
            <goal>exec</goal>
        </goals>
        <configuration>
            <executable>${basedir}/scripts/getappdata.sh</executable>
            <arguments>
                <argument>${basedir}/src/main/webapp/WEB-INF/xml/appdatahere/</argument>
            </arguments>
        </configuration>
    </execution>
    <execution>
        <id>do_convenience</id>
        <phase>compile</phase>
        <goals>
            <goal>java</goal>
        </goals>
        <configuration>
            <mainClass>com.example.DoConvenienceStuff</mainClass>
            <arguments>
                <argument>https://example.com/data</argument>
            </arguments>
        </configuration>
    </execution>
</executions>
</plugin>
しかし、私が実行すると:
mvn clean package exec:exec
エラーが発生します:
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project jss: The parameters 'executable' for goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec are missing or invalid -> [Help 1]
または、パラメーター「mainClass」が見つからないか無効であるという同様のエラー。