jar dependencies

Sheldon Hearn sheldonh at starjuice.net
Wed Mar 26 17:17:08 PST 2003


On (2003/03/26 08:50), Shannon -jj Behrens wrote:

> Everything Java should be installed in /usr/java.  Each Java port
> should simply be wholly copied to /usr/java/$port_name.

This idea has promise.  If you'd looked at the "Status Quo" option in my
original post, you'll see I proposed a light modification to the status quo,
involving the use of a Java-specific PREFIX, defaulting to /usr/local/java.

So we're basically in agreement there.

> Then, for each dependency jar found in /usr/java/$port_name
> (via find), the following logic would take place: if that jar
> is already present in /usr/java/lib, hardlink to that file in
> /usr/java/lib.  Otherwise, move that jar to /usr/java/lib and then
> hardlink to that file.  When removing a Java port, simply delete
> the /usr/java/$port_name directory.  Optionally, clean up the
> /usr/java/lib directory by deleting any files who have a refcount of 1
> (i.e. jar files that are used by any Java port).

Your hardlink trick is also close to what I did for a demonstration box
I set up recently for our developers, except that I used symlinks, which
can cross filesystems.  I didn't suggest this, because I felt it was too
radical to gain support.

Although you lose the refcount trick with symlinks, you should be
including the symlinks in the package list anyway.

> I realize that this is quite a break from the standard way FreeBSD
> does things.  In fact, I'd be surprised if anyone took me seriously.
> However, I would like to point out that since Java is practically an
> OS unto itself, it's not totally unreasonable that it must be treated
> in a special manner.

Exactly.  A square peg doesn't fit into a round hole of identical
surface area.

I think, however, that this is more an issue of whether there's enough
community support to justify the additional work for committers.
What you're suggesting with links is a LOT of work.  Even what I
was suggesting (stripping down the installation of JARs to just
those specific to each package and then beefing up the ports tree's
dependencies) is a lot of work.

Looking at the state of the ports tree for Java stuff, the following
possible causes come to mind:

1) JDK-1.4.1 support took a long time to materialize on FreeBSD.  During
   the wait, the community shrank as folks went for Linux.

2) The community doesn't bother with the ports tree for Java stuff, because
   it's too easy to just unpack a distfile into /usr/local.

3) The community doesn't submit ports because the packaging issue we're
   discussing right now makes it difficult to come up with ports that
   you can feel proud of.

Personally, I'd like to do as much as I can in the ports tree to make
5.1-RELEASE a serious Java platform contender.  I want to do this so
that the release goes out with all the cool stuff on the CDROMs / DVDs
as packages.

Ciao,
Sheldon.


More information about the freebsd-java mailing list