2011-10-20 46 views
4

我正在重构我的RCP应用程序,并且我将使用tycho作为构建系统。要包含哪些功能org.junit

在这个过程中,我不得不重写我的目标平台,以便依赖于在线存储库。目前,我的目标是一样的东西:

<?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> 

然而,这个目标并没有提供JUnit测试包(org.junit)......因此,我的日食有很多错误的(因缺少的junit)和我的构建失败。

有人知道我应该包括哪个单元吗? (或者,更好的,我怎么能获得所有可用在给定的资料库单位的名单?)

回答

6

您将需要JDT功能(可惜没有更小的特征我知道其中包含的JUnit)

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

另一个选择是包含单个捆绑的IU(.target文件格式支持这个,但目标编辑器UI不支持)。在这种情况下,您需要确保传递依赖关系也被添加。尝试加入

<unit id="org.junit" version="0.0.0"/> 
<unit id="org.hamcrest.core" version="0.0.0"/> 
+0

+1包括单个单位!我不希望整个JDT只是运行我的junit测试! – Matteo