Community
Participate
Working Groups
Build ID: Eclipse 32 Steps To Reproduce: In our message broker toolkit we have to export (via API ) java projects and produce a resulting jar. This code must run in eclipse and also headless. In our previous release we depended on some internal IBM code that was now moved to WTP but this function is no longer available. So I did some digging and I see no common way to export a java project into a resulting jar file using eclipse and also in our headless command. I was going to use ANT but then I ran into a typical problem with the fact that I don’t know the source directory and I can’t hard code this info in an ant build script since it can change at anytime. Is there a clear API way to export a java project in eclipse 3.2 using an API in eclipse and also works in headless mode? Dave Spriet spriet@ca.ibm.com More information:
You might want to see if the new API org.eclipse.jdt.core.JavaCore#getGeneratedResources(IRegion, boolean) meets your needs.
Note that Dave was asking for an API in Eclipse 3.2. So to answer your question Dave, there is no such API in 3.2. As Olivier said, we introduced a new API in the 3.3 stream that would help you. Can you switch to 3.3 M6 ? If you can't then you might want to get the project output folders (through IJavaProject#getOutputLocation() and IClasspathEntry#getOutputLocation() if you have output folders per source folders). Then copy the content of those to the jar.
Closing as WONTFIX.
Verified for 3.6M1