Skip to content

Conversation

@chrisrueger
Copy link
Contributor

@chrisrueger chrisrueger commented Aug 22, 2025

Closes #5156

first draft of using https://bnd.bndtools.org/plugins/p2export.html for bnd itself the goal is to replace the veery old way of building the bnd p2 artifact and use bnd itself.

Importantly this solves the issue to use SHA-256 for checksum in addition to md5 to solve the Eclipse warning like "The digest algorithms (md5) used to verify ...jar have severely compromised security. Please report this concern to the artifact provider."

TODOs

  • need to add ecf
  • and verify it matches the current p2 artifact.

@chrisrueger
Copy link
Contributor Author

chrisrueger commented Aug 23, 2025

Will look in to the erro


> Task :org.bndtools.p2:jar
error  : Exception: java.lang.IllegalArgumentException: Could not create a pom from Maven metainfo properties nor manifest information
	at aQute.bnd.repository.maven.provider.MavenBndRepository.put(MavenBndRepository.java:181)
	at aQute.bnd.build.Project.releaseRepo(Project.java:1156)
	at aQute.bnd.build.Project.release(Project.java:1237)
	at aQute.bnd.build.Project.release(Project.java:1205)
	at aQute.bnd.build.Project.release(Project.java:2296)
	at aQute.bnd.gradle.BndPlugin$4.execute(BndPlugin.java:626)
	at aQute.bnd.gradle.BndPlugin$4.execute(BndPlugin.java:622)
	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:832)

...

error  : Release bndtools.jar,  into MavenBndRepository [localRepo=/home/runner/work/bnd/bnd/dist/m2, storage=Release, inited=true, redeploy=false],  exception Could not create a pom from Maven metainfo properties nor manifest information

> Task :org.bndtools.p2:release FAILED

This error was solved by disabling maven-release , buildrepo and releaserepo for this bund:

-maven-release: 
-buildrepo: 
-releaserepo: 

since this bundle should not go to a maven repo

@scottslewis
Copy link
Contributor

Question @chrisrueger I was/am looking to do p2 repo builds with bndtools workspaces/projects. Are things in place (snapshot I assume) that would currently allow that? Or are there additional changes/fixes/updates that are required (that you know of, of course). I'm just trying to plan my efforts (and required bndtools versions). Thanksinadvance.

@chrisrueger
Copy link
Contributor Author

chrisrueger commented Aug 24, 2025

@scottslewis I am new to this whole p2 topic (besides being a user / consumer when installing stuff into Eclipse) and this PR here is my first adventure.

I based this PR on the following test(data) https://github.com/bndtools/bnd/tree/master/biz.aQute.repository/testdata/p2-publish/ws-1/p1 (testcase) which matches the description in https://bnd.bndtools.org/plugins/p2export.html I think is a good example of the parts required to do P2 Exports with bnd.

UPDATE: This stuff should already work with the released bnd 7.1.0

@chrisrueger
Copy link
Contributor Author

chrisrueger commented Aug 26, 2025

Installing locally I get the following problem with the ECF feature. Need to find out why.

image image image
Cannot complete the install because one or more required items could not be found.
  Software being installed: Bndtools ECF Remote Services 7.2.0.202508261458-SNAPSHOT (bndtools.ecf.feature.feature.group 7.2.0.202508261458-SNAPSHOT)
  Missing requirement: Bndtools ECF Remote Services 7.2.0.202508261458-SNAPSHOT (bndtools.ecf.feature.feature.group 7.2.0.202508261458-SNAPSHOT) requires 'org.eclipse.equinox.p2.iu; org.eclipse.ecf.core.feature.feature.group [7.2.0.202508261458-SNAPSHOT,7.2.0.202508261458-SNAPSHOT]' but it could not be found

UPDATE:
It looks like the reason is that import feature like org.eclipse.ecf.core.feature.feature.group use the same SNAPSHOT version as my own artifact, which does not exist. Will investigate what to do

<requires>
    <import feature="bndtools.main.feature.feature.group" version="7.2.0.202508261532-SNAPSHOT" match="perfect"/>
    <import feature="org.eclipse.ecf.core.feature.feature.group" version="7.2.0.202508261532-SNAPSHOT" match="perfect"/>
    <import feature="org.eclipse.ecf.discovery.feature.feature.group" version="7.2.0.202508261532-SNAPSHOT" match="perfect"/>
    <import feature="org.eclipse.ecf.discovery.jmdns.feature.feature.group" version="7.2.0.202508261532-SNAPSHOT" match="perfect"/>
    <import feature="org.eclipse.ecf.osgi.services.feature.feature.group" version="7.2.0.202508261532-SNAPSHOT" match="perfect"/>
    <import feature="org.eclipse.ecf.provider.generic.feature.feature.group" version="7.2.0.202508261532-SNAPSHOT" match="perfect"/>
    <import feature="org.eclipse.ecf.provider.generic.remoteservice.feature.feature.group" version="7.2.0.202508261532-SNAPSHOT" match="perfect"/>
    <import feature="org.eclipse.ecf.remoteservice.feature.feature.group" version="7.2.0.202508261532-SNAPSHOT" match="perfect"/>
    <import feature="org.eclipse.ecf.remoteservice.sdk.bndtools.feature.feature.group" version="7.2.0.202508261532-SNAPSHOT" match="perfect"/>
    <import feature="org.eclipse.ecf.sharedobject.feature.feature.group" version="7.2.0.202508261532-SNAPSHOT" match="perfect"/>
  </requires>

@chrisrueger chrisrueger marked this pull request as ready for review August 28, 2025 19:53
@chrisrueger chrisrueger mentioned this pull request Aug 29, 2025
@chrisrueger chrisrueger force-pushed the p2-sha256 branch 2 times, most recently from d78c6a8 to 3410c8c Compare September 2, 2025 12:14
- use bnd's own P2Export https://bnd.bndtools.org/plugins/p2export.html for bnd itself
the goal is to replace the veery old way of building the p2 artifact and use bnd itself.

Importantly this solves the issue to use SHA-256 for checksum in addition to md5 to solve the Eclipse warning like "The digest algorithms (md5) used to verify ...jar have severely compromised security. Please report this concern to the artifact provider."

Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
@chrisrueger
Copy link
Contributor Author

Closing this PR because it was superseeded by #6808 which is the same content but inside bndtools organization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

org.bndtools.p2: Update the build for the p2 repository to replace md5 checksum

2 participants