Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Rebuilding target platform without closing Eclipse
Rebuilding target platform without closing Eclipse [message #61181] Tue, 12 May 2009 22:56 Go to next message
Will Horn is currently offline Will HornFriend
Messages: 265
Registered: July 2009
Senior Member
In my RCP project, the target platform is maintained by a script (actually a
maven goal). If the configuration changes (adding or removing plugins), the
developer needs to re-run the script to update the target platform.
Currently this requires closing Eclipse, running the script, and starting
Eclipse again.

Since the script is easily run in Eclipse, this an annoying step.
Essentially, I need to tell Eclipse/PDE to release the target directory and
suspend compilation while the target is rebuilt.

By the way, I've tried (as a workaround) to switch to the default target
temporarily, but this fails as jars in the old target are still locked.
This is also messy anyways, because switching to the default target
initiates a full rebuild which will have tons of errors.
Re: Rebuilding target platform without closing Eclipse [message #61279 is a reply to message #61181] Wed, 13 May 2009 03:58 Go to previous messageGo to next message
Bruce Kelly is currently offline Bruce KellyFriend
Messages: 63
Registered: July 2009
Member
Our target platform is also built outside of Eclipse, and we have always
simply replaced the jars in the target platform directory, with Eclipse
running, and then told Eclipse to reload the target.

We are using Windows XP and have never had a problem with this approach.
Our target is an Equinox application, not RCP, maybe that is a difference.

Namaste, Bruce
Re: Rebuilding target platform without closing Eclipse [message #61326 is a reply to message #61181] Wed, 13 May 2009 04:14 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Will Horn wrote:
> In my RCP project, the target platform is maintained by a script
> (actually a maven goal). If the configuration changes (adding or
> removing plugins), the developer needs to re-run the script to update
> the target platform. Currently this requires closing Eclipse, running
> the script, and starting Eclipse again.

:(

>
> Since the script is easily run in Eclipse, this an annoying step.
> Essentially, I need to tell Eclipse/PDE to release the target directory
> and suspend compilation while the target is rebuilt.
>
> By the way, I've tried (as a workaround) to switch to the default target
> temporarily, but this fails as jars in the old target are still locked.
> This is also messy anyways, because switching to the default target
> initiates a full rebuild which will have tons of errors.

Is there a reason you don't use PDE's target definition format to help
alleviate the pain here?

http://eclipsesource.com/blogs/2009/04/29/target-platform-pr ovisioning/

In 3.4 and earlier versions, some people would keep a 'target project'
in their SCM and a target definition pointing to those sets of bundles.
This worked pretty well and was shareable with teammates, they just
needed to ensure that the target was checked out, up to date. And when
things changed, they needed to reset the target. As of 3.5, you can use
target definitions to point to a p2 repo and get your deps that way.
That's the direction we'll be pointing people to in the future.

Does that help?

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Rebuilding target platform without closing Eclipse [message #61515 is a reply to message #61279] Wed, 13 May 2009 16:46 Go to previous messageGo to next message
Will Horn is currently offline Will HornFriend
Messages: 265
Registered: July 2009
Senior Member
"Bruce Kelly" <Bruce.Kelly@andrew.com> wrote in message
news:gudghq$d3f$1@build.eclipse.org...
> Our target platform is also built outside of Eclipse, and we have always
> simply replaced the jars in the target platform directory, with Eclipse
> running, and then told Eclipse to reload the target.
What if a jar is removed? I guess this does not happen very often, but our
script's approach is to delete the directory and rebuild it from scratch.
The delete is the part that has problems since the target jars are locked.
Re: Rebuilding target platform without closing Eclipse [message #61529 is a reply to message #61326] Wed, 13 May 2009 17:22 Go to previous messageGo to next message
Will Horn is currently offline Will HornFriend
Messages: 265
Registered: July 2009
Senior Member
Hi Chris,

I have read your blog post and the new PDE target features look good. There
are a few challenges I face:

* The application depends on in-house jars that themselves bring in about 80
maven artifacts, many of which are not OSGi bundles. Using maven and bnd, I
can dynamically build a target platform that provides these bundles.
* I need to create the target platform for headless build also. I am
tracking http://bugs.eclipse.org/266311 about this.

I've used the SCM approach before. With that you have a target platform,
but not a target "definition" - i.e. it's hard to keep track of what is
actually in the target. It's also a pain when you upgrade versions, because
you have to delete abc-1.0.jar and add abc-2.0.jar.

It is interesting though, that the SCM method doesn't run into the same
problems I have with jars being locked. Maybe there something in
Eclipse/PDE that will release a jar if you are doing a team update on that
file? Another interesting data point that I just noticed is the locked jars
seem to consistently be source jars. Any ideas how to release those?

Thanks,
Will

"Chris Aniszczyk" <zx@eclipsesource.com> wrote in message
news:gudhfg$404$1@build.eclipse.org...
> Will Horn wrote:
>> In my RCP project, the target platform is maintained by a script
>> (actually a maven goal). If the configuration changes (adding or
>> removing plugins), the developer needs to re-run the script to update the
>> target platform. Currently this requires closing Eclipse, running the
>> script, and starting Eclipse again.
>
> :(
>
>>
>> Since the script is easily run in Eclipse, this an annoying step.
>> Essentially, I need to tell Eclipse/PDE to release the target directory
>> and suspend compilation while the target is rebuilt.
>>
>> By the way, I've tried (as a workaround) to switch to the default target
>> temporarily, but this fails as jars in the old target are still locked.
>> This is also messy anyways, because switching to the default target
>> initiates a full rebuild which will have tons of errors.
>
> Is there a reason you don't use PDE's target definition format to help
> alleviate the pain here?
>
> http://eclipsesource.com/blogs/2009/04/29/target-platform-pr ovisioning/
>
> In 3.4 and earlier versions, some people would keep a 'target project' in
> their SCM and a target definition pointing to those sets of bundles. This
> worked pretty well and was shareable with teammates, they just needed to
> ensure that the target was checked out, up to date. And when things
> changed, they needed to reset the target. As of 3.5, you can use target
> definitions to point to a p2 repo and get your deps that way. That's the
> direction we'll be pointing people to in the future.
>
> Does that help?
>
> Cheers,
>
> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
> http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Rebuilding target platform without closing Eclipse [message #61621 is a reply to message #61515] Wed, 13 May 2009 21:22 Go to previous message
Bruce Kelly is currently offline Bruce KellyFriend
Messages: 63
Registered: July 2009
Member
> What if a jar is removed? I guess this does not happen very often, but
> our script's approach is to delete the directory and rebuild it from
> scratch. The delete is the part that has problems since the target jars
> are locked.
With our product we don't have a need to explicitly delete a jar. We are
only ever adding a new jar or replacing an existing jar. Our source is still
packaged the old way, i.e. not using a separate bundle that contributes to
the org.eclipse.pde.core.source extension point. Perhaps we might have a
problem when switching to using source bundles.

Namaste, Bruce
Re: Rebuilding target platform without closing Eclipse [message #597332 is a reply to message #61181] Wed, 13 May 2009 03:58 Go to previous message
Bruce Kelly is currently offline Bruce KellyFriend
Messages: 63
Registered: July 2009
Member
Our target platform is also built outside of Eclipse, and we have always
simply replaced the jars in the target platform directory, with Eclipse
running, and then told Eclipse to reload the target.

We are using Windows XP and have never had a problem with this approach.
Our target is an Equinox application, not RCP, maybe that is a difference.

Namaste, Bruce
Re: Rebuilding target platform without closing Eclipse [message #597348 is a reply to message #61181] Wed, 13 May 2009 04:14 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Will Horn wrote:
> In my RCP project, the target platform is maintained by a script
> (actually a maven goal). If the configuration changes (adding or
> removing plugins), the developer needs to re-run the script to update
> the target platform. Currently this requires closing Eclipse, running
> the script, and starting Eclipse again.

:(

>
> Since the script is easily run in Eclipse, this an annoying step.
> Essentially, I need to tell Eclipse/PDE to release the target directory
> and suspend compilation while the target is rebuilt.
>
> By the way, I've tried (as a workaround) to switch to the default target
> temporarily, but this fails as jars in the old target are still locked.
> This is also messy anyways, because switching to the default target
> initiates a full rebuild which will have tons of errors.

Is there a reason you don't use PDE's target definition format to help
alleviate the pain here?

http://eclipsesource.com/blogs/2009/04/29/target-platform-pr ovisioning/

In 3.4 and earlier versions, some people would keep a 'target project'
in their SCM and a target definition pointing to those sets of bundles.
This worked pretty well and was shareable with teammates, they just
needed to ensure that the target was checked out, up to date. And when
things changed, they needed to reset the target. As of 3.5, you can use
target definitions to point to a p2 repo and get your deps that way.
That's the direction we'll be pointing people to in the future.

Does that help?

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Rebuilding target platform without closing Eclipse [message #597402 is a reply to message #61279] Wed, 13 May 2009 16:46 Go to previous message
Will Horn is currently offline Will HornFriend
Messages: 265
Registered: July 2009
Senior Member
"Bruce Kelly" <Bruce.Kelly@andrew.com> wrote in message
news:gudghq$d3f$1@build.eclipse.org...
> Our target platform is also built outside of Eclipse, and we have always
> simply replaced the jars in the target platform directory, with Eclipse
> running, and then told Eclipse to reload the target.
What if a jar is removed? I guess this does not happen very often, but our
script's approach is to delete the directory and rebuild it from scratch.
The delete is the part that has problems since the target jars are locked.
Re: Rebuilding target platform without closing Eclipse [message #597407 is a reply to message #61326] Wed, 13 May 2009 17:22 Go to previous message
Will Horn is currently offline Will HornFriend
Messages: 265
Registered: July 2009
Senior Member
Hi Chris,

I have read your blog post and the new PDE target features look good. There
are a few challenges I face:

* The application depends on in-house jars that themselves bring in about 80
maven artifacts, many of which are not OSGi bundles. Using maven and bnd, I
can dynamically build a target platform that provides these bundles.
* I need to create the target platform for headless build also. I am
tracking http://bugs.eclipse.org/266311 about this.

I've used the SCM approach before. With that you have a target platform,
but not a target "definition" - i.e. it's hard to keep track of what is
actually in the target. It's also a pain when you upgrade versions, because
you have to delete abc-1.0.jar and add abc-2.0.jar.

It is interesting though, that the SCM method doesn't run into the same
problems I have with jars being locked. Maybe there something in
Eclipse/PDE that will release a jar if you are doing a team update on that
file? Another interesting data point that I just noticed is the locked jars
seem to consistently be source jars. Any ideas how to release those?

Thanks,
Will

"Chris Aniszczyk" <zx@eclipsesource.com> wrote in message
news:gudhfg$404$1@build.eclipse.org...
> Will Horn wrote:
>> In my RCP project, the target platform is maintained by a script
>> (actually a maven goal). If the configuration changes (adding or
>> removing plugins), the developer needs to re-run the script to update the
>> target platform. Currently this requires closing Eclipse, running the
>> script, and starting Eclipse again.
>
> :(
>
>>
>> Since the script is easily run in Eclipse, this an annoying step.
>> Essentially, I need to tell Eclipse/PDE to release the target directory
>> and suspend compilation while the target is rebuilt.
>>
>> By the way, I've tried (as a workaround) to switch to the default target
>> temporarily, but this fails as jars in the old target are still locked.
>> This is also messy anyways, because switching to the default target
>> initiates a full rebuild which will have tons of errors.
>
> Is there a reason you don't use PDE's target definition format to help
> alleviate the pain here?
>
> http://eclipsesource.com/blogs/2009/04/29/target-platform-pr ovisioning/
>
> In 3.4 and earlier versions, some people would keep a 'target project' in
> their SCM and a target definition pointing to those sets of bundles. This
> worked pretty well and was shareable with teammates, they just needed to
> ensure that the target was checked out, up to date. And when things
> changed, they needed to reset the target. As of 3.5, you can use target
> definitions to point to a p2 repo and get your deps that way. That's the
> direction we'll be pointing people to in the future.
>
> Does that help?
>
> Cheers,
>
> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
> http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Rebuilding target platform without closing Eclipse [message #597429 is a reply to message #61515] Wed, 13 May 2009 21:22 Go to previous message
Bruce Kelly is currently offline Bruce KellyFriend
Messages: 63
Registered: July 2009
Member
> What if a jar is removed? I guess this does not happen very often, but
> our script's approach is to delete the directory and rebuild it from
> scratch. The delete is the part that has problems since the target jars
> are locked.
With our product we don't have a need to explicitly delete a jar. We are
only ever adding a new jar or replacing an existing jar. Our source is still
packaged the old way, i.e. not using a separate bundle that contributes to
the org.eclipse.pde.core.source extension point. Perhaps we might have a
problem when switching to using source bundles.

Namaste, Bruce
Previous Topic:Running JUnit plugin tests for workspace-external projects
Next Topic:eclipse.fetch warns about "Missing directory entry"
Goto Forum:
  


Current Time: Tue Apr 23 12:28:50 GMT 2024

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

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

Back to the top