您可以將您的程序集插件配置移動到父級中的<pluginManagement>
部分,然後僅在需要它的子模塊中指定程序集插件。
家長:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</plugin>
<artifactId>maven-assembly-plugin</plugin>
<version>${your.version}</version>
<configuration>
<!-- whatever you have here now -->
</configuration>
<executions>
<!-- whatever you have here now -->
</executions>
</plugin>
</plugins>
</pluginManagement>
的孩子,需要創建裝配:
<build>
<plugins>
<!-- Pull in config from the parent -->
<plugin>
<groupId>org.apache.maven.plugins</plugin>
<artifactId>maven-assembly-plugin</plugin>
</plugin>
.....
</plugins>
.....
</build>
謝謝,但正如我所說,這正是我**不**想做的事(即手動啓用) 。我想定義在父母的執行&有程序集插件沒有操作,而不是失敗是沒有什麼可以組裝在兒童。 – carej