Looking at your exception, it says that the coretestapplication is missing. The ant target could be found at plugins/org.eclipse.test_3.1.0/library.xml:10
This is actually a dependency issue. Eclipse needs to have all the plugins in order to build.
To configure it correctly, there're 2 files to look at.
- The product file
- The feature.xml
Product
Make sure you the product file contains all the plugins you need.
After that, add the org.eclipse.rcp and org.eclipse.test features
...
plugins are above
...
<features>
<feature id="mock_feature" version="1.0.0"/>
<feature id="mock_feature_test" version="1.0.0"/>
<feature id="org.eclipse.rcp" version="3.2.0.v20060609m-SVDNgVrNoh-MeGG"/>
<feature id="org.eclipse.test" version="3.2.0.v20060220------0842282442"/>
</features>
You need org.eclipse.test to run the tests, and org.eclipse.rcp to launch eclipse in order to run the tests.
Don't forget to set useFeatures to 'true'
<product name="mock" id="com.example.mock" application="com.example.mock.application" useFeatures="true">
feature.xml
Assuming you have a feature for testing, you must add 2 additional plugins.
...
other plugins above
...
<plugin
id="org.apache.ant"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.eclipse.core.runtime.compatibility"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
THe tests need org.apache.ant to run the tests and org.eclipse.core.runtime.compatibility to launch.
Another gotcha
Ensure that in your target eclipse(the copy of eclipse that you use to build against), there's only 1 copy of each plugin. For example if there're 2 versions of com.ibm.icu plugins in the plugin folder, eclipse would use the newer one. As the pde build plugin is configured to use a specific version, eclipse would complain that it cannot find the particular plugin even when it is there.
Some thoughts
The whole process of building eclipse could be a lot better. In fact I got the process mostly by trial and error. The documentation is outdated and sparse. The error messages doesn't help. It only leaves you feeling helpless and frustrated. Let's hope this post helps a fellow programmer save some time!