Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 127726 - Can't generate source plugin if target already contains it
Summary: Can't generate source plugin if target already contains it
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 3.2 M6   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-14 10:40 EST by Karice McIntyre CLA
Modified: 2006-05-18 14:56 EDT (History)
3 users (show)

See Also:


Attachments
patch (7.68 KB, patch)
2006-03-02 16:20 EST, Andrew Niefer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karice McIntyre CLA 2006-02-14 10:40:35 EST
This worked in the I20060208-0848 build but not in I20060213-0800 or I20060214-0800.

I have a feature project that I am using to create a source feature for a plugin.  When I select feature.xml and do PDE Tools > Create Ant Build File the artifacts I expect to be created are not created.  I expected a /features directory and a /plugins directory (each with a pluginName.source directory and some artifacts underneath) to be created in the feature project and they were not created.

I would prefer not to attach the zip containing the plugin and feature projects as they are not currently part of the Eclipse public domain.  Sonia or I can provide the plugin and feature I was using to try to create these artifacts.
Comment 1 Andrew Niefer CLA 2006-02-16 17:13:44 EST
generate.plugin will only cause the generation of the source plugin if one does not already exist in the target.  

Because your target already contains a version of your plugin and its source, we find that source plugin and use it instead of generating a new one.

If we did decide to generate the source plugin, it would only be included in your export if it had a higher version number than the pre-existing source plugin.
Comment 2 Andrew Niefer CLA 2006-03-02 16:20:15 EST
Created attachment 35645 [details]
patch

This patch does the following:
-prefer a generated source plugin over a binary one that already existed in the target.  
-When generating source plugins/fragments, if there was already one in the state with the same id, it is removed before the new one is added.
-source plugins are only generated if we are not already generating source (avoids infinite recursion)
-When generating source feature scripts, pass the version number to make sure we use the source feature we just generated instead of a pre-existing one.

The patch should also fix bug 128139
Comment 3 Pascal Rapicault CLA 2006-03-02 17:00:20 EST
Patch released in HEAD.