Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Apr 2004 14:56:19 +0200
From:      Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>
To:        freebsd-java@freebsd.org
Subject:   Re: Location of Java libraries [Was: tomcat41 producing 28 javadaemons]
Message-ID:  <20040405125619.GA71140@arabica.esil.univ-mrs.fr>
In-Reply-To: <20040405082910.5B7758C16@svbcf02.win.tue.nl>
References:  <20040405071230.GA23661@anyware12.anyware> <20040405082910.5B7758C16@svbcf02.win.tue.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 05, 2004 at 10:29:08AM +0200, Manfred Riem wrote:
> Hi all,
> 
> > > > The correct location is /usr/local/share/java/classes/*,   
> > > > aka ${JAVAJARDIR} in ports.
> > >
> > > Speaking of that, maybe this would be a good time to 
> > > review the ports tree to detect Java ports that do  
> > > not comply with this common scheme. I have started to 
> > > submit PRs for ports  that do not use the JAVAJARDIR 
> > > macro directly but maybe it would be nice if we had a
> > > central point where a common TODO list could be implemented...
> > 
> > I'm against the warnings of portlint if the packing list 
> > contains jars outside of the <correct> location: Java 
> > applications often come with their own jars, sometimes 
> > it is difficult or impossible to customize the location  
> > of  the required libraries. Also, when installing a web
> > application, the location is hardcoded to WEB-INF/lib.
> 
> I concur with this observation. So instead I would suggest
> to follow the normal convention, eg. just packaging them
> using /usr/local/<packagename>. This way you can decide 
> yourself if you want to have a common JAR / .class directory.
> 
> Especially because some of the products might use a 
> conflicting set of JAR files.

I agree with both of you.

Actually I was speaking of Java libraries. Obviously, applications would
install everything in a specific directory. See games/pcgen,
textproc/fop, devel/apache-ant...

Regardless, it is easier to build/install library ports when JAR files
are located in the same place. And having each port install in its own
directory under ${LOCALBASE} is quite not compliant with hier(7).
Indeed, you still have to install port documentation in ${DOCSDIR},
which is ${LOCALBASE}/share/doc/${PORTNAME}, man pages in ${MANPREFIX},
etc... So why not installing JARs in a common place for JARs ?

The main problem IMHO, is that it's not "right" to install several times
the same JAR. For instance, Xerces-J JARs would be (and are currently)
installed with any port that needs Xerces-J, even if textproc/xerces-j
is already installed. This does not fit well with the philosophy behind
the port dependency scheme provided by the FreeBSD ports system.

But I agree with you about the complexity of dealing with conflicting
set of JAR files, or version number problems... I had suggested to use a
symbolic link mechanism (just like for non-java libraries) a long time
ago but I realized it was a bit too complex.

I would say that to better address this issue (location of Java
libraries), we should have specific JAR file support in bsd.java.mk.
Some macros that would allow to specify JAR dependencies for a Java
port, and some others that would perform intallation tasks. This way,
every Java port is acting the same way as others but the behaviour
(where to put what, and how) may be changed once we agree on some better
scheme or even overriden by end-users.

I was planning to send such a statement as a PR actually before I read
your answers.

Herve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040405125619.GA71140>