Community
Participate
Working Groups
In a Java project that is configured to have more than one source folder it is possible to have the contents of each source folder be compiled to a different output folder. e.g. source folder "src" gets compiled to "bin" while source folder "src-impl" gets compiled to "bin-impl". In the Java Build Path properties of the project it *should* be possible to only export classes from selected source folders (e.g. export "src" but not the "src-impl") but that is not an option : this looks like a bug. To see what I mean create a project as described above (source folder "src" compiled to "bin" and source folder "src-impl" compiled to "bin-impl") then open up the project properties. Java Build Path -> Order and Export tab shows the two source folders as checked (i.e. exported) in the list of classpath entries and exported entries. Neither of them can be unchecked. If I wanted to build certain types in a project which I did not want other dependent projects to see then this would be a great way to achieve it. A concrete use case for this might be a number of Java projects in my workspace where each one was being used to build a separate OSGi bundle jar. To preserve the desired OSGi modularity at development time I really, really want to control which packages are visible to other projects. Allowing a project to only export selected classpath entries would achieve this. Thanks, George
[Eclipse 3.2 M6] When I have two source folders configured in my project, I can neither check nor uncheck any of them or their contents. Their are marked with a square, not a tick. Please see following attachment for a screenshot.
Created attachment 37521 [details] Order and Export dialog with strange checkmarks
In the past, we would always export all source folders since they would all be mapped to the project's output. Now that we have custom output per source folder, the scenario described here is valid. However this is too risky of a change at this late stage in the release cycle. Will reconsider post 3.2. Note this may not be exactly what you want, but dependent projects can also define access restrictions and prevent their code from accessing internal packages from required projects/libraries.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.