Question

I'm refactoring my RCP app, and I'm going to use tycho as building system.

In the process, I had to rewrite my target platform so to depend on online repositories. Currently, my target is something like:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.6"?>
<target name="MyRcpApp" sequenceNumber="12">
  <locations>
    <location includeAllPlatforms="false" includeMode="planner" includeSource="false" type="InstallableUnit">
      <unit id="org.eclipse.rcp.feature.group" version="0.0.0"/>
      <unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0" />
      <repository location="http://download.eclipse.org/releases/indigo/"/>
    </location>
  </locations>
  <targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
</target>

However, this target does not provide the bundle for junit tests (org.junit)... hence my eclipse has a lot of errors (due to the missing junit) and my build fails.

Does somebody know which unit should I include? (or, better, how can I get the list of all the unit available at a given repository?)

Was it helpful?

Solution

you will need the JDT feature (unfortunately there is no smaller feature I know of which includes junit)

<unit id="org.eclipse.jdt.feature.group" version="0.0.0"/>

Another option is to include single bundle IUs (the .target file format supports this but the target editor UI does not). In this case you need to make sure that transitive dependencies are also added. Try adding

<unit id="org.junit" version="0.0.0"/>
<unit id="org.hamcrest.core" version="0.0.0"/>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top