Getting tycho-source-plugin:generate-pde-source-header working with packaging type jar #5232
Replies: 2 comments
-
moving the generate-pde-source-header goal of tycho-source-plugin to the pre-integration-test phase seems to work, but still looks a bit odd ... (this causes the maven-bundle-plugin to run in the package phase and afterwards the source headers can be created in the pre-integration-test phase) |
Beta Was this translation helpful? Give feedback.
-
@phermsdorf if I rember correctly @HannesWell enhanced that mojo to be used in m2e for a similar purpose: and it seem to work there in As we even have integration tests for this in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to generate eclipse source bundles for maven modules that generate their MANIFEST.MF with maven-bundle-plugin in a mixed reactor setup.
A problem seems to be that the packaging type for this modules is jar and not bundle (where everything is working as expected).
I have re-created our setup based on the ITS test here:
https://github.com/eclipse-tycho/tycho/tree/main/tycho-its/projects/mixed.reactor
In the felix.bundle module change the packaging to jar and add this executions block to the maven-bundle-plugin configuration:
That seems to be neccessary for the MANIFEST generation and bundling to the jar file.
When running the build i see:
and then it fails with:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-source-plugin:4.0.13:generate-pde-source-header (generate-pde-source-header) on project felix.bundle: Update of manifest failed!: Cannot invoke "String.length()" because "str" is null -> [Help 1]
The root cause seems to be that the maven.bundle-plugin bundle goal was not executed before the tycho-source.plugin. I tried binding the bundle goal to the prepare-package phase but then the maven-jar plugin fails with
You have to use a classifier to attach supplemental artifacts to the project instead of replacing them.
Is there an advice to get that setup running?
I want to keep the packaging type jar since the modules are run in an non-osgi environment as well (on server side)...
Thanks for any hints on this.
Bye Peter
Beta Was this translation helpful? Give feedback.
All reactions