Обсуждение: Maven Artifact JDK Suffix

Поиск
Список
Период
Сортировка

Maven Artifact JDK Suffix

От
Sehrope Sarkuni
Дата:
Why doesn't the JDK 8 version of the Maven artifact for the driver include the .jre8 suffix?

Here's what's currently on the main README:

  <dependency>   <groupId>org.postgresql</groupId>   <artifactId>postgresql</artifactId>   <version>9.4.1207</version> <!-- Java 8 -->   <version>9.4.1207.jre7</version> <!-- Java 7 -->   <version>9.4.1207.jre6</version> <!-- Java 6 --> </dependency>

The other versions are JDK version suffixed and at some point there will be a JDK 9. Why not name it X.jre8 so that we're ready for when that day comes?

Somewhat related, is it possible for more than one JDBC release to come out for the same JDK version or will that not happen anymore?

If so, we'd be better off naming the releases off the JDBC version (ex: 9.4.127.jdbc42). Each JDBC version already has a min supported JDK version associated with it (ex: JDBC 4.2 requires JDK 8+) so it's super set of tracking JDK versions. Then again, if the days of JDBC updates out of band from JDK updates are gone, it's just extra noise/confusion (vs. tracking against the JDK version).

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

Re: Maven Artifact JDK Suffix

От
Dave Cramer
Дата:
I thought of this as well. +1

Was there ever more then one JDBC release for a given JDK?


On 10 January 2016 at 19:02, Sehrope Sarkuni <sehrope@jackdb.com> wrote:
Why doesn't the JDK 8 version of the Maven artifact for the driver include the .jre8 suffix?

Here's what's currently on the main README:

  <dependency>   <groupId>org.postgresql</groupId>   <artifactId>postgresql</artifactId>   <version>9.4.1207</version> <!-- Java 8 -->   <version>9.4.1207.jre7</version> <!-- Java 7 -->   <version>9.4.1207.jre6</version> <!-- Java 6 --> </dependency>

The other versions are JDK version suffixed and at some point there will be a JDK 9. Why not name it X.jre8 so that we're ready for when that day comes?

Somewhat related, is it possible for more than one JDBC release to come out for the same JDK version or will that not happen anymore?

If so, we'd be better off naming the releases off the JDBC version (ex: 9.4.127.jdbc42). Each JDBC version already has a min supported JDK version associated with it (ex: JDBC 4.2 requires JDK 8+) so it's super set of tracking JDK versions. Then again, if the days of JDBC updates out of band from JDK updates are gone, it's just extra noise/confusion (vs. tracking against the JDK version).

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/


Re: Maven Artifact JDK Suffix

От
Mark Rotteveel
Дата:
On Sun, 10 Jan 2016 19:02:59 -0500, Sehrope Sarkuni <sehrope@jackdb.com>
wrote:
> Why doesn't the JDK 8 version of the Maven artifact for the driver
include
> the .jre8 suffix?
>
> Here's what's currently on the main README:
>
>   <dependency>
>     <groupId>org.postgresql</groupId>
>     <artifactId>postgresql</artifactId>
>     <version>9.4.1207</version> <!-- Java 8 -->
>     <version>9.4.1207.jre7</version> <!-- Java 7 -->
>     <version>9.4.1207.jre6</version> <!-- Java 6 -->
>   </dependency>
>
>
> The other versions are JDK version suffixed and at some point there will
be
> a JDK 9. Why not name it X.jre8 so that we're ready for when that day
> comes?

I agree. Having one unsuffixed is confusing.

> Somewhat related, is it possible for more than one JDBC release to come
out
> for the same JDK version or will that not happen anymore?

That is not possible with the current way of working. The JDBC API is part
of the Java SE API and can only change together with a new Java SE version;
changing that would likely break a lot of things ;)

