Bug 12363 - Better integration of the batch compiler with ant javac task option -extdirs
Summary: Better integration of the batch compiler with ant javac task option -extdirs
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-27 11:18 EST by Olivier Thomann CLA
Modified: 2002-04-22 12:55 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2002-03-27 11:18:28 EST
The option -extdirs is not supported by the batch compiler. This option is used to specify a list of 
directories that contains jar files that need to be included in the classpath for the 
compilation. This is a way to significantly reduce the size of the classpath in case multiple 
libraries are used. It would be nice if the batch compiler supports all options for the javac ant 
task. That way the ant support inside eclipse would be improved.
This is a link to the 
documentation of the javac ant 
task:
http://jakarta.apache.org/ant/manual/CoreTasks/javac.html
Comment 1 Rodrigo Peretti CLA 2002-03-27 12:37:36 EST
I'm not convinced the extdirs is made for that use but I could be wrong. The 
following could solve the problem without having to change the batch compiler 
(I haven't tested though).

    <classpath>
      <pathelement path="${classpath}"/>
      <fileset dir="lib">
        <include name="**/*.jar"/>
      </fileset>
      <pathelement location="classes"/>
    </classpath>
Comment 2 Olivier Thomann CLA 2002-03-27 12:46:35 EST
According to the discussion on EC, -extdirs is used to target directories that 
contain jar files for the libraries used by the code you want to compile. It is 
a good alternative to significantly reduce the size of classpaths.
For the doc of the javac ant task, I can read:
          extdirs location of installed extensions.

I don't think it is a big problem to add this in the batch compiler.
Comment 3 Rodrigo Peretti CLA 2002-03-27 12:54:23 EST
I understand your point. I was just affraid that it could be just a side 
effect. The sun javac compiler seems to define a -extdirs command line and its 
usage says:

" -extdirs <dirs>           Override location of installed extensions"

I am just not convinced that "installed extensions" means "put here the 
library jars you want included to your classpath". But I can be wrong.
Comment 4 Rodrigo Peretti CLA 2002-03-27 12:56:05 EST
BTW, the example above does not work (but maybe there's an alternative way).
Comment 5 Philipe Mulet CLA 2002-04-15 07:31:04 EDT
Should be addressed when acquiring the javac ant adapter.
Comment 6 Olivier Thomann CLA 2002-04-15 09:38:46 EDT
When do we get it?
Comment 7 Rodrigo Peretti CLA 2002-04-16 11:18:36 EDT
If you're talking about the compiler adapter provided by PDE Build, anytime. 
Just let me know.
Comment 8 Olivier Thomann CLA 2002-04-18 16:56:08 EDT
I have a prototype that needs to be more intensively tested. Need to discuss how to integrate it 
inside JDT/Core. This adapter needs the ant.jar in order to be compiled and we need to provide a jar 
with only this adapter inside.

Comment 9 Olivier Thomann CLA 2002-04-19 16:01:17 EDT
I have added a jdtCompilerAdapter.jar file inside the org.eclipse.jdt.core plugin. The 
jdt/core plugin adds an extension point for the compiler adapter. A script has been added in the 
scripts folder. You might want to update the rt.jar file in the classpath property. Then simply 
run that script to generate the jdtCompilerAdapter.jar file from the source contained in the 
antadapter folder.
The build script refers to dependant jars needed to compile the adapter 
source.
Comment 10 Olivier Thomann CLA 2002-04-19 16:57:19 EDT
Rodrigo, could you please check with me if everything is fine with the new extension point? If this 
is the case, I will close this PR as FIXED.
Thanks.
Comment 11 Olivier Thomann CLA 2002-04-22 12:55:35 EDT
Fixed and released in HEAD.