Now that I've prototyped the osgi build (not yet checked in), and revisited the
other binary builds, it seems there's a lot of similarity among these.
I think there are 3 kinds:
1) single-project build - like FsVariables, and SimpleServer
2) PEARs
3) OSGi
The single-project and PEARs seem almost identical, except the PEARs have a
special install.xml file (for installing the PEAR). (One superficial difference
is that the docs directory in PEARs is "doc", and in single-projects, is
'docs').
They both include documentation in "built" form (PDFs and HTML files), and
javadocs.
The OSGi form has a special MANIFEST.MF file, and doesn't include documentation
or javadocs.
The zip/tar-ing of these is somewhat different: single-project has a zip/tar
assembly, PEAR has a zip (the *.PEAR file), and the OSGi has a JAR (which is of
course, a zip). In addition, the addons "aggregate" of all the addon projects
has all of them zipped/tarred up together.
There is also for most things, a standard JAR packaging of just the core
annotator, containing class/ directory.
The OSGi build as far as I can tell *requires* (by which I mean that I couldn't
figure out how to override this) that the main set of classes be in the standard
${project.build.outputDirectory}. In contrast, the PEAR and single-project
build are packaging the main set of classes by letting the standard JAR plugin
package them as a jar, and then including that JAR in the lib/ of the zip/tar.
So the lib/ of those packagings is slightly different from the lib/ of the OSGi
packaging - in that the OSGi doesn't have the main set of classes as a separate
inside its lib/ directory.
The build logic for these eventually should be in the build/ part, in the
overall parent-pom, and in the related uima-build-resources project. But for
now we are having addons-level overrides for this in the uima-addons-parent pom,
and for uima-addons aggregate assembly, in the src/main/assembly directory.
It seems that a small bit of restructuring would help in the overall building of
things. This would have a common part of these build steps do the collection of
all the parts that are destined to go into the zip/tar etc.
The single-project build and the PEAR have the most in common, the OSGi the
least.
I'm currently thinking that all addons should include a single-project build
(zip/tar).
Those marked as PEARs should also have a PEAR build.
Those marked as OSGi should also have an OSGi build.
The binary addons aggregate I think should drop the individual single-project
zip/tar - there's little value to having this done 2x.
For uploading to Maven repository: the main Jar is uploaded, the source-release
is uploaded, and it would seem to make sense to upload the PEAR and the OSGi
zips, too. So the only thing not uploaded would be the single-project zip/tar.
Does this seem right to others?
I'll work on refactoring the addons build to take advantage of all this
commonality :-)
-Marshall