我正在尝试使用 Oomph 设置 Eclipse 开发环境,并从给定的根文件夹从磁盘导入一些(源)项目。为此,我想使用一个变量来标记此根文件夹的位置(提示用户),并从那里让 Oomph 发现该文件夹中所需的项目。由于我没有找到任何有关此的文档,因此我尝试了以下方法:
<?xml version="1.0" encoding="UTF-8"?>
<setup:Product
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:projects="http://www.eclipse.org/oomph/setup/projects/1.0"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
xmlns:setup.p2="http://www.eclipse.org/oomph/setup/p2/1.0"
xsi:schemaLocation="http://www.eclipse.org/oomph/setup/projects/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Projects.ecore"
name="my.product"
label="My Product">
<setupTask
xsi:type="setup:InstallationTask"
id="installation"/>
<version name="neon"
label="Neon"
requiredJavaVersion="1.7">
<setupTask
xsi:type="setup.p2:P2Task"
label="foo">
<!-- Requirements and repositories for the dev env to work -->
<!-- Here is a project that I'd like to import -->
<requirement name="com.mycompany.myproject"/>
</setupTask>
<!-- This task should locate the project to import -->
<setupTask
xsi:type="projects:ProjectsImportTask">
<sourceLocator
rootFolder="${my.sourceroot}/eclipse-plugins/"
locateNestedProjects="true"/>
</setupTask>
<!-- The variable to mark the root folder -->
<setupTask
xsi:type="setup:VariableTask"
id="my.sourceroot"
type="FOLDER"
name="root folder"
label="root folder">
</setupTask>
<description>My Product for Neon.</description>
</version>
<description>My Product provides cool stuff.</description>
</setup:Product>
尝试使用 Oomph 应用程序设置 IDE 时,它不要求提供根文件夹,并且显然找不到我要导入的项目时出错。
问题:这样做的正确方法是什么?任何文档或教程(对于傻瓜)也将不胜感激。