Mavenexecプラグインをご覧ください。それの実行をパッケージフェーズにバインドして(パッケージによって定義された組み込みのバインディングの後に実行されます)、引数 "-jar Utility.jar -filepath $ {project.build.directory]を使用してjava(実行可能ファイル)を実行できます。 } / $ {project.artifactId}-$ {project.version}-${project.packaging}"結果は次のようになります。
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>run jar utility</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-jar</argument>
<argument>Utility.jar</argument>
<argument>-filepath</argument>
<argument>${project.build.directory}/${project.build.finalName}.${project.packaging}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
ただし、この呼び出しはプラットフォーム固有です。これを少し改善して、「exec」の代わりに「java」を使用することができます(そのUtility.jarでメインクラス名を指定する必要があります)
使用する予定のユーティリティについて説明すると、それを行うためのよりクロスプラットフォームの方法がある可能性があります(たとえば、maven antrunプラグイン) 。