Hi,
I think we really have a great way of bundling a Sling application with
the current launchpad Maven plugin and the builder project.
But :) I think it makes sense to talk about the next version of this.
I hope this describes the current situation briefly:
- you create a builder project with a list.xml
- list.xml contains the bundles / artifacts to be included together with
their start level
- pom.xml invokes the launchpad plugin for the wanted artifacts
- it's possible to add additional bundles in pom.xml
- it's possible to exclude bundles in pom.xml
- it's possible to deploy the bundle list as an artifact into the repo
- it's possible to include one bundle list artifact
- As the dependencies are not in the pom and handled by the launchpad
plugin, these dependencies are not visible to Maven and the dependency
tree calculation does not include the listed bundles.
- The final bundle list is not available for other plugins
Now, my wishlist for the next version is:
a) it should be possible to include several bundle list artifacts
b) additional bundles and excludes should be defined in the same file as
the initial list of bundles
c) the exception for the above rule is of course if a final produced
artifact from the launchpad has such excludes/includes, e.g. the Karaf
artifact has special excludes - that's fine if they're defined at a
different location
d) it would be nice if the bundle list is visible to the Maven
dependency resolution
e) the final bundle list should be available for other plugins - this
could be as easy as writing out the complete list in the target
directory. For example I've a maven plugin creating a complete source
tree of all included bundles etc.
f) support for other artifact types than bundles - I want to have a
single place where I write down all artifacts bundled into the launchpad
artifact, this might be configurations, war files etc. Our Sling OSGi
installer supports all of this.
I guess from this list d) is the hardest - in addition we need
additional metadata for artifacts like the bundle start level which we
can't simply add in the pom.xml.
So I think we should forget about d) (unless someone knows how to do
it), and define everything in a single xml file.
One way would be, to use something like the following xml
<launchpad>
<includes>
<!-- Add list artifacts here, together with exclusions ->
</includes>
<bundles>
<!-- the same as the current list.xml -->
</bundles>
<resources>
<!-- additional resources -->
</resources>
</launchpad>
This is processed by the plugin and the expanded list is written into
the target directory.
Maybe we should also add a version information for the xml format. And
we could make this compatible by looking at the root element name - if
it is "bundles" its the old format - if not, new format.
Oh, and we could also add a section for the launchpad base artifact
here, so we have everything in one place.
Just a rough idea - wdyt?
Regards
Carsten
--
Carsten Ziegeler
[email protected]