[
https://issues.apache.org/jira/browse/SPARK-23543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17272006#comment-17272006
]
Naman Nigam commented on SPARK-23543:
-------------------------------------
Spark still(with 3.0.1 dependencies) struggles to derive an automatic module
name. Is there any other Jira id that I could follow to see the progress
towards making the artifact accessible as modules in the Java platform module
system?
> Automatic Module creation fails in Java 9
> -----------------------------------------
>
> Key: SPARK-23543
> URL: https://issues.apache.org/jira/browse/SPARK-23543
> Project: Spark
> Issue Type: Bug
> Components: Build
> Affects Versions: 2.3.0
> Environment: maven + jdk9 + project based on jdk9 module system
> Reporter: Brian D Chambers
> Priority: Major
> Labels: bulk-closed
>
> When adding Spark to a Java 9 project that is utilizing the new jdk9 module
> system, Spark components cannot be used because the automatic module names
> that are generated by the jdk9 fail if the artifact has digits in what would
> become the beginning of an identifier. The jdk cannot generate an automatic
> name for the Spark module, resulting in Spark being unusable from within a
> java module.
> This problem can also be validated/tested on the command line against any
> Spark jar, e.g.
> {panel:title=jar --file=spark-graphx_2.11-2.3.0.jar --describe-module}
> Unable to derive module descriptor for: spark-graphx_2.11-2.3.0.jar
> spark.graphx.2.11: Invalid module name: '2' is not a Java identifier
> {panel}
> Spark does not have to support jdk9 modules to fix this issue. It just needs
> to add a line of metadata to its manifest so the jdk can generate a valid
> automatic name.
> the following would be sufficient to fix the issue in spark.graphx
> {code:java}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <configuration>
> <archive>
> <manifestEntries>
> <Automatic-Module-Name>spark.graphx</Automatic-Module-Name>
> </manifestEntries>
> </archive>
> </configuration>
> </plugin>
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]