| Summary: | Project->Properties -> Cannot nest output folder [x/y] inside [x] | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | David Turley <david.turley> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | major | ||
| Priority: | P5 | CC: | atec_post, beverku, blazej.kroll, david.turley, john_muir, Olivier_Thomann, skitching, sp_67 |
| Version: | 3.2 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
I'd like to second this. I'm working on a webapp and want to be able to point Tomcat at the directory that eclipse compiles code into (using a custom context) for ease of development. Currently, this is done by pointing tomcat at PROJECT/web (containing the master web files) and PROJECT/src/java outputs to PROJECT/web/WEB-INF/classes. However this makes building with other tools difficult because the "clean" web directory is "polluted" by generated classes. In particular, maven builds run from the command line have problems. Being able to set things up as David has described would make life much easier; I don't understand why eclipse actively prevents this. Definitely not in reach for 3.2, but will consider allowing more flexible layouts in 3.3 (plan item). This is a great usecase. Hi folks, I'd just like to add my voice to this issue to ensure it's resolved in 3.3. The recommended Tomcat source/deploy layout of <base>/web --> <base>/build/web and <base>/src --> <base>/build>/web/WEB-INF/classes cannot be used in Eclipse. I'm really puzzled as to why not. Thanks, John Muir I agree with you too. This problem can be a nightmare if you work with a medium/large web project and every file you save you have to recompile all with maven and then redeploy it back to the server. I would give you all my votes if I could :-) Regards, Alejandro. As of 3.3 RC4, this bug is still outstanding and has not been RESOLVED as previously indicated. Package your project: Alternative to NESTED BUILD folder issue. --------------------------------------------------------------- Issue: define your own NESTED folders under Project->Java Build Path->Source-output-folders, thereby allowing you to package your project. While you wait for the Project build issue to be resolved, there are 2 alternative approached you can try, both of which I've used successfully. 1) Ant - Create your own ant build .xml file to do your stuff (for instance package compiled code to an exploded .ear directory) and add it to 'Project->Builders' by pressing 'New' and select 'ant' from the list that appears. So next time Eclipse does an automatic compile of your modified .java or some other text file by calling the 'Java Builder' ant file, it will follow that by calling your newly added build file. 2) JBoss Package Builder (Ant) - Use JBoss IDE, which has a Package Builder UI http://docs.jboss.com/jbosside/tutorial/build/en/html/packaging.html to allow you to package your .jar or .ear any which way you want – much better then (Project->Java Build Path->Source-output-folders). What Package Builder UI does, is it automatically creates an ant .xml file for you and like 1) above adds it to Project->Builders just after 'Java Builder'. What good is you are not dependant of JBoss server to take advantage of its Package Builder UI, after all, it just generates an Ant .xml file. Hope this helps you Cheers all David I'm using Eclipse on Linux: Eclipse IDE for Java Developers Version: Helios Service Release 1 Build id: 20100917-0705 This is still a major problem, and like the other comments it's because I'm developing a web app. This is REALLY MAJOR BUG! Hhhhh (silent angry) - switching onto Idea... 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. If you have further information on the current state of the bug, please add it. 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. |
NOTE: This bug is similar to a previous Bug report (43993) that was marked as resolved, but I think the bug report was mis-understood. Why is this a Problem: ---------------------- Want to use "Project -> Java Build Path -> Source Tab" to configure my project IDE build processs to include EAR/WAR config dependencies (like web-inf/web.xml). The "PROJECT/build" directory will then contain all the files necessary for local deployment and debug testing in Eclipse, which JBoss server point to on startup. For trying to track down a solution for this via google, I find its a common senario alot of eclipse developers want to use to make easier local deployment of there Web project, but the keep on running into "Cannot nest output folder .. inside ..." problem. Advantage are ------------- a) is it easy to setup then 3 party solution - dont have to hand edit other files like WTP .wtpmodules etc. b) higher intergration and better customization of enterprise build process in the IDE. c) any changes made to source, JSP, config files etc, are automatically reflected/deployed (by Project->Build Automatically) within you running web application without additional work. Scenario: --------- I have the following project structure (J2EE app): - src +- java (Java sources) +- web (JSP, HTML, ...) - conf (e.g. web.xml) and would like to build to the following output: - build +- webapp (all from src/web) +- WEB-INF (all from conf) +- classes (compiled from src/java) to achieve this, I would define three source folders, each with its own output folder: src/java -> build/webapp/WEB-INF/classes src/web -> build/webapp conf -> build/webapp/WEB-INF Unfortunately, this does not work with Eclipse 3.x, as you keep on getting the "Cannot nest output folder .. inside ..." message. Example: "Cannot nest output folder 'PROJECT/build/webapp/WEB-INF/classes' inside 'PROJECT/build/webapp'". Possible solution: ------------------ In tab "Project->Properties->[Java Build Path]->[Source]" on pressing the Edit button for [Output-folder] option of "build/webapp", could you a) allow the user to "Specify output folder (path relative to 'PROJECT') ------------------------------------------------------------------------ NOTE: this not work a present because get the "Cannot nest output folder..." message. Example: if Default Output folder is 'PROJECT/build' and Source 'conf' output folder is 'PROJECT/build/webapp/WEB-INF' then 'conf/web.xml' is allowed to deployed under 'PROJECT/build/webapp/WEB-INF/web.xml' b) allow the user to "Specify output folder (path relative to 'DEFAULT OUTPUT FOLDER'). ----------------------------------------------------------------------------- Example: if Default Output folder is 'PROJECT/build' and Source 'conf' output folder is '[DEFAULT OUTPUT FOLDER]/webapp/WEB-INF' then 'conf/web.xml' is allowed to deployed under 'PROJECT/build/webapp/WEB-INF/web.xml' c) or introduce or reuse another tab (like Order and Export) ------------------------------------------------------------- to allow the user to specify other enterprise dependencies (that may not necessary be source code like JSP, XML config files etc) to be automatically reflected/deployed (by Project->Build Automatically) within your local build without additional work. Thanks guys and girls for any help on this. This would be a great bug-fix or enhancment to improve the Eclipse build process. Kind regards David