You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Paul Sandoz <pa...@oracle.com> on 2016/03/08 11:40:48 UTC

Re: Multi-Release JAR file patch as applied to build 108 of Java 9 breaks almost every project out there (Apache Ant, Gradle, partly Apache Maven)

Hi Andre,

> On 6 Mar 2016, at 00:15, André-John Mas <an...@gmail.com> wrote:
> 
> Hi,
> 
> Given the issues we are seeing, and I suspect this is not the only code with these assumptions, is there any way this functionality can be limited to "multi-release aware" code, either via a constructor parameter or a new method? What is the most elegant approach?
> 

For resource URLs, associated with an MR-JAR, and obtained from a class loader, here are three possible routes we could take:

1) Modify the resources URLs, cognisent of the known issues processing such URLs;
2) Resources URLs are reified; or
3) Resources URLs are not modified (meaning they are not runtime versioned).


By 2) i mean that:

  URL u = loader.getResource(“foo/Bar.class”)

may return u that is say:

  “jar:file:/….!/META-INF/versions/9/foo/Bar.class”

rather than:

  “jar:file:/….!/foo/Bar.class”

But we need to work through the implications of that approach.

Paul.