You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Robert Egan <ro...@aciworldwide.com> on 2012/04/08 19:38:56 UTC

Assembly plugin

I have a need to catch each file as it is written to the archive, inspect
it's properties, and report on them. I could do this as post assembly step,
by opening the archive and reading it, but would prefer to do it when the
assembly occurs.

Re: Assembly plugin

Posted by Robert Egan <ro...@aciworldwide.com>.
Thanks. I suspect you are right, but I will start by looking at the five
classes in org.apache.maven.plugin.assembly.filter that already implement
it before asking for additional help.

On Mon, Apr 9, 2012 at 2:03 PM, John Casey <jd...@commonjava.org> wrote:

> On 4/8/12 1:38 PM, Robert Egan wrote:
>
>> I have a need to catch each file as it is written to the archive, inspect
>> it's properties, and report on them. I could do this as post assembly
>> step,
>> by opening the archive and reading it, but would prefer to do it when the
>> assembly occurs.
>>
>>
> You may be looking for a ContainerDescriptorHandler...**if you implement
> that interface, wrap it up in a jar, include that jar as a plugin-level
> dependency of the assembly plugin in your project, then reference that in
> your assembly's containerDescriptorHandlers section, you should be able to
> observe just about anything you want.
>
> Let me know if you decide to jump into it, I can probably supply examples.
>
> --
> John Casey
> Developer, PMC Chair - Apache Maven (http://maven.apache.org)
> Blog: http://www.johnofalltrades.**name/<http://www.johnofalltrades.name/>
>

Re: Assembly plugin

Posted by John Casey <jd...@commonjava.org>.
On 4/8/12 1:38 PM, Robert Egan wrote:
> I have a need to catch each file as it is written to the archive, inspect
> it's properties, and report on them. I could do this as post assembly step,
> by opening the archive and reading it, but would prefer to do it when the
> assembly occurs.
>

You may be looking for a ContainerDescriptorHandler...if you implement 
that interface, wrap it up in a jar, include that jar as a plugin-level 
dependency of the assembly plugin in your project, then reference that 
in your assembly's containerDescriptorHandlers section, you should be 
able to observe just about anything you want.

Let me know if you decide to jump into it, I can probably supply examples.

-- 
John Casey
Developer, PMC Chair - Apache Maven (http://maven.apache.org)
Blog: http://www.johnofalltrades.name/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org