Skip to content

Commit edc8b97

Browse files
authored
Merge branch 'master' into fea_snapshot_deploy_fix
2 parents 298c88d + ea928f8 commit edc8b97

File tree

516 files changed

+1143
-1007
lines changed

Some content is hidden

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

516 files changed

+1143
-1007
lines changed

.github/scripts/docs.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ bundle exec jekyll build
88

99
# create search index under _site/pagefind
1010
pwd
11+
# ensure the archived _site/releases docs from former release do not get indexed by pagefind
12+
# by removing the 'data-pagefind-body' from those pages
13+
# see https://pagefind.app/docs/indexing/#removing-pages-from-pagefinds-index
14+
find _site/releases -type f -name "*.html" -exec sed -i 's/data-pagefind-body//g' {} +
1115
./pagefind --verbose --site _site --output-subdir pagefindindex

biz.aQute.bnd.annotation/bnd.bnd

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Set javac settings from JDT prefs
2-
-include: ${workspace}/cnf/includes/jdt.bnd
2+
-include: ~${workspace}/cnf/includes/jdt.bnd
3+
4+
# #7005: Keep this bundle compatible with Java 8 as long as possible. All other code is min. Java 17
5+
# It is because some libraries reference bnd annotations
6+
# like aQute.bnd.annotation.Cardinality, aQute.bnd.annotation.Resolution, aQute.bnd.annotation.spi.ServiceConsumer
7+
# directly in source code (e.g. https://github.com/apache/logging-log4j2/blob/752d023795fc518a38ecae73bb6455e2723cecea/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java)
8+
# but they need to stay compatible with java 8.
9+
javac.source = 8
10+
javac.target = 8
311

412
Bundle-Description: bnd Annotations Library
513

biz.aQute.bnd.annotation/src/aQute/bnd/annotation/ConsumerType.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
* For an elaborate and simple explanation, see {@link ProviderType}.
1919
* </p>
2020
* Deprecated because being replaced by OSGi annotations
21+
*
22+
* @deprecated forRemoval since = "7.0.0"
2123
*/
22-
@Deprecated(forRemoval = true, since = "7.0.0")
24+
@Deprecated
2325
@Documented
2426
@Retention(RetentionPolicy.CLASS)
2527
@Target(ElementType.TYPE)

biz.aQute.bnd.annotation/src/aQute/bnd/annotation/ProviderType.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@
6060
* this interface" for @noimplement marked interfaces.
6161
* </p>
6262
* Deprecated because replaced by OSGi annotations
63+
*
64+
* @deprecated forRemoval since = "7.0.0"
6365
*/
64-
@Deprecated(forRemoval = true, since = "7.0.0")
66+
@Deprecated
6567
@Documented
6668
@Retention(RetentionPolicy.CLASS)
6769
@Target(ElementType.TYPE)

biz.aQute.bnd.annotation/src/aQute/bnd/annotation/Version.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88

