unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Marco van Zwetselaar <zwets@zwets.com>
To: guix-devel@gnu.org
Subject: Re: Should java .jar-filenames include the version?
Date: Mon, 12 Sep 2016 12:08:09 +0300	[thread overview]
Message-ID: <7382246c-1e13-83f1-8b83-db703efc1da8@zwets.com> (raw)
In-Reply-To: <87vay5s4f5.fsf@gmail.com>

On 09/09/16 14:23, Alex Vong wrote:
> I prefer including the version. Consider the following
> situation. Package foo has version A and B, both installing to path
> ~/.guix-profile/share/java/ (symlink to store). When the user installs
> both version A and B, there will be a conflict. Please note that I do
> not know java very well. Will those jar files be installed to different
> locations instead of ~/.guix-profile/share/java/ if we switch to maven
> later?

No. Jar-files can be placed anywhere and get resolved through the 
application's classpath at runtime. The default classpath contains only 
the jar files which come with the platform (i.e. are part of the 
language version & standard library). The classpath for an application 
has no default value; it is set through environment variable CLASSPATH 
a/o arguments to the JVM.

The application classpath can include directories (bad idea) and names 
of jar or zip files (better idea, especially if they have version 
numbers). To entirely eliminate dependency issues, many applications 
resort to packaging all dependency jars with the application and point 
the classpath to "inside the application".

> By the way, does java / maven has something similar to so name for abi
> compatibility?

Core Java doesn't at the library (jar) level[*], though proposals have 
been made since at least version 1.4 to add it to the platform. The OSGI 
model which underlies e.g. the Eclipse platform is an "in Java" solution 
which got very close, and semantically went way beyond soname. There was 
talk of adding that to version 8 but IIRC it didn't make it.

Cheers,
Marco

[*] Needs qualification: I was hard core Javan up to version 6. I'm 
extrapolating what for ages seemed to go nowhere to versions 7..9.

> Hartmut Goebel <h.goebel@goebel-consult.de> writes:
>
>> Hi,
>>
>> as I'm going to release patches for some java packages, I'd like to
>> get consent on one point:
>>
>> Should java .jar-filenames include the version?
>>
>> This only effects those .jar for which there is no build.xml (or
>> equivalent) is present and thus #:jar-file is to be specified.
>>
>> The jar-files currently packaged do not include the version, but most .
>> jar-files build using a build.xml or maven .pom seam to include it.
>> OTOH, the version is already in the prefix, thus it is redundant.
>>
>> What do you think?
>>
>> (I personally do not care much, I just want to avoid duplicate work.)

  parent reply	other threads:[~2016-09-12  9:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08 12:01 Should java .jar-filenames include the version? Hartmut Goebel
2016-09-09 11:23 ` Alex Vong
2016-09-12  7:55   ` Hartmut Goebel
2016-09-12  9:08   ` Marco van Zwetselaar [this message]
2016-09-12 11:27     ` Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7382246c-1e13-83f1-8b83-db703efc1da8@zwets.com \
    --to=zwets@zwets.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).