Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 534811

Summary: Modular project containing binary artefacts
Product: [Eclipse Project] JDT Reporter: Christoph Langer <christoph.langer>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: christoph.langer, stephan.herrmann
Version: 4.7.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard: stalebug

Description Christoph Langer CLA 2018-05-17 08:17:54 EDT
I'm assembling a java library where I have most classes as source code that gets build and a few class I'm adding from binary.

In Eclipse with non modular Java projects, I can include these binary artefacts as library dependency and my project builds fine in eclipse.

Now, when I have a modular project (>= Java 9), and I add a library dependency with these binaries, they won't be found by the build of the other source code classes. No matter if I put the stuff on source path or module path.

Is that working as designed? Shouldn't there be some way to consider binary artefacts when assembling a module in Eclipse JDT?
Comment 1 Stephan Herrmann CLA 2018-05-17 16:42:53 EDT
In a modular project dependencies need to be declared in module-info.java, too ("requires").

It sounds like those .class files shouldn't really be handled as a dependency, but as part of the current module - is that what you are trying to achieve?
Comment 2 Christoph Langer CLA 2018-05-18 04:05:22 EDT
ok, let's describe this more abstract:

I have a package called "package", and I have classes "package.A" and "package.B".

Class "package.B" exists only as binary, no source code. Class "package.A" exists as source and references "package.B".

In my modular project, I want to create a module that contains "package" (no matter if it is mentioned in module-info...). I want to pack both "package.A" (from the build) and "package.B" (the binary) together.

Currently it's not possible to model this with Eclipse JDT - or at least I have not figured out how.
Comment 3 Christoph Langer CLA 2018-05-18 04:06:57 EDT
@Stephan, to answer your question: Yes :)
Comment 4 Eclipse Genie CLA 2020-05-20 11:24:21 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Stephan Herrmann CLA 2020-05-20 13:06:00 EDT
@Christoph: is this issue resolved via --patch-module?
Comment 6 Christoph Langer CLA 2020-06-23 04:56:19 EDT
(In reply to Stephan Herrmann from comment #5)
> @Christoph: is this issue resolved via --patch-module?

Probably not. But I don't follow up on this issue any more (no interest), so for me it's ok to keep it as CLOSED WONTFIX.