Skip to content

Add JPMS support using Automatic-Module-Name#154

Closed
mechite wants to merge 1 commit intoapache:masterfrom
mechite:master-1
Closed

Add JPMS support using Automatic-Module-Name#154
mechite wants to merge 1 commit intoapache:masterfrom
mechite:master-1

Conversation

@mechite
Copy link

@mechite mechite commented Aug 15, 2023

Understandably this project is unmaintained and pointless for a long time. However, many libraries, especially proprietary ones, still make use of commons-logging.

It is ideal if we can simply reserve the org.apache.commons.logging module name so that it is safe to publish these artifacts, and this artifact doesn't prevent migration of ancient projects to JPMS.

Signed-off-by: Mechite <contact@mechite.com>
@bowbahdoe
Copy link

bowbahdoe commented Aug 20, 2023

        <configuration>
          <archive combine.children="append">
            <manifestEntries>
              <Automatic-Module-Name>org.apache.commons.logging</Automatic-Module-Name>
            </manifestEntries>
          </archive>
        </configuration>

It seems like this is already done - is this configuration not enough/not functioning correctly?

(There isn't really a reason not to give a full module-info anyways)

@mechite
Copy link
Author

mechite commented Aug 20, 2023

It is not - I have currently a modified JAR deployed to my local repository with Automatic-Module-Name set in order to achieve this.

I do agree though - dmlloyd/module-info can be used to generate the file without dropping support for Java <8, or alternatively a java9 source directory created and module-info built seperately.

In any case, Automatic-Module-Name should be set and working as soon as possible in order to reserve the name.

@bowbahdoe
Copy link

bowbahdoe commented Aug 20, 2023

There is also https://github.com/moditect/moditect, which i've used in PRs to other repos. Would maybe want to/have to set that up in commons-parent first though.

@garydgregory
Copy link
Member

Moditect will be used for the next release, see the definition in commons-parent.

@mechite
Copy link
Author

mechite commented Oct 18, 2023

When is this release scheduled?

@garydgregory
Copy link
Member

When is this release scheduled?

There is no schedule but it is on my to-do list.

@garydgregory
Copy link
Member

Closing: module info file generated by parent POM.

mechite added a commit to siriushq/stellar that referenced this pull request Oct 4, 2025
…d1af9de already removed usage of it

This was used as a method of allowing sub-modules to access the local
repository ("stellar.depot", which was used to house a `commons-logging`
version that was modified for JPMS support - was removed due to [1]).

[1] - apache/commons-logging#154 (comment)

Signed-off-by: Mechite <contact@mechite.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants