Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » eclipse.buildScript headless build
eclipse.buildScript headless build [message #290378] Wed, 24 August 2005 17:22 Go to next message
Daniel Miles is currently offline Daniel MilesFriend
Messages: 11
Registered: July 2009
Junior Member
I'm trying to automate the building of a plug-in and I've found some
documentation but I just can't seem to make it work.

I have two questions:
1) Do you *have* to use CVS when you use this?
2) How can I convince the eclipse.buildScript task to find the stuff I
just checked out of CVS?

I have a build.xml file that looks like this (for the toy case):
<project name="sample_build" default="run">
<target name="run">
<eclipse.fetch elements="plugin@org.eclipse.pde.build"
buildDirectory="buildDirectory"
directory="mapfile.txt"/>
<mkdir dir="buildDirectory/plugins"/>
<ant antfile="fetch_org.eclipse.pde.build.xml" dir="buildDirectory">
<property name="featureOnly" value="true"/>
<property name="buildDirectory" value="."/>
</ant>
<eclipse.buildScript elements="plugin@org.eclipse.pde.build"
buildDirectory="buildDirectory"/>
</target>
</project>

the mapfile.txt looks like this:
plugin@org.eclipse.pde.build=v20040622,:pserver:anonymous@dev.eclipse.org:/home
/eclipse

I'm running the command:
java -jar /home/dmiles/tmp/org.eclipse.releng.basebuilder/startup.jar
-application org.eclipse.ant.core.antRunner -buildfile build.xml

and it checks out the repo then throws a CoreException on the
eclipse.buildScript task citing:
Unable to find element: org.eclipse.pde.build.
Re: eclipse.buildScript headless build [message #290383 is a reply to message #290378] Wed, 24 August 2005 18:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: greg.akins.am.sony.com

1. the eclipse.fetch script relies on CVS. running the entire build from
scratch builds the directory structure... This will not work unless the
maps are setup and the code is fetched from cvs.

however, you can duplicate the structure on your own. We use Subversion.
So I'm duplicating the fetch task with my own ant code to get from svn.
Probably not as dynamic as eclipse.fetch; but it will work.

2. My directory strcture looks like

${buildDirectory}
+ features
directory.txt (concat of the feature mappings)
+ plugins

The eclipse build scripts are found using the pde.build.scripts property.
See the antRunner command that I use below.

Hopefully this all helps.

$ java -cp $ECLIPSE_HOME/startup.jar org.eclipse.core.launcher.Main
-applicatio
n org.eclipse.ant.core.antRunner -buildfile build.xml
-Dcomponent=com.sony.sel.
cim.atlas.workbench.feature -Dconfigs="*,*,*" -Dbaseos=win32
-Dbasews=win32 -Db
asearch=x86 -javacfailonerror=true
-Dpde.build.scripts=$ECLIPSE_HOME/plugins/or
g.eclipse.pde.build_3.1.0/scripts -DbaseLocation=$ECLIPSE_HOME
Re: eclipse.buildScript headless build [message #290389 is a reply to message #290383] Wed, 24 August 2005 19:10 Go to previous messageGo to next message
Daniel Miles is currently offline Daniel MilesFriend
Messages: 11
Registered: July 2009
Junior Member
On Wed, 24 Aug 2005 18:35:41 +0000, Greg Akins wrote:
Thanks, it sounds like you've solved the problem I'm fighting with now.
But there are a couple of things in your explanation that I don't
understand.

I'm using SVN too and I've actually written code and added it to
org.eclipse.pde.build to create an eclipse.svnFetch task that checks code
out from the repository... That part seems to work in that it grabs the
code, but then I use an eclipse.buildScript task and it can't find
whatever plugin I've just downloaded...

I assume I'm creating the directory structure badly... Here's what it
creates:
$name-of-build-directory
plugins
$name-of-the-checked-out-plugin
{plugin-source-files}
features
{empty}
Then I have:
<eclipse.buildScript elements="plugin@${package}"
buildingOSGi="true"
buildDirectory="${buildDirectory}"/>
where package is set to $name-of-the-checked-out-plugin and
where buildDirectory is set to $name-of-build-directory.

Can you see any problems with the way I've created my directory
structure? Do I also need a directory.txt as you described? If so, where
should I put it and what should it contain?
Re: eclipse.buildScript headless build [message #290391 is a reply to message #290389] Wed, 24 August 2005 19:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: greg.akins.am.sony.com

The dir structure looks OK to me...

But did you try setting this property when you call antrunner? Or in your
properties settings?

-Dpde.build.scripts=$ECLIPSE_HOME/plugins/org.eclipse.pde.bu ild_3.1.0/scripts
Re: eclipse.buildScript headless build [message #290392 is a reply to message #290391] Wed, 24 August 2005 20:16 Go to previous messageGo to next message
Daniel Miles is currently offline Daniel MilesFriend
Messages: 11
Registered: July 2009
Junior Member
I just tried that, same result.

Anybody know what might be wrong?
Re: eclipse.buildScript headless build [message #290393 is a reply to message #290389] Wed, 24 August 2005 20:19 Go to previous message
Eclipse UserFriend
Originally posted by: greg.akins.am.sony.com

sorry if I missed part of your answer.

Directory is only needed for the concatenation of the features.map(s) and
will be created during eclipse.fetch. It should be in the root of the
build directory

Since I am skipping eclipse.fetch, I don't use it.
Previous Topic:need something like PropertySheetPage that also allow add/remove of pairs
Next Topic:How does one surface the IPropertySource for an IContentsOutlinePage
Goto Forum:
  


Current Time: Sun Sep 22 21:59:22 GMT 2024

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

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

Back to the top