question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Potential problem from lack of modular declaration for github-api jar file

See original GitHub issue

This project I’m working on, I intend to publish to a public repository at some point … I ran a Maven verify goal on my project and it came back with this warning:

[WARNING] ******************************************************************************************************************************************************************
[WARNING] * Required filename-based automodules detected: [github-api-1.301.jar]. Please don't publish this project to a public artifact repository! *
[WARNING] ******************************************************************************************************************************************************************

When I looked into the warning, apparently this is considered somewhat serious as it is caused by the library not having a module declaration, where a module declaration remains unchanged in future releases of an artifact where the filename does change. But as it is now, apparently that jar file lacks a module declaration so the module is declared automatically based on the filename.

This can cause problems for projects that depend on other artifacts that also depend on the Git-Hub API when they might depend on two or more and their dependencies on this API have different names. And a project that has such a dependency structure will be unable to run, and fixing it is not an easy proposition… so I guess the rule of thumb is to not publish projects that have dependencies with auto-generated module declarations.

So my question is:

Will you be declaring a module for the Git-Hub API so that this isn’t a problem when publishing projects that depend on it?

I realize this means that the API would need to be modularized … but surely this shouldn’t be that much of a bid deal?

Unless my assumptions on this are incorrect and this warning has a more… sinister cause? As in … something is broken or I’m implementing the API into my project incorrectly?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
EasyG0ing1commented, Dec 21, 2021

@bitwiseman Since you compile with Java 11, I’m pretty sure my last statement about incompatibility with 1.8 becomes non-issue… I bought and am now reading this book … currently in chapter 4 hope to be done within a couple of days … if I don’t have a firm grip on modular coding in Java by the time I finish it, I’ll join the circus.

0reactions
EasyG0ing1commented, Dec 31, 2021

HE’s got JOKES! LOL Screen Shot 2021-12-31 at 7 44 59 AM

I certainly cannot ever remember being accused of being too brief in my emails over the years … 😉

Just like to make sure everyone is on the same page and that no one ends up feeling like they were misled… when it comes to IT projects…

Read more comments on GitHub >

github_iconTop Results From Across the Web

[help] Problems building module-based app #1265 - GitHub
I can compile and build JARs for my own code with no problem, but when it goes to code execution it more feels...
Read more >
Using JUnit 5 in modules production code broken since 5.5.0 ...
Maven and IntelliJ IDEA show the same error message. Suspected causes: Possibility one: A change in the module configuration of JUnit has broken ......
Read more >
We need to define the JPMS strategy for EE10 and beyond #329
We have a problem with inconsistent JPMS usage for the platform APIs jars. ... We need to clearly define the requirements for supporting...
Read more >
A Proposal For Module Resolution · Issue #50152 - GitHub
When a user writes a module specifier (the string literal after from in an import declaration) in a TypeScript file, how should the...
Read more >
Specify a dependency should be on the module path #17609
I need to specify a certain dependency should be on the module path. It's not a modular jar, so it should run as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found