> If so, we'd be better off naming the releases off the JDBC version (ex:
> 9.4.127.jdbc42). Each JDBC version already has a min supported JDK
version
> associated with it (ex: JDBC 4.2 requires JDK 8+) so it's super set of
> tracking JDK versions. Then again, if the days of JDBC updates out of
band
> from JDK updates are gone, it's just extra noise/confusion (vs. tracking
> against the JDK version).

As far as I know JDBC has never been updated out of band (maybe with the
exception of the JDBC 2 Extensions, although I believe that was also part
of Java 1.3).


Re: Maven Artifact JDK Suffix

От
Vladimir Sitnikov
Дата:
> a JDK 9. Why not name it X.jre8 so that we're ready for when that day
> comes?

The idea is "unsuffixed is the latest version while others being
second-class citizens".
When jdk9 comes, a new project is added for jre8, and unsuffixed
becomes jre9 only.
Well, I think we can make jre8 explicit and avoid unsuffixed versions.
I do not have strong option there.

>> If so, we'd be better off naming the releases off the JDBC version (ex:
>> 9.4.127.jdbc42).

The problem with jdbc42 is regular developers just do not care of JDBC versions.
For instance: I'm a performance engineer. I do lots of SQL/Java
tuning, yet I do not care the difference of JDBC X vs Y. Typical case
is just "execute a plain old SQL statement".

From release engineering point of view, .jreX suffixes are much easier
to manage: it is just obvious if "a wrong version is included".

For instance, can you tell which JDBC spec added method

https://docs.oracle.com/javase/8/docs/api/java/sql/PreparedStatement.html#setObject-int-java.lang.Object-java.sql.SQLType-

?

Javadoc for that method reads just "since 1.8".

I believe, the main use-case is "what is the latest driver version for my JRE".
I can hardly imagine a case when developer wants "JDBC 4.1 compliant driver".

Vladimir


Re: Maven Artifact JDK Suffix

От
Mark Rotteveel
Дата:
On Mon, 11 Jan 2016 12:04:54 +0300, Vladimir Sitnikov
<sitnikov.vladimir@gmail.com> wrote:
>> a JDK 9. Why not name it X.jre8 so that we're ready for when that day
>> comes?
>
> The idea is "unsuffixed is the latest version while others being
> second-class citizens".
> When jdk9 comes, a new project is added for jre8, and unsuffixed
> becomes jre9 only.
> Well, I think we can make jre8 explicit and avoid unsuffixed versions.
> I do not have strong option there.

But it makes it less intuitive; a newer version of the same dependency
will suddenly stop working with an incompatible class version error. What
if I am on the latest jre8 version when Java 9 is out, and I need to go
back to an earlier version: then I need to track when the switch from
unsuffixed Java 8 to suffixed Java 8 version occurred to be able to
downgrade (granted, that is a bit less common scenario).

On the other hand, for Jaybird somewhere in the past someone outside the
Firebird project released Jaybird 2.1.6 on maven without a suffix, and it
has still a relatively big share of the downloads. I am unsure why that is.
I am still considering whether I should **also** release the highest
version unsuffixed (next to the suffixed version).

Mark



Re: Maven Artifact JDK Suffix

От
Vladimir Sitnikov
Дата:
>What if I am on the latest jre8 version when Java 9 is out, and I need to go
>back to an earlier version: then I need to track when the switch from
>unsuffixed Java 8 to suffixed Java 8 version occurred to be able to
>downgrade (granted, that is a bit less common scenario).

Frankly speaking, I do not get the use-case you are trying to convey.

Suppose you have x.y.z and that is the latest jre8 version at some
point in time.
Even after jre9 is launched, the same x.y.z will still be jre8.

So if you "do not want to upgrade", you just keep your version x.y.z.

If you want to upgrade (suppose, the most current version is "k.l.m"),
you just use k.l.m-jre8 if you a still stuck with jre8.

> What if I am on the latest jre8 version when Java 9 is out, and I need to go
> back to an earlier version

As I said above, I see no practical use case, except for some "bug
hunting via driver version bisection".
If that is the case, there is always list of all the versions:
https://jdbc.postgresql.org/download.html#others

