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

Bug 101020

Summary: linkedResources in build.xml
Product: [Eclipse Project] PDE Reporter: Philippe Krief <pjkrief>
Component: BuildAssignee: pde-build-inbox <pde-build-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philippe Krief CLA 2005-06-21 07:07:42 EDT
It seems that when PDE creates the "Ant Build file" its doesn't pay attention 
on the fact that some resources can be linked resources.

For example, one of my source folder "sax" actually references another folder 
in my workspace. We can see in the .project file the following tags:

<linkedResources>
  <link>
    <name>sax</name>
    <type>2</type>
    <location>D:/Workspaces/ws31/com.ibm.ive.exml/sax</location>
  </link>
</linkedResources>

but when PDE builds the ant file, it generates the following code:

<target name="exml-cldc.jar" depends="init" unless="exml-cldc.jar" 
description="Create jar: com.ibm.ive.exml.cldc exml-cldc.jar.">
...
  <!-- compile the source code -->
  <javac destdir="${temp.folder}/exml-cldc.jar.bin" 
failonerror="${javacFailOnError}" verbose="${javacVerbose}" 
debug="${javacDebugInfo}" includeAntRuntime="no" 
bootclasspath="${bootclasspath}" source="${javacSource}" 
target="${javacTarget}">
    <compilerarg line="${compilerArg}"/>
    <classpath>...</classpath>
    <src path="sax/"/> <!-- <==== ERROR!! -->
    <src path="jaxp/"/>
  </javac>
  ...
</target>

Instead of:
    <src path="sax/"/>
we should read:
    <src path="D:/Workspaces/ws31/com.ibm.ive.exml/sax/"/>

Be aware of the fact that a linked resource can be describes using a path 
variable. For example:
<linkedResources>
  <link>
    <name>sax</name>
    <type>2</type>
    <location>CURRENT_WORKSPACE/com.ibm.ive.exml/sax</location>
  </link>
</linkedResources>
with CURRENT_WORKSPACE = D:/Workspaces/ws31
in this case we would expect to see in the ant file something like:
...
<property name = "CURRENT_WORKSPACE" value = "D:/Workspaces/ws31"/>
...
    <src path="${CURRENT_WORKSPACE}/com.ibm.ive.exml/sax/"/>

Does it make sense?

Thanks for your understanding
Philippe
Comment 1 Pascal Rapicault CLA 2005-06-22 17:44:13 EDT
PDE Build is not workspace aware and therefore it ignores linked resources.

*** This bug has been marked as a duplicate of 66177 ***