1
我正在使用wro4j-maven-plugin
來預處理我的.js
,.css
和.less
資源。如何使wro4j-maven-plugin在預處理器失敗時失敗構建?
當預處理器發生故障時,如.less
文件包含語法錯誤時,插件僅在構建中輸出堆棧跟蹤並繼續構建。
這導致必須監視構建過程或者破壞資源的風險。有沒有什麼辦法讓這個插件failOnError
像一個AntRun
一樣?
的pom.xml:
<plugin>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-maven-plugin</artifactId>
<version>1.4.5</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<configuration>
<minimize>true</minimize>
<jsDestinationFolder>${basedir}/WebContent/resources/min/js/</jsDestinationFolder>
<cssDestinationFolder>${basedir}/WebContent/resources/min/css/</cssDestinationFolder>
<contextFolder>${basedir}/WebContent/</contextFolder>
<wroFile>${basedir}/WebContent/WEB-INF/wro.xml</wroFile>
<extraConfigFile>${basedir}/WebContent/WEB-INF/wro.properties</extraConfigFile>
<ignoreMissingResources>false</ignoreMissingResources>
<wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory</wroManagerFactory>
</configuration>
</plugin>
wro.properties:
preProcessors=cssUrlRewriting,cssImport,yuiJsMin
postProcessors=lessCss,yuiCssMin