Skip to main content

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

Do you have the "m2e connector for mavenarchiver pom properties" plugin installed? It's available in the Eclipse update site.
I'd expect it would generate proper Manifests in target/classes, that would be picked up by M2E/JDT to compute the project's module name. But I might be wrong.

On Mon, Feb 18, 2019 at 6:12 AM Thorsten Heit <thorsten.heit@xxxxxx> wrote:
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_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/m2e-users


--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, thenĀ http://goo.gl/tnBgH5

Back to the top