davidB/yuicompressor-maven-plugin — Issue #36: include/exclude patterns for resources does not work
Author: mat127
Created: 2012-01-18 09:56:09+00:00
State: open

I have pom.xml defining resources as follows:

src/main/resources
true

code/**
html/**

src/main/resources
false

profile/**
code/**
html/**

src/main/resources/profile/${profile.id}
false

Such definition I use because of various resources to be filtered or not and for special resources under src/main/resource/profile/${profile.id} that has to be included only in case that particular profile is active.

Then I use following configuration of the yuicompressor-maven-plugin for compressing just the .js files:

net.alchim31.maven
yuicompressor-maven-plugin
1.2

process-resources

compress

false
false
UTF-8
false
true

profile/**
**/*.css

As you see, I have to explicitly exclude the profile/** because without this exclusion the whole tree under src/main/resources/profile is included in the resulting archive. And this is something that I do not want at all.

Moreover all the .js files under src/main/resources are processed exactly 2 times by the yui compressor. I expect this is due to the fact that directory src/main/resources is specified twice in the resources configuration. Some of the are processed 3 times as they reside under the src/main/resources/profile

Currently the pom.xml is working for me, but the repetitive processing of some files is quite unpleasant. Is there some reason why the include/exclude patterns fro resources definition are ignored?