Community
Participate
Working Groups
Build Identifier: M20111020-1539 I am using JDT: Version: 3.6.2.r362_v20101117 Build id: M20111020-1539 with Eclipse Platform: Version: 3.6.3.r362_v20110302 Build id: M20111020-1539 In a Java Project when an extra source folder is added, and the output folder value is the same that a source folder ( see the java build path page image ), you will get a Java Build Path problem ( see the second image ): Source folder 'SecondSorce' in project 'MyJavaProject' cannot output to distinct source folder 'src' This java build path problem was not shown in previous version, what does it mean? it is working as design? Reproducible: Always Steps to Reproduce: 1.Create a Java Project 2.Change the "Default output folder" to a source folder name ( src if you created it with the default values) 3.Create a second source folder "SecondSource"
Created attachment 207049 [details] Java Build Path Page
Created attachment 207050 [details] Java Build Page Error
This is intentional. See bug 287164. Closing as WORKSFORME as this is the expected behavior.
Verified for 3.8M4 using build I20111202-0800
I would like to re-open this bug to consider the existing scenario that is now broken because of this change. We have an adopter product that uses the same src folder as the output of the project. src1 - > src1 This has the benefits of maintaining both java and non - java artifacts in an existing structure, without the need to physically copy the non-java artifacts. This project has annotation processors activated, and by default, will create the .apt_generated source folder, also using the "src1" output folder. It is understood that non java artifacts in the .apt_generated folder will not be copied. We understand this isn't an optimum project setup, and the limitations of JDT in this area, but it seems a warning is more appropriate. Now in the Juno release, this project setup is no longer allowed, and existing customers will be forced to change their project settings. This is not great.
We may to consider special case handling for this configuration. Jay, please study this.
The problem shows up as a warning and not as an error in builds < 3.8. We won't change that, as such a setup can be dangerous (see bug 287164). Also note, that with 3.8 and newer builds, this will be an error by default.
(In reply to comment #7) > The problem shows up as a warning and not as an error in builds < 3.8. We won't > change that, as such a setup can be dangerous (see bug 287164). > > Also note, that with 3.8 and newer builds, this will be an error by default. Just to add, this error can be configured to be a warning or ignored in 3.8.
I assume when you say can be configured, you mean via a product preference? So users don't need to set the preferences themselves?
(In reply to comment #9) > I assume when you say can be configured, you mean via a product preference? So > users don't need to set the preferences themselves? This can be a workspace or a project preference. If users have to create a project through your product interface, you could modify this preference. Otherwise, users might have to modify the preference.
(In reply to comment #10) > (In reply to comment #9) > > I assume when you say can be configured, you mean via a product preference? > > users don't need to set the preferences themselves? > This can be a workspace or a project preference. If users have to create a > project through your product interface, you could modify this preference. > Otherwise, users might have to modify the preference. This is not entirely true. Since it is a "normal" preference one can also set it via plug-in preferences customization: 1. Create a file with the default preferences if there isn't one already. 2. Add the following line to that file: org.eclipse.jdt.core/org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error --- or: --- org.eclipse.jdt.core/org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=ignore 3. Start Eclipse with either -pluginCustomization <file location> -vmargs Declipse.pluginCustomization=<file location> This works for 3.6.2+, 3.7.x and 3.8.
Verified for 3.8M7