Community
Participate
Working Groups
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
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>
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.
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.
BTW, the example above does not work (but maybe there's an alternative way).
Should be addressed when acquiring the javac ant adapter.
When do we get it?
If you're talking about the compiler adapter provided by PDE Build, anytime. Just let me know.
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.
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.
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.
Fixed and released in HEAD.