jar dependencies

Herve Quiroz herve.quiroz at esil.univ-mrs.fr
Wed Mar 26 21:44:54 PST 2003


Hi,

First, there are some points I'll like to discuss and then I'll comment
your thoughts...

I don't understand why there are so many versions of ant on your
systems... I'm maintaining a java port (java/jakarta-log4j) and it only
installs the JAR file in the "correct" path, the one from bsd.java.mk:
$PREFIX/share/java/classes (although I would have prefered
$PREFIX/share/java/lib but that's splitting hair as usual). The docs
install in the normal path, as for any port
($PREFIX/share/doc/${PORTNAME}) and the same goes for examples and
stuff...

The problem is that nobody uses a particular universal way for porting
java libraries so each porter puts the files where he thinks it's
"better"...

We once tried to have some common scheme for using ant so we could use
USE_ANT variable in Makefile and specify ant targets to build, then some
INSTALL_JAR command to perform the stuff we discuss here. But as we
couldn't agree on something, the issue was "left open for later
discussion".  Moreover there were more important issues at this time, like
the native jdk ports to be worked on.

But I agree with both of you, there's a need for a common way of
building/installing java ports. Better for the porter (easier and clean),
better for the final user (he knows were to find stuff).

Ernst (and others) has done quite a good job so far regarding this. The
bsd.java.mk file is the most significant proof of this. And ant (the one
from the port I mean) is already automatically adding in the classpath the
JARs that are in $PREFIX/share/java/classes. This is quite useful to build
libraries without having to download dependencies you already own (but
can't locate).

We should go one step further. And by saying this, I'm saying I would be
glad if I can help.

On Wed, 26 Mar 2003, Shannon -jj Behrens wrote:

> It's true that it requires some work to get started.  Someone, perhaps
> myself, would have to write the script to manage the /usr/java/lib directory.
> However, once the script is written, porting things would be trivial.  I.e.,
> each port would basically have to do:
>
> 	copy package to /usr/java/$package_name
> 	use ant or whatever else the package normally uses to build
> 	run script to copy jar files to /usr/java/lib
> 	perhaps install a binary to /usr/local/bin?
> 	automatically generate the package list

And then have it integrated in the bsd.java.mk (as new rules and
variables) perhaps ?...

> > 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.
>
> I agree.  Although this is the arguably RIGHT THING to do, I don't think
> there's enough manpower to make it happen.  Furthermore, it would make Java in
> FreeBSD different than Java in other OS's which seems to violate the reason for
> using Java.

Is there an "universal way of doing things(TM)" for Java anyway ?... I
mean, whatever the platform you're using, there's no consensus about how
and where java libraries and tools should be installed.

> > 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.

Maybe the lack of docs. There should be a page in the porter's handbook to
indicate how to build ports that make use of ant, what variables to use in
port's Makefile... Ernst has done quite a good job with the bsd.java.mk
which is quite documented on his webpage but there was a project months
ago regarding a better java porter documentation included with the
porter's handbook. Lack of time probably...

> This is why I think it's essential to make creating the ports trivial.
> Unpacking stuff to /usr/local is trivial, but it's wasteful.  My idea is
> really just an optimization for disk space, and nothing more.
>
> > 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.
>
> Surely, that would be desireable.  Personally, I'm doing this because I want
> FreeBSD to be a serious Jython platform contender :)

FreeBSD is by far my favorite platform, and Java is my favorite coding
language... So I'll be glad if I can contribute to this. :)


Regards,

Herve


More information about the freebsd-java mailing list