shrinkwrap / descriptors

ShrinkWrap subproject for creating Archive Descriptors
Apache License 2.0
26 stars 30 forks source link

[SHRINKDESC-125] XML representation for toString() #69

Open rbattenfeld opened 11 years ago

rbattenfeld commented 11 years ago

Hi Andrew

I have implemented a NodeExporter very similar to the existing NodeImporter SPI. There is no redundant code which exports a Descriptor or a node. Let me know if you wish changes.

Regards, Ralf

ALRubinger commented 11 years ago

I'm not quite understanding the issue...looks like this is already covered:

https://github.com/shrinkwrap/descriptors/blob/master/api-base/src/main/java/org/jboss/shrinkwrap/descriptor/api/Descriptor.java#L42

Also, this patch has the Exporter API and SPI accepting the Node to be exported, when presumably this would just be a class member anyway?

In any case, I've added a commit to trim out some copy/paste artifacts in my own fork of SHRINKDESC-125. Let's see what Jesper says regarding my comment on the issue (I think all the support he needs is already in place).

That said, I would like to supply a "toString()" method which accepts a Formatter, such that we can format in a variety of ways (this is already provided for in ShrinkWrap archives, for example).

rbattenfeld commented 11 years ago

My understanding was that he wants to export an individual sub node into an XML string, not just the whole descriptor instance. Feel free to change whatever is needed. I learned a little bit about SPI layer:-)

ALRubinger commented 11 years ago

Cool, thanks. I've asked Jesper to comment on the issue.

ALRubinger commented 11 years ago

Updated the issue to reflect the requirements:

https://issues.jboss.org/browse/SHRINKDESC-125