Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] Modular jar with dependencies marked as being automatic modules

Hi,

assume the following scenario:

Project A:
- older project, not fully modularized
- uses m-jar-p in the build section to add the entry "Automatic-Module-Name" into its manifest

Project B:
- depends on A
- modular project

Project A can be compiled and deployed on the command line to my internal repo manager successfully, and can also be compiled in Eclipse.
When I add a "requires my.project.a" entry to B's module-info.java, B can also be compiled successfully and deployed to my repo manager on the command line.

Unfortunately m2e doesn't recognize A as being an automatic module so that the entry in B's module descriptor is marked as erroneous...
When l let Eclipse (re-)create B's module descriptor, I clearly see the difference:
Eclipse uses the Jar file name, but not the automatic module name I've given in A's pom.xml, and automatically adds a warning to the created entry:

Name of automatic module 'verbund.form' is unstable, it is derived from the module's file name.

But:
When I close project A in Eclipse so that Maven fetches the dependency from the repo manager, everything works as expected. Obviously m2e is then able to read the manifest entry.


Is there any workaround for this?


Regards

Thorsten

Back to the top