Vladimir


Re: Maven Artifact JDK Suffix

От
Sehrope Sarkuni
Дата:
On Mon, Jan 11, 2016 at 4:22 AM, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
>What if I am on the latest jre8 version when Java 9 is out, and I need to go
>back to an earlier version: then I need to track when the switch from
>unsuffixed Java 8 to suffixed Java 8 version occurred to be able to
>downgrade (granted, that is a bit less common scenario).

Frankly speaking, I do not get the use-case you are trying to convey.

Suppose you have x.y.z and that is the latest jre8 version at some
point in time.
Even after jre9 is launched, the same x.y.z will still be jre8.

So if you "do not want to upgrade", you just keep your version x.y.z.

If you want to upgrade (suppose, the most current version is "k.l.m"),
you just use k.l.m-jre8 if you a still stuck with jre8.

> What if I am on the latest jre8 version when Java 9 is out, and I need to go
> back to an earlier version

As I said above, I see no practical use case, except for some "bug
hunting via driver version bisection".
If that is the case, there is always list of all the versions:
https://jdbc.postgresql.org/download.html#others

This would definitely come back to bite somebody. I can imagine a user upgrading their driver version (say to get a fix in a newer version) but not realize that the newer version requires a newer JDK. Many users won't read any release notes at all; they'll just see there's a newer driver available in Maven central and update to it. It's surprising behavior to suddenly require a new JDK and that would be avoided with explicitly suffixed versions.

Thinking about this a bit more, maybe version numbers aren't what we should be suffixing. Code-wise it's true that the JDK 8 driver is a super set of the JDK 7 one (which is a super set of the JDK 6 one). But the output JARs are not really different versions of the same thing. They're entirely different artifacts. The suffix should be on the Maven artifactId (not the version).

Changing the suffixes to be on the artifactId would also play nice with Maven version ranges[1]. Otherwise the suffix on the end of the version number leads to a weird situation where a higher versioned JDK 7 driver can be considered "newer" than an older version of a JDK 8 driver[2]. Sure there will most likely be a newer JDK 8 release as well but it's still odd and can be avoided with better naming.

I'm thinking something like this:

<!-- JDK 8 -->
<dependency>
  <groupId>org.postgresql</groupId>
  <artifactId>postgresql-jre8</artifactId>
  <version>9.4.1207</version>
</dependency>

<!-- JDK 7 -->
<dependency>
  <groupId>org.postgresql</groupId>
  <artifactId>postgresql-jre7</artifactId>
  <version>9.4.1207</version>
</dependency>

<!-- JDK 6 -->
<dependency>
  <groupId>org.postgresql</groupId>
  <artifactId>postgresql-jre6</artifactId>
  <version>9.4.1207</version>
</dependency>

Thoughts?

[2]: 9.4.1210.jre7 > 9.4.1207.jre8 per 

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

Re: Maven Artifact JDK Suffix

От
Vladimir Sitnikov
Дата:
>[2]: 9.4.1210.jre7 > 9.4.1207.jre8

So what is the problem with that?
I do not think there is a "proper" way to compare 1210.jre7 vs 1207.jre8.
I do not think it outweights "multiartifact" drawbacks I list below.

What I fear is java 10 when we would hit a string literal comparison wall.
Thus we might want use jre07, jre08, jre09 to be prepared for jre10 :)

> They're entirely different artifacts

They are not.
For instance: is it sane to include _both_ artifacts at the same time?
I do not think so.

Having different artifact ids would:
1) Open can of worms with "multiple pgjdbc artifacts at the same time".
2) Make upgrading pgjdbc very hard.

If jreX is a part of version, then you can define the version in
parent pom, and all the child projects just inherit it.
You can easily flip version back and forth by altering version in parent.

If jreX is artifact id, then you would have to change all the child
projects to use updated artifact id.

Vladimir


Re: Maven Artifact JDK Suffix

