Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] patching eclipse jars

It is basically a pita to do. If you read through the initial bug in my first reply you will find an explanation for how the eclipse releng team solves this for the beta Java x patches.

On Wed, Apr 18, 2018, 18:09 Johan Compagner <jcompagner@xxxxxxxxxx> wrote:
I have tried a few more things but with no luck

So the question remains what really needs to be configured. 
Many things i find are all about a p2 build not tycho

So i have a plugin of eclipse "org.eclipse.help.ui" that i want to patch (use my version)

that plugin is as far as i know a member of the feature "org.eclipse.help"

so i have my own " org.eclipse.help.ui" plugin project in my workspace (besides all other plugins)
with the exact same version (i tried also others) as the plugin that i want to override.

i make a patch feature project that requires that help feature.

add that plugin to that feature

But what to do then?

Should i include that patch feature in my main feature.xml?

Should i add stuff the the pom.xml of the product build?

i first create all the plugins and store them in my local repo

Then i make the 2 feature modules  (my own and the patch feature) and then i execute the product build 

But the repository that is then assembled always have the eclipse plugin not my plugin...

So what step do i miss here? How can i make sure that the plugin is completely overwritten by mine?
i guess i need to have the same version right? else i break the eclipse help feature.

johan



On 18 April 2018 at 17:15, Johan Compagner <jcompagner@xxxxxxxxxx> wrote:
i am not the only one with questions


i never used the feature patch feature...

Previously i just had a target folder (which was an eclipse version)
where i just copied over the patched jars. and eclipse p2 then created a product from that install

i did follow now this:


so i have a feature that  looks like this:

<feature
      id="org.eclipse.help.patch"
      label="Help Patch"
      version="1.0.0">
   <requires>
      <import feature="org.eclipse.help" version="2.2.103.v20180301-0715" patch="true"/>
   </requires>

   <plugin
         id="org.eclipse.help.ui"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

</feature>


but what should i now do with that feature? i can't include it into my core product feature because it then complains
Or should he version of my custom  org.eclipse.help.ui be exactly the same as the one i want to patch (inside the  org.eclipse.help feature)



On 18 April 2018 at 17:05, Felix Dorner <felix.dorner@xxxxxxxxx> wrote:
If I understand you, you want to replace a plugin in eclipse with a custom built one, to fix a bug. You need a feature patch for this. Once you know what that is, you can go and find out how to build one with tycho. You said you did this before but without tycho, what build system did you use before? 

On Apr 18, 2018 4:25 PM, "Johan Compagner" <jcompagner@xxxxxxxxxx> wrote:
so it is that featureToPatch entry i guess

But what to do in tycho for that is not really clear to me if i look at the sample that bug has:


What should i create locally? I now just have the plugin
Should i also create the exact same feature? 


On 18 April 2018 at 16:04, Felix Dorner <felix.dorner@xxxxxxxxx> wrote:

On Wed, Apr 18, 2018, 15:50 Johan Compagner <jcompagner@xxxxxxxxxx> wrote:
Hi,

previously when we used the "target" dir that has an eclipse installation i could just patch some eclipse jars to get some bugs out from then and build a product against that target dir.

How to do that with tycho?

I have now 2 examples, 1 is the  "org.eclipse.help.ui" plugin
That just doesn't really work like it should according to me

i patched the source code in a few places and rebuild the plugin
But the problem is how to let tycho know that it has to use that plugin?

that help.ui is a bit special.. 
because that implements the "org.eclipse.ui.helpSupport" extension point but there can be only one of them
the doc says of AbstractHelpUI:

 * Note that the standard implementation of the help system UI is provided by
 * the <code>"org.eclipse.help.ui"</code> plug-in. Since the platform can only
 * make use of a single help system UI implementation, make sure that the
 * platform is not configured with more than one plug-in trying to extend this
 * extension point.

yeah right.. how to do that then?
Because i want of course the rest of the help, i only want to provide a better impl of the HelpUI

Problem is that i can't give that patched plugin a slightly different version.
Because then the whole eclipse.help.feature doesn't work (if my feature would include that bumbed version)

Is there somehow a tycho property where i can say get this plugin always from there?
(or that my local plugins are alway overwriting the once that come from p2 repositories)?


The other example is this bug:


i also kind of want to patch that myself, because no i have to wait for an 4.8 release to have that fixed...
But i encounter then the same problem.. how to force tycho to use that patched version and not the one from the p2 repo.



--
Johan Compagner
Servoy
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user



--
Johan Compagner
Servoy
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user



--
Johan Compagner
Servoy



--
Johan Compagner
Servoy
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user

Back to the top