Packaging large Java software stacks ?

Thierry Carrez thierry.carrez at
Wed Jan 28 16:58:43 GMT 2009

Matthias Klose wrote:
> Thierry Carrez schrieb:
>> That makes most attempts to properly package large Java software in
>> Ubuntu to fail for two reasons.
>> (1) Need precisely-versioned artifacts
>> [...]
>> (2) Building entirely from source
>> Java "compilation" (in fact bytecoding) requires lots of JARs to be
>> present, because they are used to check all external method signatures.
>> Geronimo and Glassfish builds will require hundreds of them. Packaging
>> all those build dependencies from source is a huge work, and each of
>> those build dependencies, in turn, will require more. Combined with the
>> first problem, this makes packaging those stacks too much work for so
>> little to gain (they are usually easily installable by
>> downloading/unpacking the upstream tarball).
> Is it possible to disable these checks during the build? Assuming that we
> provide these and assure those by (build-)dependencies?

That would be nice, but I haven't found a way (option in javac or
whatever). I don't see a technical reason why external JARs would be
/needed/ to produce bytecode. And that would very much simplify the
build dependencies problem.

>> Potential solutions to solve (2) include evolving our build-from-source
>> policy to accept that JARs that would only be used as method-checking
>> media during Java compilation to be considered part of the source...
> For another software I was told that the upstream doesn't care if the
> documentation can be built, so the docs are pre-built, and included in the
> binary package.  In this case we are not able to patch these docs to fix a bug
> (or at least with a higher effort), but maybe the docs are not that important as
> the code is. method-checking looks like the same, but how do you ensure (and the
> people who review software for main) that these are just used for checking and
> not for building the package?

That's the trick. You have to tell which build dependencies happen to be
run by the build process (ant tasks, maven plugins...) and which are
just used for method checks without executing any code. This would
require deep knowledge of the package and there may be loopholes (static
code run when classes are loaded ?).

That brings us back to the possibility to ignore method checks during
bytecode compilation, or to compile against a text description of an API...

Thierry Carrez
Ubuntu server team

More information about the ubuntu-devel mailing list