2
私のPOMファイルには、フロントエンドビルドを構築するプラグインがあります。しかし、mvn clean install
を実行すると、フロントエンドgrunt
/npm exec
が2回実行されます。複数回の実行を避けるにはどうすればよいですか?Mavenフロントエンドビルドは、生成ソースフェーズのために2回実行されます。
すべてのご協力をいただきありがとうございます。無駄なビルドには時間がかかるので、重複したランを削除するとビルド時間が短縮されます。
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>exec-npm-install</id>
<phase>generate-sources</phase>
<configuration>
<executable>npm</executable>
<arguments>
<argument>install</argument>
</arguments>
<workingDirectory>src/main/raw_ui</workingDirectory>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
<execution>
<id>exec-bower-install</id>
<phase>generate-sources</phase>
<configuration>
<executable>bower</executable>
<arguments>
<argument>install</argument>
</arguments>
<workingDirectory>src/main/raw_ui</workingDirectory>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
<execution>
<id>exec-grunt</id>
<phase>generate-sources</phase>
<configuration>
<executable>grunt</executable>
<arguments>
<argument>build</argument>
<argument>-f</argument>
</arguments>
<workingDirectory>src/main/raw_ui</workingDirectory>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
ありがとうございました。 – user2630054