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

Re: preferred location for jars vs. symlinks

Hello Tony,

This package is build with Maven, and it uses the <package>.poms file to
control the installation of the jars in the Maven repository.
Here, it's missing an option to install the jar in /usr/share/java and
create only links for /usr/share/maven-repo
So it should be:

  pom.xml --java-lib

I have sent a patch to the maintainer of the package.
In general, I would recommand people to use the mh_make utility when
creating new packages using Maven as the build system, as there are
quite a few tricky options which are easily forgotten, plus mh_make is
getting really good nowadays (I would do the full packaging for such a
simple library in less than 5 minutes thanks to mh_make).


On 08/06/2011 06:42, tony mancill wrote:
> 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
> rework?
> tony

Reply to: