JDK-8149975 : [packager] Programmatically Determine JDK or JRE Modules
  • Type: Bug
  • Component: deploy
  • Sub-Component: packager
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-02-16
  • Updated: 2016-08-12
  • Resolved: 2016-08-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Description
The packager needs a way to programmatically determine if a module is a JDK module and should not be included in the delivered JRE, or if the module is a JRE module and is OK to deliver.

This will create a properties file as a resource that is embedded in the jdk.packager module.
Comments
Changeset: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/0ce6c9f0d48c
12-08-2016

Looks fine to me. +1
12-08-2016

This moves the new files to not be under the root package "resources". http://cr.openjdk.java.net/~cbensen/JDK-8149975/webrev.06/ two changes: build.gradle: - def resourceDir = "build/resources/main/resources/tools/redistributable-files" + def resourceDir = "build/resources/main/jdk/packager/internal/resources/tools/redistributable-files" and RedistributableModules.java: - private static final String REDISTRIBUTABLE_MODULES_FILENAME = "resources/tools/redistributable-files/redistributable.list"; + private static final String REDISTRIBUTABLE_MODULES_FILENAME = "jdk/packager/internal/resources/tools/redistributable-files/redistributable.list";
12-08-2016

I can't move dtjava.js, but I can move the new resource, "redistributable.list". So it'll look like this: com jdk/packager/internal/resources/tools/redistributable-files/redistributable.list resources/web-files/dtjava.js
11-08-2016

I thought you were referring to a different directory. I can move the new resources anywhere in jdk.packager. I'll fix that.
11-08-2016

OK. Will that change where it is in ant-javafx.jar ? That seems like it would break anyone who was relying on them.
11-08-2016

+1
11-08-2016

I downloaded the patch from the .05 webrev and I see that the javafx.deploy module is now excluded, but the resources issue still exists. Here is a listing of the directory in rt/build/modular-sdk/modules/jdk.packager which is the 'root' of the module package hierarchy for that module: com/ jdk/ resources/ so the resources package is still at the root of the hierarchy. Having said that, I see that this matches what is in ant-javafx.jar in JDK 8, so as long as it isn't exported (which it isn't) it should be OK. I presume you've tested the packager itself?
11-08-2016

Here is a new webrev: http://cr.openjdk.java.net/~cbensen/JDK-8149975/webrev.04/ I fixed exclusion of jdk.plugin, jdk.javaws, and javafx.deploy.
10-08-2016

http://cr.openjdk.java.net/~cbensen/JDK-8149975/webrev.05/
10-08-2016

A quick test looks like it is working. I do have a couple comments: 1) the resources (tools and web-files) should be put into one of the packages in the package hierarchy already used by the packager and not in a top-level "resources" package which is too generic a name. 2) You exclude jdk.deploy, but not jdk.plugin, jdk.javaws, or javafx.deploy all of which depend on jdk.deploy. This doesn't seem correct. Similarly, you exclude jdk.packager, but include jdk.packager.services. Is this intended?
01-08-2016

New Webrev: http://cr.openjdk.java.net/~cbensen/JDK-8149975/webrev.03/
29-07-2016

+1
07-07-2016

Webrev: http://cr.openjdk.java.net/~cbensen/JDK-8149975/webrev.02/
06-07-2016

I have not tried to build it yet, but took a look at the diffs. Minor nit, the indentation feels off: 2965 "-XaddExports:java.base/sun.security.pkcs=ALL-UNNAMED," 2966 + "java.base/sun.security.timestamp=ALL-UNNAMED," 2967 + "java.base/sun.security.x509=ALL-UNNAMED", 2968 "-encoding", "UTF-8"] In Module, there is an added import with no other code additions which seemed odd: 37 import java.util.Optional; is it needed ? +1
06-07-2016

Webrev: http://cr.openjdk.java.net/~cbensen/JDK-8149975/webrev.01/
06-07-2016