99
/**
1010
* Deprecated because made superfluous by OSGi annotations
11+
*
12+
* @deprecated forRemoval since = "7.0.0"
1113
*/
12-
@Deprecated(forRemoval = true, since = "7.0.0")
14+
@Deprecated
1315
@Documented
1416
@Retention(RetentionPolicy.CLASS)
1517
@Target({

biz.aQute.bndlib.tests/test/test/JarTest.java

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,91 @@ public void testWriteManifestNonOSGiHeadersNotReordered() throws Exception {
645645
assertEquals(customHeader, writtenCustomHeader);
646646
}
647647

648+
/**
649+
* Test Bundle-NativeCode is untouched from Jar.reorderClause() for now,
650+
* because this header is special and needs to be parsed differently than
651+
* normal OSGi headers. In the future we could evaluate how to build a
652+
* special reordering for this header.
653+
*/
654+
@Test
655+
public void testWriteManifestBundleNativeCodeNoReordering() throws Exception {
656+
Manifest manifest = new Manifest();
657+
658+
String customHeader = """
659+
natives/linux-amd64/libgluegen_rt.so;
660+
natives/linux-amd64/libjocl.so;
661+
natives/linux-amd64/libnativewindow_awt.so;
662+
natives/linux-amd64/libnewt_drm.so;
663+
natives/linux-amd64/libnativewindow_x11.so;
664+
natives/linux-amd64/libnativewindow_drm.so;
665+
natives/linux-amd64/libnewt_head.so;
666+
natives/linux-amd64/libjogl_mobile.so;
667+
natives/linux-amd64/libjogl_desktop.so;
668+
processor=x86-64; osname=Linux
669+
""";
670+
manifest.getMainAttributes()
671+
.putValue(Constants.BUNDLE_NATIVECODE, customHeader);
672+
673+
try (ByteArrayOutputStream bout = new ByteArrayOutputStream()) {
674+
Jar.writeManifest(manifest, bout);
675+
676+
Manifest writtenManifest = new Manifest(new ByteArrayInputStream(bout.toByteArray()));
677+
String writtenCustomHeader = writtenManifest.getMainAttributes()
678+
.getValue(Constants.BUNDLE_NATIVECODE);
679+
680+
assertEquals(customHeader.replaceAll("\n", "")
681+
.replace(" ", ""),
682+
writtenCustomHeader.replaceAll("\n", "")
683+
.replace(" ", ""));
684+
}
685+
}
686+
687+
/**
688+
* Test Bundle-NativeCode is untouched from Jar.reorderClause() for now,
689+
* because this header is special and needs to be parsed differently than
690+
* normal OSGi headers. In the future we could evaluate how to build a
691+
* special reordering for this header.
692+
*/
693+
@Test
694+
public void testWriteManifestBundleNativeCodeNoReordering2() throws Exception {
695+
Manifest manifest = new Manifest();
696+
697+
String customHeader = """
698+
f1;\
699+
osname=Windows95;
700+
processor=x86;
701+
selection-filter='(com.acme.windowing=win32)';
702+
language=en;
703+
osname=Windows98;
704+
language=se,
705+
lib/solaris/libhttp.so;
706+
osname=Solaris;
707+
osname = SunOS ;
708+
processor = sparc,
709+
lib/linux/libhttp.so;
710+
osname = Linux ;
711+
osversion = 3.1.4;
712+
processor = mips;
713+
selection-filter = '(com.acme.windowing=gtk)',
714+
*""";
715+
manifest.getMainAttributes()
716+
.putValue(Constants.BUNDLE_NATIVECODE, customHeader);
717+
718+
try (ByteArrayOutputStream bout = new ByteArrayOutputStream()) {
719+
Jar.writeManifest(manifest, bout);
720+
721+
Manifest writtenManifest = new Manifest(new ByteArrayInputStream(bout.toByteArray()));
722+
String writtenCustomHeader = writtenManifest.getMainAttributes()
723+
.getValue(Constants.BUNDLE_NATIVECODE);
724+
725+
assertEquals(customHeader.replaceAll("\n", "")
726+
.replace(" ", ""),
727+
writtenCustomHeader.replaceAll("\n", "")
728+
.replace(" ", ""));
729+
}
730+
}
731+
732+
648733
@Test
649734
public void testWriteManifestComprehensiveAttributeDirectiveOrdering() throws Exception {
650735
Manifest manifest = new Manifest();

biz.aQute.bndlib/src/aQute/bnd/osgi/Jar.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,8 @@ private static Manifest clean(Manifest org) {
786786
.entrySet()) {
787787
String nice = clean((String) entry.getValue());
788788
Object key = entry.getKey();
789-
if (Constants.OSGI_SYNTAX_HEADERS.contains(key.toString())) {
789+
if (Constants.OSGI_SYNTAX_HEADERS.contains(key.toString())
790+
&& !Constants.BUNDLE_NATIVECODE.equals(key.toString())) {
790791
nice = reorderClause(nice, collator);
791792
}
792793
mainAttributes.put(key, nice);

biz.aQute.junit/README

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Deprecated: This bundle is marked as deprecated in bnd 7.2.0 for remove in 8.0.0
2+
Please migrate to biz.aQute.tester.junit-platform
3+
14
The junit project is a plugin that extends the ProjectTester.java class to run OSGi tests
25
inside a framework.
36

biz.aQute.junit/bnd.bnd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Set javac settings from JDT prefs
22
-include: ${workspace}/cnf/includes/jdt.bnd
33

4+
# Deprecated for removal in 8.0.0
5+
Bundle-Description: Deprecated for removal in 8.0.0: \
6+
The junit project is a plugin that extends the ProjectTester.java class \
7+
to run OSGi tests inside a framework.
8+
49
-maven-scope: provided
510

611
-buildpath: \

biz.aQute.tester/bnd.bnd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Set javac settings from JDT prefs
22
-include: ${workspace}/cnf/includes/jdt.bnd
33

4+
# Deprecated for removal in 8.0.0
5+
46
Bundle-Description: \
5-
A bnd tester. If this bundle is used as the tester (previously aQute.junit) then \
7+
Deprecated for removal in 8.0.0: A bnd tester. If this bundle is used as the tester (previously aQute.junit) then \
68
it will add itself to the -runbundles at the end. At startup, this bundle will then \
79
run the tests. This bundle does NOT contain JUnit itself. It will import JUnit just \
810
like any other bundle.

0 commit comments

Comments
 (0)