Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Starting eclipse headless build by ant task
Starting eclipse headless build by ant task [message #302093] Wed, 12 April 2006 09:03 Go to next message
Eclipse UserFriend
Originally posted by: srmeier.access.unizh.ch

Hi all

I'm wondering if it is not possible to start an eclipse headless build
with the help of an ant script instead of a shell script, or more precise:

I always saw a shell script like the following to start up an ant
headless build.

java -cp $ECLIPSE_HOME/startup.jar org.eclipse.core.launcher.Main
-application org.eclipse.ant.core.antRunner -debug -verbose -buildfile
../build.xml -Dcomponent=./ -Dconfigs="*,*,*" -Dbaseos=win32
-Dbasews=win32 -Dbasearch=x86 -Djavacfailonerror=true
-Dpde.build.scripts=$ECLIPSE_HOME/plugins/org.eclipse.pde.bu ild_3.1.0/scripts/
-DbaseLocation=$ECLIPSE_HOME


I tried now to integrate this call into an ant target like the following:

<java classname="org.eclipse.core.launcher.Main" fork="true">
<classpath>
<pathelement path="${java.class.path}" />
<pathelement location="${eclipse_home}/startup.jar" />
</classpath>
<arg value="-application org.eclipse.ant.core.antRunner"/>
<arg value="-debug" />
<arg value="-verbose"/>
<arg value="-buildfile ./build.xml"/>
<arg value="-Dcomponent=./" />
<arg value='-Dconfigs="*,*,*"' />
<arg value="-Dbaseos=win32" />
<arg value="-Dbasews=win32"/>
<arg value="-Dbasearch=x86" />
<arg value="-Djavacfailonerror=true" />
<arg
value=" -Dpde.build.scripts=${eclipse_home}/plugins/org.eclipse.pde. build_3.1.0/scripts/ "/>
<arg value="-DbaseLocation=${eclipse_home}" />
<arg value="-Dbase=${eclipse_base}" />
</java>

Somehow this does not work. The workspace choose dialog is started up
and it is said that the workspace is already in use. It does definitely
not the same as when executed by the script.

Where is the problem? How do I call an eclipse headless build by an ant
target?

Thanx in advance
Silvio
Re: Starting eclipse headless build by ant task [message #302098 is a reply to message #302093] Wed, 12 April 2006 11:30 Go to previous message
Alexander Karnstedt is currently offline Alexander KarnstedtFriend
Messages: 68
Registered: July 2009
Member
I found the UDIG project very helpful for these kind of questions. It has a
couple of scripts to build their RCP product from a SVN repository.

http://svn.geotools.org/udig/trunk/scripts

Here is a excerpt from the UDIG's Ant script:

<target name="build" depends="update,clean">
<!-- fire up the pde build -->

<java classname="org.eclipse.core.launcher.Main" fork="true"
failonerror="true">
<classpath>
<fileset dir="${baseLocation}" includes="startup.jar"/>
</classpath>
<arg value="-application"/>
<arg value="org.eclipse.ant.core.antRunner"/>
<arg value="-buildfile"/>
<arg value="build.xml"/>
<arg value="-Dbuilder=."/>
</java>

<!-- check if build successful -->
<antcall target="check"/>
</target>

be seeing you,
Alex

"Silvio Meier" <srmeier@access.unizh.ch> schrieb im Newsbeitrag
news:e1ifo5$lop$1@utils.eclipse.org...
> Hi all
>
> I'm wondering if it is not possible to start an eclipse headless build
> with the help of an ant script instead of a shell script, or more precise:
>
> I always saw a shell script like the following to start up an ant
> headless build.
>
> java -cp $ECLIPSE_HOME/startup.jar org.eclipse.core.launcher.Main
> -application org.eclipse.ant.core.antRunner -debug -verbose -buildfile
> ./build.xml -Dcomponent=./ -Dconfigs="*,*,*" -Dbaseos=win32
> -Dbasews=win32 -Dbasearch=x86 -Djavacfailonerror=true
> -Dpde.build.scripts=$ECLIPSE_HOME/plugins/org.eclipse.pde.bu ild_3.1.0/scri
pts/
> -DbaseLocation=$ECLIPSE_HOME
>
>
> I tried now to integrate this call into an ant target like the following:
>
> <java classname="org.eclipse.core.launcher.Main" fork="true">
> <classpath>
> <pathelement path="${java.class.path}" />
> <pathelement location="${eclipse_home}/startup.jar" />
> </classpath>
> <arg value="-application org.eclipse.ant.core.antRunner"/>
> <arg value="-debug" />
> <arg value="-verbose"/>
> <arg value="-buildfile ./build.xml"/>
> <arg value="-Dcomponent=./" />
> <arg value='-Dconfigs="*,*,*"' />
> <arg value="-Dbaseos=win32" />
> <arg value="-Dbasews=win32"/>
> <arg value="-Dbasearch=x86" />
> <arg value="-Djavacfailonerror=true" />
> <arg
>
value=" -Dpde.build.scripts=${eclipse_home}/plugins/org.eclipse.pde. build_3.1
..0/scripts/"/>
> <arg value="-DbaseLocation=${eclipse_home}" />
> <arg value="-Dbase=${eclipse_base}" />
> </java>
>
> Somehow this does not work. The workspace choose dialog is started up
> and it is said that the workspace is already in use. It does definitely
> not the same as when executed by the script.
>
> Where is the problem? How do I call an eclipse headless build by an ant
> target?
>
> Thanx in advance
> Silvio
Previous Topic:how to order toolbaritems within one group
Next Topic:"code assist" doesnot work any more!
Goto Forum:
  


Current Time: Thu Nov 07 13:22:53 GMT 2024

Powered by FUDForum. Page generated in 0.03324 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top