Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Build RCP product/plugin with command line
Build RCP product/plugin with command line [message #482943] Fri, 28 August 2009 15:35 Go to next message
Opfermann C is currently offline Opfermann CFriend
Messages: 53
Registered: July 2009
Location: Annecy
Member
I'm using Eclipse 3.5 and I wanted to know if there is a solution to
automate build for product or plugin.
We can generate an Ant build.xml file which contains a usefull
'build.update.jar' target but it seems to be obsolete regarding the new
feature of a plugin exportation (source bundle for example).
So, generating a source bundle when exporting a plugin is not trivial
using the Ant configuration.

1) Is there any solution to get the same possibilities/options when
exporting through Ant as we have using the plugin exporter ?

2) Is there a way to create the same type of Ant file to create the final
RCP product ? (.exe, ...)


Thanks in advance,

Cédric
Re: Build RCP product/plugin with command line [message #482953 is a reply to message #482943] Fri, 28 August 2009 16:37 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

See http://www.eclipse.org/articles/Article-PDE-Automation/autom ation.html and http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng. basebuilder/readme.html?revision=HEAD

PW


Re: Build RCP product/plugin with command line [message #483003 is a reply to message #482943] Sat, 29 August 2009 05:18 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

This might also help:
http://www.vogella.de/articles/EclipsePDEBuild/article.html

Best regards, Lars

http://www.vogella.de/ - Eclipse plugin and Eclipse RCP Tutorials
http://www.twitter.com/vogella - vogella on Twitter

Opfermann Cédric wrote:
> I'm using Eclipse 3.5 and I wanted to know if there is a solution to
> automate build for product or plugin.
> We can generate an Ant build.xml file which contains a usefull
> 'build.update.jar' target but it seems to be obsolete regarding the new
> feature of a plugin exportation (source bundle for example).
> So, generating a source bundle when exporting a plugin is not trivial
> using the Ant configuration.
>
> 1) Is there any solution to get the same possibilities/options when
> exporting through Ant as we have using the plugin exporter ?
>
> 2) Is there a way to create the same type of Ant file to create the
> final RCP product ? (.exe, ...)
>
>
> Thanks in advance,
>
> Cédric
>




