Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » [solved] RCP Build fails
[solved] RCP Build fails [message #723771] Fri, 09 September 2011 08:35 Go to next message
Christian Pontesegger is currently offline Christian Pontesegger
Messages: 60
Registered: July 2009
Location: Graz, Austria
Member
Hi,

I am trying to build an RCP with buckminster following Ralf Eberts Blog.

I am able to build a p2 update site, but when trying to build an RCP product I end up with an error:

org.eclipse.core.runtime.CoreException: C:\UserData\Workspaces\Eclipse_3.7_Workspace\Tag Studio RCP Full Featured\build\product.ant:22: Java returned: 13

I am running the create.product action from the custom cspex file.

First thing to do for me would be to access some logs to get detailed error information. Does anybody know where buckminster stores its logs to?

product.ant:
<project>
     <pathconvert property="equinox.launcher.jar">
       <first count="1">
         <sort>
           <fileset dir="${eclipse.home}/plugins" includes="**/org.eclipse.equinox.launcher_*.jar"/>
           <reverse xmlns="antlib:org.apache.tools.ant.types.resources.comparators">
             <date/>
           </reverse>
         </sort>
       </first>
     </pathconvert>

    <target name="create.product">
        <property name="destination" location="${sp:destination}"/>
        <delete dir="${destination}"/>
        <makeurl property="repository" file="${sp:repository}"/>
        <mkdir dir="${destination}"/>
        <echoproperties/>
        <echo message="${equinox.launcher.jar}"/>
        <echo message="${repository}"/>
        <echo message="${destination}"/>
        <java jar="${equinox.launcher.jar}" fork="true" failonerror="true" >
            <arg value="-application"/>
            <arg value="org.eclipse.equinox.p2.director"/>
            <arg value="-repository"/>
            <arg value="${repository}"/>
            <arg value="-destination"/>
            <arg value="${destination}"/>
            <arg value="-profile"/>
            <arg value="${profile}"/>
            <arg value="-profileProperties" />
            <arg value="org.eclipse.update.install.features=true" />
            <arg value="-installIU"/>
            <arg value="${iu}"/>
            <arg value="-p2.os" />
            <arg value="${target.os}" />
            <arg value="-p2.ws" />
            <arg value="${target.ws}" />
            <arg value="-p2.arch" />
            <arg value="${target.arch}" />
            <arg value="-consoleLog"/>
            <!-- jvmarg value="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y"/ -->
        </java>
    </target>
</project>


buckminster.properties:
# Where all the output should go
buckminster.output.root=C:/UserData/Build/Tag Studio Full

# Where the temp files should go
buckminster.temp.root=C:/UserData/temp/Buckminster

# How .qualifier in versions should be replaced
qualifier.replacement.*=generator:lastRevision

target.os=win32
target.ws=win32
target.arch=x86

[Updated on: Wed, 14 September 2011 08:26]

Report message to a moderator

Re: RCP Build fails [message #723990 is a reply to message #723771] Sat, 10 September 2011 03:41 Go to previous messageGo to next message
Thorsten Meinl is currently offline Thorsten Meinl
Messages: 85
Registered: July 2009
Member
> First thing to do for me would be to access some logs to get detailed
> error information. Does anybody know where buckminster stores its logs to?
Since you are calling an Eclipse application I assume the log file is
either in the configuration-directory of the Eclipse/Buckminster
installation or somewhere in the user's home directory under .eclipse.
Try searching for a ".log" file, usually something like 123456789.log

Thorsten
Re: RCP Build fails [message #725099 is a reply to message #723771] Tue, 13 September 2011 19:48 Go to previous messageGo to next message
Philip Bedingfield is currently offline Philip Bedingfield
Messages: 42
Registered: August 2011
Member
I had this issue, it turned out to be I didn't have the installable unit (the product) in the site p2. Check your p2 has the product, if not then you've probably got the dependencies wrong.
Re: RCP Build fails [message #725281 is a reply to message #725099] Wed, 14 September 2011 08:24 Go to previous messageGo to next message
Christian Pontesegger is currently offline Christian Pontesegger
Messages: 60
Registered: July 2009
Location: Graz, Austria
Member
Philip Bedingfield wrote on Tue, 13 September 2011 19:48
I had this issue, it turned out to be I didn't have the installable unit (the product) in the site p2.


Thanks for the hint. I gave it a try with the standalone director application and it turned out to be a missing dependency.
Re: RCP Build fails [message #867640 is a reply to message #725281] Tue, 01 May 2012 07:58 Go to previous message
Tobias Bertelsen is currently offline Tobias Bertelsen
Messages: 22
Registered: October 2011
Junior Member
Got the same error, but found the fix to be in the antscript that builds the product.
When I used the script that Ralf refers directly to in the tutorial the build works fine, but if you use the script in his example project on github (referred to at the end of the tutorial) I get
org.eclipse.core.runtime.CoreException: D:\Projects\Buckminster_2\com.example.mail.site\build\product.ant:22: Java returned: 13


I suspect it might have to do with the fact, that I'm on newer versions of everything (Buckminster Plugin 1.4.0, Eclipse 3.7.2 and Java 1.7) and eg. the commands have changed. Don't know if there's a brighter head out there, that can see or knows why.


Working
<project>
	 <pathconvert property="equinox.launcher.jar">
	   <first count="1">
	     <sort>
	       <fileset dir="${eclipse.home}/plugins" includes="**/org.eclipse.equinox.launcher_*.jar"/>
	       <reverse xmlns="antlib:org.apache.tools.ant.types.resources.comparators">
	         <date/>
	       </reverse>
	     </sort>
	   </first>
	 </pathconvert>

	<target name="create.product">
		<property name="destination" location="${sp:destination}"/>
		<delete dir="${destination}"/>
		<makeurl property="repository" file="${sp:repository}"/>
		<mkdir dir="${destination}"/>
		<echoproperties/>
		<echo message="${equinox.launcher.jar}"/>
		<echo message="${repository}"/>
		<echo message="${destination}"/>
		<java jar="${equinox.launcher.jar}" fork="true" failonerror="true" >
			<arg value="-application"/>
			<arg value="org.eclipse.equinox.p2.director"/>
			<arg value="-repository"/>
			<arg value="${repository}"/>
			<arg value="-destination"/>
			<arg value="${destination}"/>
			<arg value="-profile"/>
			<arg value="${profile}"/>
			<arg value="-profileProperties" />
			<arg value="org.eclipse.update.install.features=true" />
			<arg value="-installIU"/>
			<arg value="${iu}"/>
			<arg value="-p2.os" />
			<arg value="${target.os}" />
			<arg value="-p2.ws" />
			<arg value="${target.ws}" />
			<arg value="-p2.arch" />
			<arg value="${target.arch}" />
			<arg value="-consoleLog"/>
			<!-- jvmarg value="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y"/ -->
		</java>
	</target>
</project>


Not Working
<project>
	 <pathconvert property="equinox.launcher.jar">
	   <first count="1">
	     <sort>
	       <fileset dir="${eclipse.home}/plugins" includes="**/org.eclipse.equinox.launcher_*.jar"/>
	       <reverse xmlns="antlib:org.apache.tools.ant.types.resources.comparators">
	         <date/>
	       </reverse>
	     </sort>
	   </first>
	 </pathconvert>

	<target name="create.product">
		<property name="destination" location="${sp:destination}"/>
		<delete dir="${destination}"></delete>
		<makeurl property="repository" file="${sp:repository}"/>
		<mkdir dir="${destination}"/>
		<echoproperties ></echoproperties>
		<echo message="${equinox.launcher.jar}"/>
		<echo message="${repository}"/>
		<echo message="${destination}"/>
		<java jar="${equinox.launcher.jar}" fork="true" failonerror="true" >
			<arg value="-application"/>
			<arg value="org.eclipse.equinox.p2.director"/>
			<arg value="-artifactRepository"/>
			<arg value="file:${repository}"/>
			<arg value="-metadataRepository"/>
			<arg value="file:${repository}"/>
			<arg value="-destination"/>
			<arg value="${destination}"/>
			<arg value="-bundlepool"/>
			<arg value="${destination}"/>
			<arg value="-profile"/>
			<arg value="${profile}"/>
			<arg value="-profileProperties" />
			<arg value="org.eclipse.update.install.features=true" />
			<arg value="-installIU"/>
			<arg value="${iu}"/>
			<arg value="-p2.os" />
			<arg value="${target.os}" />
			<arg value="-p2.ws" />
			<arg value="${target.ws}" />
			<arg value="-p2.arch" />
			<arg value="${target.arch}" />
			<arg value="-consoleLog"/>
			<jvmarg value="-Declipse.p2.data.area=${destination}/p2"/>
			<jvmarg value="-Declipse.p2.profile=${profile}"/>
		</java>
	</target>
</project>
Previous Topic:Problem migrating from Buckminster 3.6 to 3.7
Next Topic:Using custom builders
Goto Forum:
  


Current Time: Fri Aug 22 01:59:12 EDT 2014

Powered by FUDForum. Page generated in 0.02129 seconds