Alright, I played around with
https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/resource/XmlAppendingTransformer.javaa
bit and it seems like it gives all that I have been looking for - a
neat
aggregated xml file that is valid.  I will now go and see how to plug this
in our dist bundle.

Ant, thanks for point me to this. :)

- Venkat

On Fri, Feb 29, 2008 at 5:52 PM, Simon Laws <[EMAIL PROTECTED]>
wrote:

> On Fri, Feb 29, 2008 at 11:58 AM, Venkata Krishnan <[EMAIL PROTECTED]>
> wrote:
>
> > Hi,
> >
> > Yes the shade transformer that we use there just about aggregates the
> > contents of all files found with the path that we specify there.  So it
> > also
> > ends up aggregating the definitions.xml just as a text file.  So this
> ends
> > up with multiple <sca:definitions> elements and then no root element in
> > the
> > aggregated definitions.xml.  This is where the problem started.
> >
> > I am looking at a XMLAppender that Ant pointed out.  Let me see how it
> > goes.  Otherwise I want to try our own shade transformer.
> >
> > Thanks
> >
> > - Venkat
> >
> > On Fri, Feb 29, 2008 at 2:38 PM, Simon Laws <[EMAIL PROTECTED]>
> > wrote:
> >
> > > snip...
> > >
> > > > Could we just add our own Shade transformer that knows how to
> > aggregate
> > > > the
> > > > definitions files? Eg TO SUPPORT something like this in the shade
> > plugin
> > > > config:
> > > >
> > > > <transformer implementation="
> > > > org.apache.tuscany.sca.tools.ShadeDefinitionsTransformer">
> > > >    <resource>META-INF/services/definitions.xml</resource>
> > > > </transformer>
> > > >
> > >
> > > I hadn't noticed the list of shader transformer configurations before
> in
> > > the
> > > distribution/bundle pom. How does the appending transformer get
> applied
> > to
> > > definitions.xml as it stands. Is this just default behaviour?
> > >
> > > Simon
> > >
> >
>
> So why do we specify transformers for some things and not for others. All
> the transformers specified are "AppendingTransformer" which I assume is
> what
> is appending the definitions.xml files together by default.
>
> Simon
>

Reply via email to