FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Java

 
 
LinkBack Thread Tools
 
Old 06-05-2011, 06:56 PM
tony mancill
 
Default preferred location for jars vs. symlinks

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?

Cheers,
tony

[0] http://www.debian.org/doc/packaging-manuals/java-policy/x104.html
 
Old 06-06-2011, 01:13 PM
Onkar Shinde
 
Default preferred location for jars vs. symlinks

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/.
May be the current behavior of maven repo tools is not intentional and
simply some bug.

Regards,
Onkar
--
Passion - Some people climb mountains - others write Free software.
Don't ask why - the reason is the same.


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTim5F=+BOg6VMt=zjDr0yr2_HWpBpw@mail.gmail.com ">http://lists.debian.org/BANLkTim5F=+BOg6VMt=zjDr0yr2_HWpBpw@mail.gmail.com
 
Old 06-06-2011, 01:20 PM
Vincent Fourmond
 
Default preferred location for jars vs. symlinks

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 ?

Cheers,

Vincent


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTimMGNY4H0v67vRSTzj6viruAKeGKQ@mail.gmail.com ">http://lists.debian.org/BANLkTimMGNY4H0v67vRSTzj6viruAKeGKQ@mail.gmail.com
 
Old 06-07-2011, 10:36 PM
Ludovic Claude
 
Default preferred location for jars vs. symlinks

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


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4DEEA800.8010702@laposte.net">http://lists.debian.org/4DEEA800.8010702@laposte.net
 
Old 06-08-2011, 04:42 AM
tony mancill
 
Default 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
rework?

tony
 
Old 06-08-2011, 10:12 PM
Ludovic Claude
 
Default 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:

debian/libtiger-types-java.pom:
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).

Ludovic

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
>


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4DEFF3D2.9060800@laposte.net">http://lists.debian.org/4DEFF3D2.9060800@laposte.net
 

Thread Tools




All times are GMT. The time now is 03:04 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org