I filed the bug I was referring to along with a patch to this method
that solves my issue. Rest assured that I will not commit this change
until I understand the scope of it:
http://objectstyle.org/jira/browse/WOL-224 [Wrong exclude match on
single resource files.]
-------- bug content -------------
Suppose I have the following content in my project folder (I'm only
listed the files that interest us):
Resources/Properties
Components/MyComponent.wo/MyComponent.html
Components/MyComponent.wo/MyComponent.wod
Components/MyComponent.api
Suppose the resources.include.patternset looks like:
Resources/**
Components/**
When building, this create the following build artifacts:
[OUTPUT]/Resources/Properties
[OUTPUT]/Resources/MyComponent.wo/MyComponent.html
[OUTPUT]/Resources/MyComponent.wo/MyComponent.wod
[OUTPUT]/Resources/MyComponent.api
[OUTPUT]/Resources/Resources/Properties <--------- WRONG
[OUTPUT]/Resources/Components/MyComponent.wo/MyComponent.html
<--------- WRONG
[OUTPUT]/Resources/Components/MyComponent.wo/MyComponent.wod
<--------- WRONG
[OUTPUT]/Resources/Components/MyComponent.api <--------- WRONG
You see that all files get double copied, once in the [OUTPUT]/
Resources folder, and a second time in [OUTPUT]/Resources/Resources
or [OUTPUT]/Resources/Components folders.
So, all you need to do is filter out the Components and Resources
folder (not theirs content), So suppose now you add the following in
your resources.exclude.patternset:
Components
Resources
With the current implementation, the ouput look like the following :
[OUTPUT]/Resources/MyComponent.wo/MyComponent.html
[OUTPUT]/Resources/MyComponent.wo/MyComponent.wod
You see that the resource files : Resources/Properties and Components/
MyComponent.api are both missing. They have indeed been filtered out
with the new exclude patterset rule.
------- end bug content ------------
Seb
On Mar 29, 2006, at 3:31 AM, Ulrich Köster wrote:
> Moin Sébastien,
>
> most of the stuff in the datasets plugin is deprecated. (Not marked
> as deprecated.)
>
> Could be more specific about the bug?
>
> I have to take a look at the code later today.
>
> Uli
> Am 29.03.2006 um 02:57 schrieb Sébastien Sahuc:
>
>> Guys,
>>
>> I'm hitting a bug with the new code that Ulrich committed to remove
>> the .WOLips dependencies. While debugging I noticed the following
>> SAME method in exactly three different location. On top of that I do
>> not understand what is the purpose of this method, but I do know that
>> is the cause of my matching problem I'd like to fix. Please throw in
>> any hints you have you this method .
>>
>> this method appears in the classes:
>> org.objectstyle.wolips.core.resources.internal.build.AbstractBuildVis
>> ito
>> r
>> org.objectstyle.wolips.core.resources.internal.types.file.ProjectPatt
>> ern
>> sets
>> org.objectstyle.wolips.datasets.adaptable.ProjectPatternsets
>>
>>
>> private String[] toProjectRelativePaths(IResource resource) {
>> String[] returnValue = null;
>> if (resource.getParent().getType() != IResource.ROOT
>> /* && resource.getParent().getType() != IResource.PROJECT */) {
>> returnValue = new String[2];
>> String string = null;
>> if (resource.getType() != IResource.FOLDER) {
>> IPath path = resource.getParent().getProjectRelativePath();
>> /*
>> * String string = resource.getProject().getName() + "/" +
>> * path.toString() + "/";
>> */
>> string = path.toString() + "/";
>> } else {
>> string = "/" + resource.getName() + "/";
>> }
>> returnValue[0] = string;
>> } else {
>> returnValue = new String[1];
>> }
>> IPath path = resource.getProjectRelativePath();
>> //String string = resource.getProject().getName() + "/" +
>> // path.toString();
>> String string = path.toString();
>> if (returnValue.length == 2) {
>> returnValue[1] = string;
>> } else {
>> returnValue[0] = string;
>> }
>> return returnValue;
>> }
>>
>>
>>
>>
>>
>> Thanks,
>>
>> Sebastien
>>
>
This archive was generated by hypermail 2.0.0 : Wed Mar 29 2006 - 13:05:04 EST