Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [buckminster-dev] Re: Tutorial for building an RCP from hudson

Johannes Utzig wrote:
Hi Oisin,


turns out that we're doing the exact same thing, just the order is differently. I also use an rmap that is capable of resolving everything through SCM, but in CI build the local resolution kicks in, whereas the developers can use the cquery + rmap to populate their workspace from SCM. As for target platforms, I also maintain them manually so far (install everything I want, and copy them to the build server). This is not perfect, just simply faster than any other way I found so far (and target platform changes only once or twice a year fo me).
So if there are better ways now, I'd also love to hear about them.

I'm working on getting a Buckminster build of Buckminster itself running using Hudson at Eclipse.org. You can look at the files here:

  http://build.eclipse.org/tools/buckminster/hudson/

I'm not finished yet but some things might be of interest, for instance, the tp.mspec (tp == target platform):
<?xml version="1.0" encoding="UTF-8"?>
<mspec
	xmlns="http://www.eclipse.org/buckminster/MetaData-1.0";
	name="Target Platform MSPEC"
	materializer="p2"
	installLocation="${targetPlatformPath}"
	url="tp.cquery">
    <property key="target.arch" value="*"/>
    <property key="target.os" value="*"/>
    <property key="target.ws" value="*"/>
</mspec>

vouches for a platform independent materialization into the target platform.

The tp.cquery:
<?xml version="1.0" encoding="UTF-8"?>
<cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0"; resourceMap="tp.rmap">
    <cq:rootRequest name="org.eclipse.platform" componentType="eclipse.feature"/>
    <cq:advisorNode namePattern=".*" useTargetPlatform="false" useWorkspace="false"/>
    <cq:property key="target.arch" value="*"/>
    <cq:property key="target.os" value="*"/>
    <cq:property key="target.ws" value="*"/>
</cq:componentQuery>

NOTE: The advisor node is important. It ensures that nothing is resolved against the current runtime.

The tp.rmap. This one will only find the Eclipse platform but that can be extended of course:
<?xml version="1.0" encoding="UTF-8"?>
<rmap xmlns="http://www.eclipse.org/buckminster/RMap-1.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xmlns:mp="http://www.eclipse.org/buckminster/MavenProvider-1.0";
	xmlns:pmp="http://www.eclipse.org/buckminster/PDEMapProvider-1.0";
	xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0";>

	<searchPath name="org.eclipse.platform">
		<provider readerType="eclipse.import" componentTypes="osgi.bundle,eclipse.feature" mutable="false" source="false">
			<uri format="http://download.eclipse.org/eclipse/updates/3.5?importType=binary"/>
		</provider>
	</searchPath>
	<locator searchPathRef="org.eclipse.platform"/>
</rmap>

The intersting target from the build.xml file:

<target name="build.tp" unless="tp.exists" depends="install.buckminster,init.workspace">
  <echo message="Importing binaries into target platform ${tp}"/>
    <buckminster command="import">
      <globargs>
         <jvmarg value="-DtargetPlatformPath=${tp}"/>
      </globargs>
      <cmdargs>
         <arg value="${basedir}/tp.mspec" />
      </cmdargs>
    </buckminster>
    <echo message="Setting target platform path to ${tp}"/>
    <buckminster command="setpref">
      <cmdargs>
        <arg value="targetPlatformPath=${tp}" />
      </cmdargs>
    </buckminster>
</target>

'buckminster' is a macro defined further up.

HTH,

- thomas


Back to the top