От
Sehrope Sarkuni
Дата:
On Wed, Jan 13, 2016 at 4:54 PM, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
>[2]: 9.4.1210.jre7 > 9.4.1207.jre8

So what is the problem with that?
I do not think there is a "proper" way to compare 1210.jre7 vs 1207.jre8.
I do not think it outweights "multiartifact" drawbacks I list below.

What I fear is java 10 when we would hit a string literal comparison wall.
Thus we might want use jre07, jre08, jre09 to be prepared for jre10 :)

Well having separate artifacts obviates any issues with numeric string compares :)
 
> They're entirely different artifacts

They are not.
For instance: is it sane to include _both_ artifacts at the same time?
I do not think so.

They are different artifacts but they provide a common dependency. I don't think it'd be straightforward to add that concept into the way that Maven works. Maybe if we had a separate "org.postgresql/postgresql" dependency that contained only interfaces with the "org.postgresql/postgresql-jre8" (and -jre7 or jre6) being marked as including it. That way a library that is meant to be PG specific could specify an interface dependency on the former but allow the user to specify the specific driver version they'd like to use. Unfortunately that seems overly complicated ...
  
Having different artifact ids would:
1) Open can of worms with "multiple pgjdbc artifacts at the same time".
2) Make upgrading pgjdbc very hard.

#1 is a valid point. If it's possible to have both defined in the same pom then you could presumably end up with both on the classpath. Following up on the overly complicated extra dependency idea I mentioned above, this could be solved by having JRE specific naming of the implementation classes (ex: org.postgresql.jre8.core). That way you can have multiple versions on the classpath ... but again that's getting overly complicated.

I think the simplest solution is to just add the explicit jre8 suffix to the JRE 8 version of the driver. Whether we also have an unsuffixed version as a "latest" version is a separate debate (and my vote is leaning towards a "no" on that).

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

Re: Maven Artifact JDK Suffix

От
Dave Cramer
Дата:

On 14 January 2016 at 18:34, Sehrope Sarkuni <sehrope@jackdb.com> wrote:
On Wed, Jan 13, 2016 at 4:54 PM, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
>[2]: 9.4.1210.jre7 > 9.4.1207.jre8

So what is the problem with that?
I do not think there is a "proper" way to compare 1210.jre7 vs 1207.jre8.
I do not think it outweights "multiartifact" drawbacks I list below.

What I fear is java 10 when we would hit a string literal comparison wall.
Thus we might want use jre07, jre08, jre09 to be prepared for jre10 :)

Well having separate artifacts obviates any issues with numeric string compares :)
 
> They're entirely different artifacts

They are not.
For instance: is it sane to include _both_ artifacts at the same time?
I do not think so.

They are different artifacts but they provide a common dependency. I don't think it'd be straightforward to add that concept into the way that Maven works. Maybe if we had a separate "org.postgresql/postgresql" dependency that contained only interfaces with the "org.postgresql/postgresql-jre8" (and -jre7 or jre6) being marked as including it. That way a library that is meant to be PG specific could specify an interface dependency on the former but allow the user to specify the specific driver version they'd like to use. Unfortunately that seems overly complicated ...
  
Having different artifact ids would:
1) Open can of worms with "multiple pgjdbc artifacts at the same time".
2) Make upgrading pgjdbc very hard.

#1 is a valid point. If it's possible to have both defined in the same pom then you could presumably end up with both on the classpath. Following up on the overly complicated extra dependency idea I mentioned above, this could be solved by having JRE specific naming of the implementation classes (ex: org.postgresql.jre8.core). That way you can have multiple versions on the classpath ... but again that's getting overly complicated.

I think the simplest solution is to just add the explicit jre8 suffix to the JRE 8 version of the driver. Whether we also have an unsuffixed version as a "latest" version is a separate debate (and my vote is leaning towards a "no" on that).


I would have to agree with this. I think people will be surprised (not in a good way) if we upgrade to java 9 and all of a sudden maven pulls down JDBC for java 9

