I have a bytecode weaver that I want to execute during the eclipse build. To compile/weave classes, it has to have access to the project classpath, including library dependencies and such. But when I go to the project properties->Builders->New->Program dialog, I can’t find anywhere to give my weaver the classpath so it can do its job. The variables don’t seem to include it.
I would expect at least to be able to configure the equivalent of the Java compiler as a custom builder which would also require all the classpath, so… how do I get it?
I found an open eclipse issue that seemed to suggest that what I wanted to do was not implemented. How does one build without the information necessary to build? Oh well.
I found/scripted a workaround:
Use this:
http://java.net/projects/parse-dot-classpath
pass a script the project path so it can find the .classpath file to parse. Pass any variables you might need along with that. Then you can in the script pass that classpath to whatever builder you wanted to use.
Here’s an example (not pretty, but it works):