Skip to content

Commit

Permalink
Document what we learned about use in modular builds
Browse files Browse the repository at this point in the history
Also give our preferred JAR the canonical module name.
  • Loading branch information
jeff5 committed Apr 23, 2024
1 parent 7236dc4 commit ff28286
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
20 changes: 15 additions & 5 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,25 @@ Jython 2.7.4

New Features

- When using Java 9+ modules, a Jython jar on the module path now appears
as an automatic module org.python.jython2, org.python.jython2.standalone,
or org.python.jython2.slim, according to the JAR [GH-325]. These modules
overlap in content and may not be used together.
- When building a modular application or library, the jython-slim JAR may
be placed on the module path [GH-325]. It will export its usual packages
in an automatic module org.python.jython2. Application build tools that
create a run script, will generally add the dependencies of Jython to
the module path automatically. The developer may have to add (via the
build script) --add-modules ALL-MODULE-PATH to the java command to
ensure that these dependencies are resolved.

Jython 2.7.4b2 Bugs fixed
- The jython-standalone JAR (module org.python.jython2.standalone) may
also be used. Many shaded (and some unshaded) dependencies are then
duplicated in its module, which can be a problem. It may be necessary to
--add-modules ALL-DEFAULT to ensure JDK classes are resolved.


Jython 2.7.4b2 Bugs fixed and features

- [ GH-325 ] Upward compatibility to Java 9 Modularity


Jython 2.7.4b1 Bugs fixed
- [ GH-316 ] Clash over META-INF in shaded JARs
- [ GH-310 ] CVE-2024-25710 and CVE-2024-26308 (commons-compress)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ jar {
attributes ([
'Main-Class': 'org.python.util.jython',
'Built-By': 'build.gradle',
'Automatic-Module-Name': 'org.python.jython2.slim'
'Automatic-Module-Name': 'org.python.jython2'
])

attributes( [ // Build-Info section
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ The text for an official release would continue like ...
<manifest>
<attribute name="Main-Class" value="org.python.util.jython" />
<attribute name="Built-By" value="${user.name}" />
<attribute name="Automatic-Module-Name" value="org.python.jython2"/>
<attribute name="Automatic-Module-Name" value="org.python.jython2.shaded"/>
<attribute name="Implementation-Vendor" value="Python Software Foundation"/>
<attribute name="Implementation-Title" value="Jython fat jar"/>
<attribute name="Implementation-Version" value="${jython.version}"/>
Expand Down

0 comments on commit ff28286

Please sign in to comment.