Dave

Re: Maven Artifact JDK Suffix

От
Mark Rotteveel
Дата:
On Fri, 15 Jan 2016 06:24:21 -0500, Dave Cramer <davecramer@gmail.com>
wrote:
> I would have to agree with this. I think people will be surprised (not
in a
> good way) if we upgrade to java 9 and all of a sudden maven pulls down
JDBC
> for java 9

As far as I know, starting with Java 9 this problem could be solved with
multi-release JARs (JEP-238, http://openjdk.java.net/jeps/238). The main
content could then be Java 8, and the Java 9 versions of classes could go
into META-INF/versions/9 (assuming that is the final way JEP-238 will be
realised, I am not sure if it is already in). For efficiency it would be
best to only put in a Java 9 version of classes that really need a Java 9
version.

Mark


Re: Maven Artifact JDK Suffix

От
Dave Cramer
Дата:



On 15 January 2016 at 06:51, Mark Rotteveel <mark@lawinegevaar.nl> wrote:
On Fri, 15 Jan 2016 06:24:21 -0500, Dave Cramer <davecramer@gmail.com>
wrote:
> I would have to agree with this. I think people will be surprised (not
in a
> good way) if we upgrade to java 9 and all of a sudden maven pulls down
JDBC
> for java 9

As far as I know, starting with Java 9 this problem could be solved with
multi-release JARs (JEP-238, http://openjdk.java.net/jeps/238). The main
content could then be Java 8, and the Java 9 versions of classes could go
into META-INF/versions/9 (assuming that is the final way JEP-238 will be
realised, I am not sure if it is already in). For efficiency it would be
best to only put in a Java 9 version of classes that really need a Java 9
version.

Yes, but in my example the customer would still be running Java 8. Does Java 8 know how to read this jar  


--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Re: Maven Artifact JDK Suffix

От
Mark Rotteveel
Дата:
On Fri, 15 Jan 2016 06:56:54 -0500, Dave Cramer <pg@fastcrypt.com> wrote:
> On 15 January 2016 at 06:51, Mark Rotteveel <mark@lawinegevaar.nl>
wrote:
>
>> On Fri, 15 Jan 2016 06:24:21 -0500, Dave Cramer <davecramer@gmail.com>
>> wrote:
>> > I would have to agree with this. I think people will be surprised
(not
>> in a
>> > good way) if we upgrade to java 9 and all of a sudden maven pulls
down
>> JDBC
>> > for java 9
>>
>> As far as I know, starting with Java 9 this problem could be solved
with
>> multi-release JARs (JEP-238, http://openjdk.java.net/jeps/238). The
main
>> content could then be Java 8, and the Java 9 versions of classes could
go
>> into META-INF/versions/9 (assuming that is the final way JEP-238 will
be
>> realised, I am not sure if it is already in). For efficiency it would
be
>> best to only put in a Java 9 version of classes that really need a Java
9
>> version.
>>
>> Yes, but in my example the customer would still be running Java 8. Does
> Java 8 know how to read this jar

Yes it would, because Java 8 doesn't know about META-INF/versions/... so
it will just read the (Java 8) classes in the root. The idea behind JEP-238
is that Java versions that don't understand it will use the classes in the
root as they would normally do, and that Java versions that do understand
it will first read a class in their version folder (if it exists), and fall
back to the classes in the root if no version-specific class is found.

At least, that is the theory as I understand it.

Mark


Re: Maven Artifact JDK Suffix

От
Vladimir Sitnikov
Дата:
I wonder how that plays with "javadoc & source" jars.

I'm inclined to adding ".jre8" as qualifier.

Vladimir


Re: Maven Artifact JDK Suffix

От
Mark Rotteveel
Дата:
On Fri, 15 Jan 2016 15:28:29 +0300, Vladimir Sitnikov
<sitnikov.vladimir@gmail.com> wrote:
> I wonder how that plays with "javadoc & source" jars.
>
> I'm inclined to adding ".jre8" as qualifier.
>
> Vladimir

I don't think this will work for javadoc, no.

Mark


Re: Maven Artifact JDK Suffix

От
Dave Cramer
Дата:
Well all of this multi-release jar discussion assumes we would release one. 

I'm of the opinion that this may just be more complication. Especially with only pieces of our code being specific to each java version


On 15 January 2016 at 07:28, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
I wonder how that plays with "javadoc & source" jars.

I'm inclined to adding ".jre8" as qualifier.

Vladimir


--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Re: Maven Artifact JDK Suffix

От
Vladimir Sitnikov
Дата:
Well, if multi-release javadocs/sources/debugging are not supported,
then I would prefer jreXY versions.

So what about renaming jre6 -> jre06, jre7 -> jre07,  nosuffix -> jre08?

Vladimir


Re: Maven Artifact JDK Suffix

От
Dave Cramer
Дата:
Is there a technical reason to have a 2 digit number ?


On 15 January 2016 at 08:35, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
Well, if multi-release javadocs/sources/debugging are not supported,
then I would prefer jreXY versions.

So what about renaming jre6 -> jre06, jre7 -> jre07,  nosuffix -> jre08?

Vladimir

Re: Maven Artifact JDK Suffix

От
Vladimir Sitnikov
Дата:
The reason is Maven sorts strings literally, thus java10 would be
collated before jre9

Vladimir


Re: Maven Artifact JDK Suffix

От
Sehrope Sarkuni
Дата:
On Fri, Jan 15, 2016 at 8:38 AM, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
The reason is Maven sorts strings literally, thus java10 would be
collated before jre9

I don't think it will matter as the release version (ex: 9.4-1234) is prefixed to the full version anyway Newer versions of any JRE would appear "newer" than older versions of a later JRE (i.e. 9.4-1400-jre6 > 9.4-1300-jre8).

Using two digits won't fix anything and just looks odd compared to how JRE versions are generally referred.

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

Re: Maven Artifact JDK Suffix

От
Vladimir Sitnikov
Дата:
>Using two digits won't fix anything

Well, if one module depends on "jre9 and another depends on jre10",
then jre9 will be used by Maven.

Another issue: maven badge would display wrong version.
https://maven-badges.herokuapp.com/maven-central/org.postgresql/postgresql/badge.svg

>looks odd compared to how JRE versions are generally referred.

This is true.

Vladimir


Re: Maven Artifact JDK Suffix

От
Sehrope Sarkuni
Дата:
On Fri, Jan 15, 2016 at 8:50 AM, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
>Using two digits won't fix anything

Well, if one module depends on "jre9 and another depends on jre10",
then jre9 will be used by Maven.

That would only happen if both the jre9 and jre10 versions specified were the same release version. A later jre9 release would still be picked over an earlier jre10 release as the release version is on the prefix.
 
Another issue: maven badge would display wrong version.
https://maven-badges.herokuapp.com/maven-central/org.postgresql/postgresql/badge.svg

>looks odd compared to how JRE versions are generally referred.
 
Why not change the JRE suffix into a prefix?

Sure it looks ever weirder but it does have the advantage of sorting properly. From a feature perspective, a newer JDK version would be considered a superset of an older JDK version (as it'd sort later). We would still need to switch to a double digit to ensure proper sorting.

Here are some examples:

* jre07-9.4.1207
* jre08-9.4.1202
* jre09-9.4.1204
* jre10-9.4.1205

With this setup the JRE comes first so the newer JRE-based driver version always wins. That would fix newer JDBC features mysteriously disappearing when a dependency adds a newer driver version for an older JRE.

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

Re: Maven Artifact JDK Suffix

От
Vladimir Sitnikov
Дата:
>* jre07-9.4.1207

This is not a valid Maven version.
Valid version should be <major>.<minor>.<patch><qualifier> where
major/minor/patch are numerics

We'd probably better follow "plug&pray" development style and go ahead
with jre6/jre7/jre8 then.

Any volunteers to prepare such a PR? (I'm not sure if there's anything
more than mvn versions:set is required)

Vladimir


Re: Maven Artifact JDK Suffix

От
Sehrope Sarkuni
Дата:
On Fri, Jan 15, 2016 at 9:15 AM, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
>* jre07-9.4.1207

This is not a valid Maven version.
Valid version should be <major>.<minor>.<patch><qualifier> where
major/minor/patch are numerics

It's still acceptable but it reduces all comparisons to pure string compares. As it's not the default style for Maven I agree we should avoid it then. 
 
We'd probably better follow "plug&pray" development style and go ahead
with jre6/jre7/jre8 then.

Yes I guess we don't really have much other choice besides complicating things quite a bit with separate dependencies for the API itself (and/or separate artifacts per JDK).

We should add a note to the README about this as well. I'm sure someone will eventually run into the issue of a dependency specifying a newer driver version with a lower JDK. Would be nice to have it documented somewhere that the solution is to make sure the top level Maven project specifies the latest version for the desired JDK version.

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

Re: Maven Artifact JDK Suffix

От
Mikko Tiihonen
Дата:
On 01/16/2016 04:55 PM, Sehrope Sarkuni wrote:
On Fri, Jan 15, 2016 at 9:15 AM, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
>* jre07-9.4.1207
 
We'd probably better follow "plug&pray" development style and go ahead
with jre6/jre7/jre8 then.

Yes I guess we don't really have much other choice besides complicating things quite a bit with separate dependencies for the API itself (and/or separate artifacts per JDK).

We should add a note to the README about this as well. I'm sure someone will eventually run into the issue of a dependency specifying a newer driver version with a lower JDK. Would be nice to have it documented somewhere that the solution is to make sure the top level Maven project specifies the latest version for the desired JDK version.

I'd like to point that the latest java9 pre-release (jre9 build 100) contains support for Multi-Release jars http://openjdk.java.net/jeps/238. This means we can put both jre8 and jre9 specific classes to same jar file. So we only need the jre6 and jre7 for legacy reasons. For users this is a good news since they no longer have to care about their jre version - the single jar just works for them, even after they update the jre.

So my proposal is to not add jre8 qualifier to the current jre8 jars. We just need to add support to the build for the multi-release jars before jre9 is released next year. I'm certain that a proper maven tooling to do that will materialize in time.

-Mikko

Re: Maven Artifact JDK Suffix

От
Dave Cramer
Дата:
On 18 January 2016 at 04:52, Mikko Tiihonen <mikko.tiihonen@nitorcreations.com> wrote:
On 01/16/2016 04:55 PM, Sehrope Sarkuni wrote:
On Fri, Jan 15, 2016 at 9:15 AM, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
>* jre07-9.4.1207
 
We'd probably better follow "plug&pray" development style and go ahead
with jre6/jre7/jre8 then.

Yes I guess we don't really have much other choice besides complicating things quite a bit with separate dependencies for the API itself (and/or separate artifacts per JDK).

We should add a note to the README about this as well. I'm sure someone will eventually run into the issue of a dependency specifying a newer driver version with a lower JDK. Would be nice to have it documented somewhere that the solution is to make sure the top level Maven project specifies the latest version for the desired JDK version.

I'd like to point that the latest java9 pre-release (jre9 build 100) contains support for Multi-Release jars http://openjdk.java.net/jeps/238. This means we can put both jre8 and jre9 specific classes to same jar file. So we only need the jre6 and jre7 for legacy reasons. For users this is a good news since they no longer have to care about their jre version - the single jar just works for them, even after they update the jre.

So my proposal is to not add jre8 qualifier to the current jre8 jars. We just need to add support to the build for the multi-release jars before jre9 is released next year. I'm certain that a proper maven tooling to do that will materialize in time.

So I guess that means we really don't need the suffix.