使用Wro-maven plugin
版本1.8.0
。更新 CSS 文件时,一旦在 Maven 上触发全新安装,更改将丢失在 CSS 文件中并且存在旧文件。
<plugin>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-maven-plugin</artifactId>
<version>1.8.0</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<configuration>
<nosuffix>true</nosuffix>
<minimize>true</minimize>
<destinationFolder>${basedir}/src/main/webapp/wro/</destinationFolder>
<contextFolder>${basedir}/src/main/webapp/</contextFolder>
<wroFile>${basedir}/src/main/resources/wro.xml</wroFile>
<wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory</wroManagerFactory>
<extraConfigFile>${basedir}/src/main/resources/wro.properties</extraConfigFile>
<ignoreMissingResources>false</ignoreMissingResources>
</configuration>
</plugin>
请帮忙。