Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Fetch pre-built/source plugins using map file
Fetch pre-built/source plugins using map file [message #1005504] Fri, 25 January 2013 17:53 Go to next message
Stewart Francis is currently offline Stewart FrancisFriend
Messages: 3
Registered: January 2013
Junior Member
Hi, I'm working on an eclipse plugin/RCP project which has a PDE Build based headless build.

Some of our plugins are generated from non-java source (notably documentation) which runs as a distinct build. The product of this build step is uploaded to a webserver, were we pull it down as part of the main build.

I'd like to convert our build to using the built-in PDE Build fetch mechanism to retrieve the files when we build the containing feature. I've added an ant GET style entry to a map file, which is copied to the ${buildDirectory}/maps by customising the fetchMaps stage of the feature build.

However, the stage of the build where the fetch script is generated fails due to not finding an entry in the map file for the feature. I've had a look at FetchScriptGenerator, which seems to confirm this behaviour, although none of the documentation I've found online seems to indicate that it's only possible to fetch plugins when you're already fetching a feature.

Am I correct in my deduction that what I'm trying to achieve isn't possible, or do I have some misunderstanding as to how the fetch mechanism in PDE Build works? I'd also like to use this in other areas of our product build to fetch feature dependencies from a p2 update site, though I can't see how I can work around having to fetch the feature I want to build. It seems confusing that this should be the case, given that the examples I've found of map files specify plugins predominantly.

Thanks in advance,

Stew Francis
Re: Fetch pre-built/source plugins using map file [message #1005778 is a reply to message #1005504] Mon, 28 January 2013 17:09 Go to previous messageGo to next message
Martin Skorsky is currently offline Martin SkorskyFriend
Messages: 112
Registered: July 2009
Senior Member
Use a line similar to with unpack=false
plugin@my bundle id,my version=GET,http://my jar.jar, unpack=false

(replace 'my bundle id', 'my version', 'my jar')

Alternative with prebuilt=true:
bundle@my bundle id=CVS,tag=my branch,cvsRoot=my root,path=my path,prebuilt=true
(replace 'my bundle id', 'my branch', 'my root', 'my path')

Re: Fetch pre-built/source plugins using map file [message #1005802 is a reply to message #1005504] Mon, 28 January 2013 19:28 Go to previous messageGo to next message
Stewart Francis is currently offline Stewart FrancisFriend
Messages: 3
Registered: January 2013
Junior Member
Thanks for the response. I don't see how this would change the behaviour of the FetchScriptGenerator. Isn't that just a parameter of whatever IFetchFactory is being used to retrieve the files?

As far as I can tell, the FetchScriptGenerator won't even generate a fetch script properly unless I'm fetching the feature too.

I changed the my map file to unpack=false (the rest could be left) but my build still fails for the reasons I outline above:

[eclipse.fetch] feature@my.feature has not be fetched.

[java] java.io.FileNotFoundException: /home/me/workspaces/mystuff/mystuff.build/build/fetch_my.feature.xml (No such file or directory)
[java] at java.io.FileInputStream.open(Native Method)
[java] at java.io.FileInputStream.<init>(FileInputStream.java:126)
[java] at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:278)
[java] at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:178)
[java] at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
[java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:393)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[java] at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)

PDE Build attempts to generate a section in the fetch script for the feature but fails as it can't find an entry in the map file (or directory, I only have one map file) for the feature. There's no entry for the feature as I already have the source for the feature. As a result of that failure, no fetch script is generated, the the build fails attempting to execute a fetch script that never got generated.

I only want to fetch one plugin, as I have the source for everything else in my build directory already. I can either consume this as a binary or as source, though I'd prefer source as it makes things neater. I can't see how changing that will fundamentally change how the fetch script generation works though, and indeed it doesn't seem to in my case.

Further insight would be appreciated!
Re: Fetch pre-built/source plugins using map file [message #1005901 is a reply to message #1005802] Tue, 29 January 2013 09:13 Go to previous messageGo to next message
Martin Skorsky is currently offline Martin SkorskyFriend
Messages: 112
Registered: July 2009
Senior Member
With your setup, you are building a feature with one or more plug-ins.
This is triggered by topLevelElementType = feature in the build.properties file of the build (not the plug-in).

If you have the source for everything in your build directory, you don't need a fetch step at all.
Re: Fetch pre-built/source plugins using map file [message #1005977 is a reply to message #1005901] Tue, 29 January 2013 13:07 Go to previous message
Stewart Francis is currently offline Stewart FrancisFriend
Messages: 3
Registered: January 2013
Junior Member
Yeah, I'm building a feature with multiple plugins. I have the source for all of the plugins, except one, which I need to fetch from a remote site. I can set this up so it can be either a binary, or source, but the source is produced independently of the rest of our source code, i.e. it is not stored as source in the same repository.
Previous Topic:Eclipse Plugins - Rename Tab
Next Topic:Eclipse Product Export Wizard Error
Goto Forum:
  


Current Time: Fri Apr 19 19:51:14 GMT 2024

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

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

Back to the top