so after a lot of trial and error i just hacked my way around it in a much easier way then any of the things i can find on the web.
I now just cloned the plugin i wanted to patch (and copied it into my own git repo)
did my changes to the code i wanted, set the version to exactly what is shipped (so filled in the .qualifier part)
then adjust the pom.xml: (i moved the plugin to our group id)
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>adjust the p2 osgi area to overwrite the eclipse plugin</id>
<phase>install</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.servoy</groupId>
<artifactId>org.eclipse.help.ui</artifactId>
<version>${project.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${settings.localRepository}/p2/osgi/bundle/org.eclipse.help.ui/${project.version}/</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>com.servoy</groupId>
<artifactId>org.eclipse.help.ui</artifactId>
<version>${project.version}</version>
<type>xml</type>
<classifier>p2artifacts</classifier>
<overWrite>true</overWrite>
<outputDirectory>${settings.localRepository}/p2/osgi/bundle/org.eclipse.help.ui/${project.version}/</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
so now when that plugin build it just replaces the 2 files that tycho/p2 places in the maven repo completely.
Then after that when i make the product it will pick up this file.
This is by far the easiest that i could find, i still think tycho should do this for me by some simple configuration for example:
<artifactId>target-platform-configuration</artifactId>
should have another thing besides <environments> and <filters>
<patches>
<patch>
<groupId>org.eclipse.help</groupId> <!! maybe not needed? because there is not really a group in the p2 repo? >
<artifactId>org.eclipse.help.ui</artifactId>
<version>4.1.0.v20170311-0931</version>
<patchGroupId>com.servoy</patchGroupId> <!! maybe also not needed, then it really is under the same group, but really in the local repo? >
</patch>
</patches>
Then tycho will just replace that normal plugin jar with the one that is targeted with the patchGroupId (and the artifactid that should i guess be just the same) and the version.
And if suddenly the to patch plugin is not there or the patched jar/plugin itself (for both that specific version) it should fail the build...
Because then it mean that the target p2 repo is updated and that specific plugin version is not there anymore and i need to check it.
i will make a feature request in bugzilla to see what others think.