JEP 238: Multi-Version JAR Files

Paul Sandoz paul.sandoz at oracle.com
Wed Feb 25 15:41:13 UTC 2015


Hi Peter,

On Feb 14, 2015, at 8:54 PM, Peter Levart <peter.levart at gmail.com> wrote:

> 
> On 02/12/2015 09:52 PM, Paul Sandoz wrote:
>> Hi
>> 
>> In connection with the JEP there is also a design document to help the discussion:
>> 
>>   http://cr.openjdk.java.net/~psandoz/jdk9/MultiVersionJar-8u60-9-design.md
>> 
> 
> Hi Paul,
> 
> Thinking about this proposal, I can't escape the feeling that the design favors JDK as the only target for which multi-version jars exist.

There is a reason you cannot escape that feeling :-) because as currently designed it is intended only to version a JAR over major Java platform versions.

Your maven-inspried profile solution is an interesting, but  do think it increases the complexity by expanding versioning to any dependency.

A MVJAR (a unit of release) now has two or more sets of dependencies. The developer has to layout the classpath carefully with an understanding of what jar files are associated to what profile in another jar. Managing dependencies in large systems can be rather complex and i fear this will add further to that complexity.

I could see how one could more formally manage this with a module system where modules have names and declare the names of modules they depend on. Thus modules can be formally analysed and the module paths verified. But still the multiple sets of dependencies and selection of concerns me (furthermore Project Jigsaw already has a stacked schedule of stuff to do). 

So at the moment i would prefer to keep this more constrained and focused on the JDK itself. 

Paul.



More information about the core-libs-dev mailing list