Richard S. Hall wrote:
Stuart McCulloch wrote:
On 22/05/07, Richard S. Hall <[EMAIL PROTECTED]> wrote:
Clement Escoffier wrote:
> We (in fact, Maxime Vincent) have developed an independent Maven
> plugin installing bundles in a local OBR. This plugin is very
close to
> the Felix-219 patch. However, there is a difference in the OBR
> metadata gathering. Our plugin merges Bindex, the pom file and a
> customizable xml file (written by the developer) to compute these
> metadata. Perhaps a common approach can be use inside the
> maven-bundle-plugin.
> More information on this plugin can be found at
>
http://clement.plop-plop.net/index.php?option=com_content&task=view&id=26&Itemid=37
>
Finally found time to read the documentation on this...this seems
pretty
good. It could definitely make it simpler for us to generate an OBR
repository file for the bundles that we release...of course, we still
need to define a real plan of action for this...this should work real
nicely for Felix Commons too.
sounds good to me, and I'm willing to help out if required :)
Does everyone agree that this type of functionality should be part of
the bundle plugin? Seems to be somewhat orthogonal, but having lots of
little plugins probably doesn't make that much sense.
my vote would be to add it to bundleplugin - the install/install-file
goals would be in separate mojos to the rest of the bundleplugin
providing some degree of separation
Well, I guess we need to start looking into the relationship between
what Clement has done and what Tim has done for FELIX-219...
Does one obviate the need for the other? Should we have them both?
-> richard
I quickly took a look at what Clement/Maxime has done. This is how I
would compare them. Clement, please correct me if misrepresent anything.
Comparison
---------------
My patch uses Modello to read/write the OBR file. Modello is a Maven
plugin which creates the code to marshall/unmarshall the OBR XML. This
reduces the amount of source code but Modello has an issue where it
doesn't handle PCDATA in elements that have attributes. As a result,
the <require> elements may no be backward-compatible. Clement's plugin
uses xerces and hand-generated code that uses Xerces but it appears to
be completely backward-compatible.
For the install goal, my patch doesn't require any changes to the
pom.xml file (unless you don't use the defaults). Clement's plugin
requires configuration elements to be added to the pom.xml file.
For the install-file goal, my patch gets more info from the bundle's
manifest so has less command line arguments. Clement's plugin is more
verbose to use.
My patch uses the information from the manifest file which is generated
by bnd. Clement's plugin uses bindex which might introduce
inconsistencies since the bundle information is coming from two
different places. I have not looked at bindex so this may not be an issue.
My patch doesn't provide any way to augment/override the bundle
information. Clement's plugin can augment/override info by adding it to
the pom.xml file or an external file.
Recommendations
-----------------------
If Modello hasn't been fixed and the my generated OBR isn't
backward-compatible, use Clement's solution. If Modello has since been
fixed or my generated OBR is backward-compatible, then use my solution
since there is less code to maintain.
Take advantage of using default arguments like my patch but add the
extra flexibility of Clement's plugin.
Determine the best way to get the bundle info. Either using bindex or
from the manifest file. It may be possible to get this directly from
bnd now. I haven't looked at the latest version.
Definitely use Clement's method of augmenting/overriding the bundle info.
Tim