Skip to content

Commit 1335630

Browse files
committed
use P2Exporter for org.bndtools.p2
- 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." - remove old p2 feature.xml files Signed-off-by: Christoph Rueger <chrisrueger@gmail.com> Update bndtools.ecf.feature.bndrun Added reasonable version ranges for ecf features Signed-off-by: Scott Lewis <scottslewis@gmail.com> prepare p2 signing Step1: no signing (sign=false) but prepare the usage of environment variables , which might come from the GH Action workflow later. e.g. setting `P2_SIGN=true` env var enables the signing Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
1 parent bbef7d0 commit 1335630

File tree

109 files changed

+204
-10373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+204
-10373
lines changed

.github/workflows/rebuild.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,11 @@ jobs:
130130
*/generated/test-reports/*/TEST-*.xml
131131
maven/*/target/surefire-reports/TEST-*.xml
132132
gradle-plugins/*/build/test-results/*/TEST-*.xml
133+
- name: Upload Rebuild P2 Repo artifact
134+
if: ${{ github.event_name == 'pull_request' }}
135+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
136+
with:
137+
name: pr-${{ github.event.pull_request.number }}-jdk${{ matrix.java }}-${{ matrix.os }}
138+
path: |
139+
org.bndtools.p2/generated/org.bndtools.p2.jar
140+
retention-days: 7 # keep for 7 days

cnf/build.bnd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,6 @@ Bundle-Developers: \
9797
-runproperties.testlauncher0: in.workspace=workspace
9898
-runproperties.testlauncher1: in.project=workspace
9999
-runproperties.testlauncher2: in.bndrun=workspace
100+
101+
-plugin \
102+
aQute.p2.export.P2Exporter

org.bndtools.p2/.project

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@
1010
<arguments>
1111
</arguments>
1212
</buildCommand>
13+
<buildCommand>
14+
<name>bndtools.core.bndbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
1318
</buildSpec>
1419
<natures>
1520
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>bndtools.core.bndnature</nature>
1622
</natures>
1723
</projectDescription>

org.bndtools.p2/bnd.bnd

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,30 @@ pluginnames: ${-dependson},\
3939

4040
plugins: ${map;repo;${template;pluginnames;${@};latest}}
4141

