Custom materialization of Maven artifacts [message #489414] |
Fri, 02 October 2009 17:19  |
Eclipse User |
|
|
|
Hi,
I am implementing some functionality for the Tigerstripe project which downloads a Maven artifact from a repo based on a CQUERY and install it into a 'special' place in the file system (which is relative to the Eclipse install).
I have a custom component type and understand, I think, how to customize the 'reader' side of things.
My question is how do I customize the materialization? I see there is an extension point for materialization, so I assume I can define my own and use the filesystem materializer as a template, but How do I say that 'this component should use this materializer for artifacts where source=false'?
Thanks for any help.
Steve
[Updated on: Fri, 02 October 2009 17:20] by Moderator
|
|
|
Re: Custom materialization of Maven artifacts [message #489419 is a reply to message #489414] |
Fri, 02 October 2009 17:59   |
Eclipse User |
|
|
|
Hi Steve,
You ask a very good question. Unfortunately, the answer is that you cannot do that yet. The only way to control
materialization selection is through name patterns in the mspec.
The way I would like to solve this is to expose some data from a resolution as properties and then allow filters in the
mspec nodes. The selected provider could for instance set properties for 'readerType' and 'source'. The 'componentType'
and other relevant information could also be set. An mspec node could then declare a filter instead of (or in addition
to) the pattern. Your example could then be declared as:
<mspecNode filter="(&(source=false)(componentType=<your type>))" materializer="<your materializer>" />
Would that be of help to you?
Regards,
Thomas Hallgren
On 10/02/2009 11:20 PM, Steve Jerman wrote:
> Hi,
>
> I am implementing some functionality for the Tigerstripe project which
> downloads a Maven artifact from a repo based on a CQUERY and install it
> into a 'special' place in the file system (which is relative to the
> Eclipse install).
>
> I have a custom component type and understand, I think, how to customize
> the 'reader' side of things.
>
> My question is how do I customize the materialization? I see there is an
> extension point for materialization, so I assume I can define my own and
> use the filesystem materializer as a template, but How do I say that
> 'this component should use this materializer for artifacts where
> source=false'?
>
> Thanks for any help.
> Steve
|
|
|
Re: Custom materialization of Maven artifacts [message #489420 is a reply to message #489419] |
Fri, 02 October 2009 18:08   |
Eclipse User |
|
|
|
I got a crazy idea.
What if you set a property on source components, and that you use this
property in the matching in the MSPEC. But that is perhaps too late.
I like the filter idea otherwise - and it is a step in the direction of
b3. We should expose at least the "materialization options" source and
mutable (you may want to do different things depending on both of those).
- henrik
On 10/2/09 11:59 PM, Thomas Hallgren wrote:
> Hi Steve,
> You ask a very good question. Unfortunately, the answer is that you
> cannot do that yet. The only way to control materialization selection is
> through name patterns in the mspec.
>
> The way I would like to solve this is to expose some data from a
> resolution as properties and then allow filters in the mspec nodes. The
> selected provider could for instance set properties for 'readerType' and
> 'source'. The 'componentType' and other relevant information could also
> be set. An mspec node could then declare a filter instead of (or in
> addition to) the pattern. Your example could then be declared as:
>
> <mspecNode filter="(&(source=false)(componentType=<your type>))"
> materializer="<your materializer>" />
>
> Would that be of help to you?
>
> Regards,
> Thomas Hallgren
>
>
> On 10/02/2009 11:20 PM, Steve Jerman wrote:
>> Hi,
>>
>> I am implementing some functionality for the Tigerstripe project which
>> downloads a Maven artifact from a repo based on a CQUERY and install it
>> into a 'special' place in the file system (which is relative to the
>> Eclipse install).
>>
>> I have a custom component type and understand, I think, how to customize
>> the 'reader' side of things.
>>
>> My question is how do I customize the materialization? I see there is an
>> extension point for materialization, so I assume I can define my own and
>> use the filesystem materializer as a template, but How do I say that
>> 'this component should use this materializer for artifacts where
>> source=false'?
>>
>> Thanks for any help.
>> Steve
>
|
|
|
|
|
|
Re: Custom materialization of Maven artifacts [message #489966 is a reply to message #489962] |
Tue, 06 October 2009 12:17  |
Eclipse User |
|
|
|
On 10/06/2009 05:54 PM, Steve Jerman wrote:
>> The resolver will traverse dependencies. Not all the semantics are
>> covered though. We use groupId, artifactId, version.
>
> I actually need to use the classifier ( I generate a Jar and a Zip (as a
> 'GEN' classifier) from our maven build.
I suggest you add a bugzilla enhancement request for this.
Regards,
Thomas Hallgren
|
|
|
Powered by
FUDForum. Page generated in 0.04004 seconds