You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Stephane Nicoll <st...@gmail.com> on 2006/11/04 14:53:02 UTC
resources handling in mojo w/ filter
Hi,
I am trying to finalize the ear plugin roadmap[1] to release it. One
issue has drawn my attention [2]. Basically resources being copied to
the EAR might be filtered with exclude/includes filter.
This functionnality already exists in maven (maven resources for
instance) and I was wondering if there is some code that I could reuse
instead of writing this logic again.
Thanks,
Stéphane
[1] http://jira.codehaus.org/browse/MEAR?report=com.atlassian.jira.plugin.system.project:roadmap-panel
[2] http://jira.codehaus.org/browse/MEAR-43
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: resources handling in mojo w/ filter
Posted by Jason van Zyl <ja...@maven.org>.
Hi,
Maybe you could do a little survey about where the different pieces
of code exist. This is the same sad situation with the invokers and
verifiers where we have 5 and 3 different bits of code respectively.
Let's collect the resource processing code into one place and create
a component for it. I can see that we have code in the resources/
assembly/war plugins already.
Jason.
On 6 Nov 06, at 1:45 PM 6 Nov 06, Stephane Nicoll wrote:
> Thanks Franz for the info.
>
> Guys, do you think it makes sense to refactor this a bit? I personnaly
> do but have no idea in which component.
>
> Thanks,
> Stéphane
>
> On 11/6/06, Franz Allan Valencia See <fr...@gmail.com> wrote:
>> Good day to you, Stephane,
>>
>> Don't quote me on this one, but i don't think there is a
>> functionality in
>> maven that filters and copies file given the Resources, and the
>> encoding
>> Charset. In fact, the code segment of the resource filtering of
>> maven-resources-plugin is practically duplicated in maven-war-
>> plugin (with
>> probably a few differences). But basically, both does the following:
>>
>> 1 Set Encoding ( automatically set by plexus )
>> 2 Set Filtering Properties
>> 1.1 System Properties
>> 1.2 Project Properties
>> 1.3 Propert File ( system properties )
>> 3 Filter and Copy files
>> 3.1 Iterate every resource of resources
>> 3.2 Get included files from a resource
>> 3.2.1 Add includes, and excludes of resource to
>> DirectoryScanner
>> 3.2.2 Retrieve included files using DirectoryScanner
>> 3.3 Get source file and target file from a resource
>> 3.4 If with filtering, read source file and filter. otherwise,
>> just read
>> the source file.
>> 3.5 Write to target file
>>
>> Cheers,
>> Franz
>>
>>
>> On 11/4/06, Stephane Nicoll <st...@gmail.com> wrote:
>> >
>> > Hi,
>> >
>> > I am trying to finalize the ear plugin roadmap[1] to release it.
>> One
>> > issue has drawn my attention [2]. Basically resources being
>> copied to
>> > the EAR might be filtered with exclude/includes filter.
>> >
>> > This functionnality already exists in maven (maven resources for
>> > instance) and I was wondering if there is some code that I could
>> reuse
>> > instead of writing this logic again.
>> >
>> > Thanks,
>> > Stéphane
>> >
>> > [1]
>> > http://jira.codehaus.org/browse/MEAR?
>> report=com.atlassian.jira.plugin.system.project:roadmap-panel
>> > [2] http://jira.codehaus.org/browse/MEAR-43
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: dev-help@maven.apache.org
>> >
>> >
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: resources handling in mojo w/ filter
Posted by Stephane Nicoll <st...@gmail.com>.
Thanks Franz for the info.
Guys, do you think it makes sense to refactor this a bit? I personnaly
do but have no idea in which component.
Thanks,
Stéphane
On 11/6/06, Franz Allan Valencia See <fr...@gmail.com> wrote:
> Good day to you, Stephane,
>
> Don't quote me on this one, but i don't think there is a functionality in
> maven that filters and copies file given the Resources, and the encoding
> Charset. In fact, the code segment of the resource filtering of
> maven-resources-plugin is practically duplicated in maven-war-plugin (with
> probably a few differences). But basically, both does the following:
>
> 1 Set Encoding ( automatically set by plexus )
> 2 Set Filtering Properties
> 1.1 System Properties
> 1.2 Project Properties
> 1.3 Propert File ( system properties )
> 3 Filter and Copy files
> 3.1 Iterate every resource of resources
> 3.2 Get included files from a resource
> 3.2.1 Add includes, and excludes of resource to DirectoryScanner
> 3.2.2 Retrieve included files using DirectoryScanner
> 3.3 Get source file and target file from a resource
> 3.4 If with filtering, read source file and filter. otherwise, just read
> the source file.
> 3.5 Write to target file
>
> Cheers,
> Franz
>
>
> On 11/4/06, Stephane Nicoll <st...@gmail.com> wrote:
> >
> > Hi,
> >
> > I am trying to finalize the ear plugin roadmap[1] to release it. One
> > issue has drawn my attention [2]. Basically resources being copied to
> > the EAR might be filtered with exclude/includes filter.
> >
> > This functionnality already exists in maven (maven resources for
> > instance) and I was wondering if there is some code that I could reuse
> > instead of writing this logic again.
> >
> > Thanks,
> > Stéphane
> >
> > [1]
> > http://jira.codehaus.org/browse/MEAR?report=com.atlassian.jira.plugin.system.project:roadmap-panel
> > [2] http://jira.codehaus.org/browse/MEAR-43
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: resources handling in mojo w/ filter
Posted by Franz Allan Valencia See <fr...@gmail.com>.
Good day to you, Stephane,
Don't quote me on this one, but i don't think there is a functionality in
maven that filters and copies file given the Resources, and the encoding
Charset. In fact, the code segment of the resource filtering of
maven-resources-plugin is practically duplicated in maven-war-plugin (with
probably a few differences). But basically, both does the following:
1 Set Encoding ( automatically set by plexus )
2 Set Filtering Properties
1.1 System Properties
1.2 Project Properties
1.3 Propert File ( system properties )
3 Filter and Copy files
3.1 Iterate every resource of resources
3.2 Get included files from a resource
3.2.1 Add includes, and excludes of resource to DirectoryScanner
3.2.2 Retrieve included files using DirectoryScanner
3.3 Get source file and target file from a resource
3.4 If with filtering, read source file and filter. otherwise, just read
the source file.
3.5 Write to target file
Cheers,
Franz
On 11/4/06, Stephane Nicoll <st...@gmail.com> wrote:
>
> Hi,
>
> I am trying to finalize the ear plugin roadmap[1] to release it. One
> issue has drawn my attention [2]. Basically resources being copied to
> the EAR might be filtered with exclude/includes filter.
>
> This functionnality already exists in maven (maven resources for
> instance) and I was wondering if there is some code that I could reuse
> instead of writing this logic again.
>
> Thanks,
> Stéphane
>
> [1]
> http://jira.codehaus.org/browse/MEAR?report=com.atlassian.jira.plugin.system.project:roadmap-panel
> [2] http://jira.codehaus.org/browse/MEAR-43
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>