0
我有一個相當大的系統,其中包含幾個在層次結構中形成的maven模塊。當我需要開發我可以去根和建立使用特定的配置文件-Pdeploy
這樣做的問題是,我的整個項目是建立(這需要一段時間),當我只有在事實上需要建立一個只需部署一些輕量級模塊。
我應該如何在部署時提高團隊的效率?
我有一個相當大的系統,其中包含幾個在層次結構中形成的maven模塊。當我需要開發我可以去根和建立使用特定的配置文件-Pdeploy
這樣做的問題是,我的整個項目是建立(這需要一段時間),當我只有在事實上需要建立一個只需部署一些輕量級模塊。
我應該如何在部署時提高團隊的效率?
基本構思:您不能跳過構建模塊,但可以跳過一些包含的插件執行。
通常您的存儲庫已經有構建模塊工件,所以一旦先前的構建已經運行並且可以從那裏取出模塊工件,整體速度應該已經更好。
這個想法是,您根據您在執行部署配置文件構建時可能想省略的內容添加一個定義跳過屬性的配置文件設置。
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault />
</activation>
<properties>
<skip.documentation>false</skip.documentation>
<skip.sign>false</skip.sign>
<skip.sources>false</skip.sources>
<skip.checks>false</skip.checks>
<skip.reports>false</skip.reports>
<skip.installer>false</skip.installer>
</properties>
</profile>
<profile>
<id>deploy</id>
<properties>
<skip.documentation>true</skip.documentation>
<skip.sign>true</skip.sign>
<skip.sources>true</skip.sources>
<skip.checks>true</skip.checks>
<skip.reports>true</skip.reports>
<skip.installer>true</skip.installer>
</properties>
</profile>
</profiles>
你的POM比可能包含
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${version.maven-checkstyle-plugin}</version>
<configuration>
<skip>${skip.checks}</skip>
</configuration>
</plugin>
這種方法可以在一個項目POM水平(pluginDependencies)或每個模塊中重寫應用。