Bug 43859 - Nesting resources in output directories....
Summary: Nesting resources in output directories....
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-29 15:30 EDT by rvijay2001 CLA
Modified: 2003-10-06 17:36 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rvijay2001 CLA 2003-09-29 15:30:48 EDT
Currently, Eclipse does not allow nesting of jars and zips inside the output 
directories of a java project.

In large corporations like mine, there may be existing projects where this is 
the default setup.  It is not possible to change the way the project is setup 
just so we can use Eclipse.

It is rather easy to get rid of this restriction (Instead of cleaning out the 
entire output path before a build, you need to clean out everything except the 
resources.... not a very hard thing to do, considering how much simpler it will 
make things).
Comment 1 Philipe Mulet CLA 2003-09-29 15:43:35 EDT
A source folder can coincidate with its own output location, in which case this 
output can then contain library archives. However, a specific output location 
cannot coincidate with any library or a distinct source folder than the one 
referring to it. 

For instance, if the project is both the source folder and the output folder, 
then you can nest libraries in it.

Last, if the above setup did not work for you, you could disable the output 
folder cleaning behavior: Preferences>Java>Compiler>Build Path>Clean output 
folders on full build


Does this work for you?
Comment 2 Philipe Mulet CLA 2003-09-30 17:32:44 EDT
Downgrading severity
Comment 3 Philipe Mulet CLA 2003-10-02 04:53:24 EDT
From reporter:

The structure of our project is as follows:

Source:
<ProjectBase>/sourcecode

Libraries:
<ProjectBase>/Deliverables/Libraries (this folder contains all the jars and 
zips)

Output Path:
<ProjectBase>/Deliverables (the class files are put here)

This is a very large project and the source is shared among 5 large teams.  
It is impossible to change the structure of the project.  The SCM picks up 
the contents of the Deliverables directory for the official builds, hence 
the reason why the Libraries and Output directory are meshed.

Given this structure, I cannot even successfully create a project.  I have 
tried both 3.0M5 and the latest 2.1 Release.

Is there any workaround/trick that we can use to get around this problem?
Comment 4 Philipe Mulet CLA 2003-10-02 05:12:26 EDT
I was able to setup a project with following layout:

Project
+- /sourcecode
+- /Deliverables
      +- /Libraries
            +- junit.jar

an configure it to have the flavor you wanted.

Steps:
1- create Java project
2- add source folder 'sourcecode'
3- add source folder 'Deliverables'
4- go to build path project properties
5- set project default output to be 'Deliverables'; now you can nest more items 
in this output folder (see comment #1).
6- create folder 'Libraries' under 'Deliverables'
7- add some JARs in it (e.g. junit.jar)
8- back to build path properties dialog, add junit.jar to your classpath (if 
required).

My end .classpath looked like below (note you can simply copy/paste it in your 
Eclipse project once you reveal the .* files).

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="sourcecode"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry excluding="Libraries/" kind="src" path="Deliverables"/>
    <classpathentry kind="lib" path="Deliverables/Libraries/junit.jar"/>
    <classpathentry kind="output" path="Deliverables"/>
</classpath>


Comment 5 Philipe Mulet CLA 2003-10-02 07:15:36 EDT
Is it ok now ?
Comment 6 Philipe Mulet CLA 2003-10-06 17:36:20 EDT
From reporter:
Your suggestion worked beautifully.  I really appreciate your bringing this 
issue to closure so quickly.


Closing