プロジェクトのサブモジュールからターゲット ディレクトリにリソースをコピーする単純なトール スクリプトがあります。コンパイル段階でスクリプトを実行するように Exec Maven プラグインを構成しました。
<plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.2.1</version>
            <executions>
                <execution>
                    <phase>compile</phase>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <executable>thor</executable>
                <arguments>
                    <argument>build:task</argument>
                </arguments>
            </configuration>
</plugin>
thor build:taskを使用してシェルから実行すると、Thor スクリプトは正常に実行されますが、何らかの理由でmvn コンパイルが次のエラーで失敗します。
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default) on project imsprocess: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default) on project imsprocess: Command execution failed.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
エラー メッセージの前に、スクリプトの出力メッセージが表示され、問題なく動作しているように見えます。ビルドは exec プラグインなしで完了します。