我们可以把它转过来说:压缩后的聚合?如果是这样,我有同样的问题,并与以下它为我解决。
这个技巧似乎是将输出文件放在目标目录中而不是源文件中。这样,您可以包含在聚合中缩小的文件。
已经缩小的文件然后通过basedir变量进行处理。
<executions>
<execution>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<exclude>**/*-min.js</exclude>
<exclude>**/*.min.js</exclude>
<exclude>**/*.css</exclude>
</excludes>
<removeIncluded>false</removeIncluded>
<jswarn>false</jswarn>
<aggregations>
<aggregation>
<insertNewLine>true</insertNewLine>
<removeIncluded>false</removeIncluded>
<includes>
<!-- these exist only in target dir. the original was json2.js & bootstrap.tabs.js -->
<include>**/bootstrap-tabs-min.js</include>
<include>**/json2-min.js</include>
<!-- use originals for the ones already minified -->
<include>${basedir}/src/main/webapp/js/backbone-min.js</include>
</includes>
<output>${project.build.directory}/${project.build.finalName}/js/test.js</output>
</aggregation>
</aggregations>
</configuration>
您是否在最后的@SquAreRoot中找到了解决方案? – Patrick 2013-07-24 15:51:41