4
我想排除一個包含YUI壓縮程序無法編譯和抽出錯誤的一組JavaScript文件的文件夾。我正在嘗試使用<exclude>folder</exclude>
標籤,該標籤不起作用 - YUI仍在嘗試壓縮文件夾中的文件。如何排除YUI壓縮文件夾中的文件夾
下面是我的POM的配置:
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<execution>
<id>compressyui</id>
<phase>process-resources</phase>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<nosuffix>true</nosuffix>
<warSourceDirectory>src/main/webapp</warSourceDirectory>
<jswarn>false</jswarn>
<sourceDirectory>src/main/webapp/js-max</sourceDirectory>
<webappDirectory>src/main/webapp</webappDirectory>
<outputDirectory>src/main/webapp/js</outputDirectory>
<force>true</force>
<excludes>
<!-- yuicompressor fails to compile patterns library, hence stopping full build -->
<!-- We won't be modifying this library so will exclude it for now -->
<exclude>src/main/webapp/js-max/patterns/*</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
任何想法如何做到這一點?
在該職位取一個戰利品:http://stackoverflow.com/questions/11836599/usage-of-yui-compressor- maven-mojo-minifying-javascript – Tunaki
@Tunaki謝謝隊友,我找到了解決方案:) –