--
Re: Build RCP product/plugin with command line [message #483059 is a reply to message #482953] Sun, 30 August 2009 14:31 Go to previous messageGo to next message
Christian is currently offline ChristianFriend
Messages: 72
Registered: July 2009
Member
Paul Webster schrieb:
> See
> http://www.eclipse.org/articles/Article-PDE-Automation/autom ation.html
> and
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng. basebuilder/readme.html?revision=HEAD
>
>
> PW
>

Are these really up to date?
It seems these are from before p2 era. Creating update sites instead of
metadata repositories.

there are so many tutorials/articles on building. Some more , some less
up to date. Its hard to find the one that is currently applicable.

I tried for example this one:
http://www.vogella.de/articles/EclipsePDEBuild/article.html# productbuild
as it seemed up to date.. though I have not really been successful.

christian
Re: Build RCP product/plugin with command line [message #483079 is a reply to message #483059] Sun, 30 August 2009 23:17 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Hi Christian,

which problem did you experience with my tutorial?

Best regards, Lars

Christian wrote:
> Paul Webster schrieb:
>> See
>> http://www.eclipse.org/articles/Article-PDE-Automation/autom ation.html
>> and
>> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng. basebuilder/readme.html?revision=HEAD
>>
>>
>> PW
>>
>
> Are these really up to date?
> It seems these are from before p2 era. Creating update sites instead of
> metadata repositories.
>
> there are so many tutorials/articles on building. Some more , some less
> up to date. Its hard to find the one that is currently applicable.
>
> I tried for example this one:
> http://www.vogella.de/articles/EclipsePDEBuild/article.html# productbuild
> as it seemed up to date.. though I have not really been successful.
>
> christian
Re: Build RCP product/plugin with command line [message #483178 is a reply to message #483059] Mon, 31 August 2009 13:43 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Christian wrote on Sun, 30 August 2009 10:31

Are these really up to date?
It seems these are from before p2 era. Creating update sites instead of
metadata repositories.


You're right, they are older but the cover the basics. It starts to diverge in 2 places (in 3.5):

1) you can consume p2 repos as part of your build, and create p2 map files (orbit has examples of p2 map files) example properties:
# a list of archived p2 repos to compile against
repoBaseLocation=${untransformed.dir}
transformedRepoLocation=${untransformed.dir}-trans

2) you add properties to cause p2 repos to be generated. For example:
# go p2
p2.repo=${buildDirectory}/${buildLabel}/repository
#generate.p2.metadata=true
p2.metadata.repo=file:${p2.repo}
p2.artifact.repo=file:${p2.repo}
p2.flavor=tooling
#p2.publish.artifacts=true
p2.root.name=${topLevelElementId}
p2.root.version=0.9.0.v${buildId}
p2.repo.name=e4 build ${buildId}
# This won't quite do what you want
#p2.category.site=file:${buildDirectory}/features/${topLevel ElementId}/site.xml

You can then assemble products using p2 director calls. But you're right, some of the latest support only came on line with the 3.5 builder and so while there are blogs and some help documentation, complex examples are sparse (although e4 is a p2 consuming PDE build based product).

PW


Re: Build RCP product/plugin with command line [message #483270 is a reply to message #483079] Mon, 31 August 2009 19:35 Go to previous messageGo to next message
Christian is currently offline ChristianFriend
Messages: 72
Registered: July 2009
Member
Lars Vogel schrieb:
> Hi Christian,
>
> which problem did you experience with my tutorial?
>
> Best regards, Lars
>

If I remember correctly my build produced products/zipfiles without
executables in them.


Also it did not cover everything I needed. And when the time I tried it
I even had more misconceptions on p2 then I have right now. Also the
lots of tutorials may have blurred a bit together... so probably I did
some stuff wrong.. though I think it worked once or so and only after a
few tries it stopped working(producing zip files without executables)..
and I never found out what I did wrong.

Also what I am still missing is an automated build for a set of features
and a category.xml file.
Re: Build RCP product/plugin with command line [message #483275 is a reply to message #483270] Mon, 31 August 2009 20:31 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Hi Christian,

> If I remember correctly my build produced products/zipfiles without
> executables in them.

If you follow exactly my tutorial this should not happen. If you are
able to reproduce this please let me know, I'll try to fix it.

> Also what I am still missing is an automated build for a set of
> features and a category.xml file.

True that is not covered by my tutorial.

Best regards, Lars

--
http://www.vogella.de/ - Eclipse plugin and Eclipse RCP Tutorials
http://www.twitter.com/vogella - vogella on Twitter

Christian wrote:
> Lars Vogel schrieb:
>> Hi Christian,
>>
>> which problem did you experience with my tutorial?
>>
>> Best regards, Lars
>>
>
> If I remember correctly my build produced products/zipfiles without
> executables in them.
>
>
> Also it did not cover everything I needed. And when the time I tried it
> I even had more misconceptions on p2 then I have right now. Also the
> lots of tutorials may have blurred a bit together... so probably I did
> some stuff wrong.. though I think it worked once or so and only after a
> few tries it stopped working(producing zip files without executables)..
> and I never found out what I did wrong.
>
> Also what I am still missing is an automated build for a set of features
> and a category.xml file.
>
Re: Build RCP product/plugin with command line [message #484823 is a reply to message #483003] Wed, 09 September 2009 12:54 Go to previous message
Opfermann C is currently offline Opfermann CFriend
Messages: 53
Registered: July 2009
Location: Annecy
Member
Thanks for the link, it was very helpful.

I notice that we have to launch the Ant script with the same JRE as the
workspace, but I think that this will be an issue for us because the final
goal it to launch the Ant script from a Mavem script.
In this case, there won't be any variable (like eclipse_home) defined in
the execution context.

Do you know if it's possible to launch the script from maven and which
variable we have to define ?

Thanks,

Cédric
Previous Topic:Setting editor tab dirty in EMF generated Editor
Next Topic:How to get editor order
Goto Forum:
  


Current Time: Sat Apr 27 00:24:32 GMT 2024

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

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

Back to the top