42-
-includeresource: ${target}/p2
4342
-resourceonly: true
44-
#
45-
# The p2 tasks must be run from the gradle build
46-
#
47-
-fixupmessages.p2: "Input file does not exist*${target}/p2";is:=warning;replace:="The ${target}/p2 directory must be created with the gradle build."
43+
44+
-maven-release:
45+
-buildrepo:
46+
-releaserepo:
47+
48+
# P2 signing:
49+
# key (name of the key),
50+
# passphrase (optional)
51+
# pubkey (read publickey file e.g. from ~./bnd/ folder)
52+
# below
53+
# The idea is to first check global variables in ~./bnd/settings.json
54+
# and fallback to environment variables.
55+
# For Github Actions you would set the environment variables.
56+
# fallback is "false" if none is set.
57+
sign=${global;p2.sign;${env;P2_SIGN;false}}
58+
key=${global;p2.sign_key;${env;P2_SIGN_KEY}}
59+
passphrase=${global;p2.sign_passphrase;${env;P2_SIGN_PASSPHRASE}}
60+
pubkey="${global;p2.pub_key;${env;P2_PUB_KEY}}"
61+
62+
-export features.bnd; \
63+
type=p2; \
64+
name=org.bndtools.p2.jar;\
65+
sign=${sign};\
66+
sign_key=${key};\
67+
sign_passphrase=${passphrase};\
68+
sign_pubkey=${pubkey};\
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Bundle-Name: Bndtools ECF Remote Services
2+
Bundle-Description: ECF Remote Services integration for Bndtools
3+
Bundle-Category bndtools
4+
Bundle-Copyright: Copyright Composent, Inc. others, 2025
5+
update: https://download.eclipse.org/rt/ecf/latest/site.p2/
6+
update.label: ECF Update Site
7+
8+
Require-Capability \
9+
feature;name=org.eclipse.ecf.core.feature;version="[1.7.0,2)",\
10+
feature;name=bndtools.main.feature,\
11+
feature;name=org.eclipse.ecf.discovery.feature;version="[1.1.0,2)",\
12+
feature;name=org.eclipse.ecf.discovery.jmdns.feature;version="[1.1.0,2)",\
13+
feature;name=org.eclipse.ecf.osgi.services.feature;version="[2.7.100,3)",\
14+
feature;name=org.eclipse.ecf.provider.generic.feature;version="[1.2.0,2)",\
15+
feature;name=org.eclipse.ecf.provider.generic.remoteservice.feature;version="[1.3.0,2)",\
16+
feature;name=org.eclipse.ecf.remoteservice.feature;version="[2.7.0,3)",\
17+
feature;name=org.eclipse.ecf.remoteservice.sdk.bndtools.feature;version="[3.16.5,4)",\
18+
feature;name=org.eclipse.ecf.sharedobject.feature;version="[1.2.0,2)"
19+
20+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Bundle-Name: Bndtools m2e
2+
Bundle-Description: m2e integration for Bndtools
3+
Bundle-Copyright: Copyright Gregory Amerson others, 2016
4+
5+
Bundle-Category bndtools
6+
7+
Require-Capability \
8+
feature;name=org.eclipse.m2e.feature;version=2.0.0, \
9+
feature;name=bndtools.main.feature
10+
11+
12+
-runbundles \
13+
bndtools.m2e, \
14+
biz.aQute.bnd.maven
15+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Bundle-Name: Bndtools
2+
Bundle-Description: OSGi Development Tools for Eclipse based on bnd.
3+
Bundle-Category bndtools
4+
Bundle-Copyright: Copyright Neil Bartlett and others, 2011 \
5+
This software uses icons from the FamFamFam \"Silk\" icon set by Mark James (http://www.famfamfam.com/lab/icons/silk/)
6+
7+
Require-Capability \
8+
feature;name=org.eclipse.platform;version=4.25.0
9+
10+
-runbundles \
11+
biz.aQute.bnd.util, \
12+
biz.aQute.bndlib, \
13+
biz.aQute.repository, \
14+
biz.aQute.resolve, \
15+
bndtools.api, \
16+
bndtools.core, \
17+
bndtools.core.services, \
18+
bndtools.builder, \
19+
bndtools.jareditor, \
20+
bndtools.release, \
21+
biz.aQute.bnd.embedded-repo, \
22+
org.bndtools.headless.build.manager, \
23+
org.bndtools.headless.build.plugin.ant, \
24+
org.bndtools.headless.build.plugin.gradle, \
25+
org.bndtools.launch, \
26+
org.bndtools.remoteinstall, \
27+
org.bndtools.versioncontrol.ignores.manager, \
28+
org.bndtools.versioncontrol.ignores.plugin.git, \
29+
org.bndtools.templating, \
30+
org.bndtools.templating.gitrepo, \
31+
org.slf4j.api, \
32+
org.osgi.service.coordinator, \
33+
org.osgi.service.repository, \
34+
org.osgi.util.function, \
35+
org.osgi.util.promise
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Bundle-Name: Bndtools PDE
2+
Bundle-Description: PDE integration for Bndtools
3+
Bundle-Category bndtools
4+
Bundle-Copyright: Copyright Elias N Vasylenko and others, 2017
5+
6+
Require-Capability \
7+
feature;name=org.eclipse.pde;version=3.14.1300, \
8+
feature;name=bndtools.main.feature
9+
10+
-runbundles \
11+
bndtools.pde

org.bndtools.p2/build.gradle

Lines changed: 0 additions & 178 deletions
This file was deleted.

org.bndtools.p2/eclipse-3.5.2/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)