[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: preferred location for jars vs. symlinks

On 06/07/2011 03:36 PM, Ludovic Claude wrote:
> On 06/06/2011 15:20, Vincent Fourmond wrote:
>> On Mon, Jun 6, 2011 at 3:13 PM, Onkar Shinde <onkarshinde@gmail.com> wrote:
>>> On Mon, Jun 6, 2011 at 12:26 AM, tony mancill <tmancill@debian.org> wrote:
>>>> I've noticed that some of the more recent CDBS packages are installing jars
>>>> under /usr/share/maven-repo/$class-hierarchy/$upstream-version/$library.jar, and
>>>> then symlinks in /usr/share/java/ over to ../maven-repo/...
>>>> By contrast, javahelper packages will install the jar under /usr/share/java/,
>>>> which is what I think was intended in section 2.3 of Java Policy [0].
>>>> Is this an area where we should clarify the policy?  It seems like the actual
>>>> jars should consistently be in one location or another, although maybe there's a
>>>> good reason to do it the other way around when we're dealing with the maven
>>>> repo.  Thoughts?
>>> In my opinion the jars should be installed to /usr/share/java always.
>>> In case of dealing with local maven repo the symlinks should be
>>> created in /usr/share/maven-repo/.
>>   I agree with that. Placing a JAR file in /usr/share/java means: this
>> library is for public use. Not doing so implies that the library is
>> private. I don't think that maven-built libraries are systematically
>> private, are they ?
> @Vincent: Jars built with Maven are always installed into the
> /usr/share/maven-repo repository. If you choose to make the jar public,
> use mh_installjar with the -l or --java-lib option, the jar will be
> installed in /usr/share/java and symlinks created in /usr/share/maven-repo.
> @Onkar: can you be more specific and provide an example of such package?
> Ludovic

Thanks for the explanation for why it's happening.

tiger-types is an example of a simple package very recently built on unstable
that places the JARs in /usr/share/maven-repo and symlinks in /usr/share/java.

The contents of debian/rules are merely:

	include /usr/share/cdbs/1/rules/debhelper.mk
	include /usr/share/cdbs/1/class/maven.mk

	JAVA_HOME := /usr/lib/jvm/default-java

In cases like this, it would be convenient mh_installjar was required for
private libraries instead of the other way around - that is, by default it would
assume that the library is public.

Again, I'm not sure it's all that important.  The main reason for asking was
with respect to policy.  Perhaps a lintian warning when the JAR appears both in
the maven-repo and as a symlink in /usr/share/java would be reasonable if
changing the default behavior of mh_installjar would cause a lot of issues or


Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: