diff --git a/tools/maven-bundle-plugin/changelog.txt b/tools/maven-bundle-plugin/changelog.txt
index 38f22300cc..52734f96e2 100644
--- a/tools/maven-bundle-plugin/changelog.txt
+++ b/tools/maven-bundle-plugin/changelog.txt
@@ -1,3 +1,8 @@
+Changes from 6.0.0 to 6.1.0
+---------------------------
+* Improvement
+ * FELIX-6741 Upgrade dependencies for maven-bundle-plugin (bnd 7.1.0 among other updates). See https://github.com/bndtools/bnd/wiki/Changes-in-7.1.0
+
Changes from 5.1.9 to 6.0.0
---------------------------
* Improvement
diff --git a/tools/maven-bundle-plugin/pom.xml b/tools/maven-bundle-plugin/pom.xml
index 19848a9658..3cbe341d59 100644
--- a/tools/maven-bundle-plugin/pom.xml
+++ b/tools/maven-bundle-plugin/pom.xml
@@ -168,28 +168,33 @@
org.osgi
- org.osgi.core
- 6.0.0
+ osgi.core
+ 8.0.0
+
+
+ org.apache.felix
+ org.apache.felix.metatype
+ 1.2.4biz.aQute.bndbiz.aQute.bndlib
- 7.0.0
+ 7.1.0org.slf4jslf4j-api
- 1.7.25
+ 2.0.16org.apache.felixorg.apache.felix.bundlerepository
- 1.6.6
+ 2.0.10org.apache.felixorg.apache.felix.utils
- 1.6.0
+ 1.11.8org.apache.maven
@@ -218,22 +223,22 @@
org.apache.maven.reportingmaven-reporting-api
- 3.0
+ 4.0.0org.apache.mavenmaven-archiver
- 3.5.2
+ 3.6.3org.apache.maven.sharedmaven-dependency-tree
- 3.0
+ 3.3.0org.codehaus.plexusplexus-utils
- 3.3.0
+ 4.0.2org.sonatype.plexus
@@ -243,17 +248,17 @@
org.apache.maven.doxiadoxia-sink-api
- 1.0
+ 2.0.0org.apache.maven.doxiadoxia-site-renderer
- 1.0
+ 2.0.0org.apache.maven.plugin-toolsmaven-plugin-annotations
- 3.4
+ 3.15.1provided
@@ -271,7 +276,7 @@
junitjunit
- 4.13.1
+ 4.13.2test
diff --git a/tools/maven-bundle-plugin/src/it/reproducible-manifest/pom.xml b/tools/maven-bundle-plugin/src/it/reproducible-manifest/pom.xml
index 38f3ae2444..40368a44cb 100644
--- a/tools/maven-bundle-plugin/src/it/reproducible-manifest/pom.xml
+++ b/tools/maven-bundle-plugin/src/it/reproducible-manifest/pom.xml
@@ -26,7 +26,7 @@ under the License.
- 1
+ 2023-01-01T00:00:00Z
diff --git a/tools/maven-bundle-plugin/src/it/reproducible/pom.xml b/tools/maven-bundle-plugin/src/it/reproducible/pom.xml
index d0ae17c502..3f17290c44 100644
--- a/tools/maven-bundle-plugin/src/it/reproducible/pom.xml
+++ b/tools/maven-bundle-plugin/src/it/reproducible/pom.xml
@@ -25,7 +25,7 @@ under the License.
1-SNAPSHOTbundle
- 1
+ 2023-01-01T00:00:00Z
diff --git a/tools/maven-bundle-plugin/src/it/unversioned-export-package-still-imported/pom.xml b/tools/maven-bundle-plugin/src/it/unversioned-export-package-still-imported/pom.xml
new file mode 100644
index 0000000000..5b4209ce89
--- /dev/null
+++ b/tools/maven-bundle-plugin/src/it/unversioned-export-package-still-imported/pom.xml
@@ -0,0 +1,51 @@
+
+
+
+ 4.0.0
+ org.apache.felix.bundleits
+ unversioned-export-package-still-imported
+ 1-SNAPSHOT
+ bundle
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 17
+ 17
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ @project.version@
+ true
+
+
+ org.apache.felix.test1,org.apache.felix.test2;version="1-SNAPSHOT"
+ org.apache.felix.test1,org.apache.felix.test2
+
+
+
+
+
+
diff --git a/tools/maven-bundle-plugin/src/it/unversioned-export-package-still-imported/src/main/java/org/apache/felix/test1/Dummy.java b/tools/maven-bundle-plugin/src/it/unversioned-export-package-still-imported/src/main/java/org/apache/felix/test1/Dummy.java
new file mode 100644
index 0000000000..30f4f42293
--- /dev/null
+++ b/tools/maven-bundle-plugin/src/it/unversioned-export-package-still-imported/src/main/java/org/apache/felix/test1/Dummy.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.test1;
+public class Dummy {
+}
\ No newline at end of file
diff --git a/tools/maven-bundle-plugin/src/it/unversioned-export-package-still-imported/src/main/java/org/apache/felix/test2/Dummy2.java b/tools/maven-bundle-plugin/src/it/unversioned-export-package-still-imported/src/main/java/org/apache/felix/test2/Dummy2.java
new file mode 100644
index 0000000000..90e34e9370
--- /dev/null
+++ b/tools/maven-bundle-plugin/src/it/unversioned-export-package-still-imported/src/main/java/org/apache/felix/test2/Dummy2.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.test2;
+public class Dummy2 {
+}
\ No newline at end of file
diff --git a/tools/maven-bundle-plugin/src/it/unversioned-export-package-still-imported/verify.groovy b/tools/maven-bundle-plugin/src/it/unversioned-export-package-still-imported/verify.groovy
new file mode 100644
index 0000000000..ee2ae918d0
--- /dev/null
+++ b/tools/maven-bundle-plugin/src/it/unversioned-export-package-still-imported/verify.groovy
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+String manifest = new File( basedir, "target/classes/META-INF/MANIFEST.MF" ).text
+assert !manifest.isEmpty()
+
+manifest.eachLine() { line ->
+ if (line.contains("Import-Package") && !line.contains("org.apache.felix.test1")) {
+ // See https://github.com/bndtools/bnd/pull/6270
+ // bnd 7.1.0 by default would not add this to the Import-Package, as the version range is not specified
+ // the maven-bundle-plugin doesn't have this issue, as a default version is added to the Export-Package statement
+ // automatically if missing
+ throw new Exception("Unversioned Export-Package statements should also be added to Import-Package statements, as maven-bundle-plugin adds a default version (1.0.0)");
+ }
+ if (line.contains("Import-Package") && !line.contains("org.apache.felix.test2;version=")) {
+ throw new Exception("Versioned Export-Package should be part of the Import-Package, as it contains an explicit version range");
+ }
+}
+
+
diff --git a/tools/maven-bundle-plugin/src/it/with-multi-release-jar/verify.groovy b/tools/maven-bundle-plugin/src/it/with-multi-release-jar/verify.groovy
index 54aa86f9a3..e01b3f62e0 100644
--- a/tools/maven-bundle-plugin/src/it/with-multi-release-jar/verify.groovy
+++ b/tools/maven-bundle-plugin/src/it/with-multi-release-jar/verify.groovy
@@ -20,7 +20,7 @@ String manifest = new File( basedir, "target/classes/META-INF/MANIFEST.MF" ).tex
assert !manifest.isEmpty()
manifest.eachLine() { line ->
- if (line.contains("Tool") && !line.contains("7.0.0")) {
+ if (line.contains("Tool") && !line.contains("7.1.0")) {
throw new Exception("Wrong bnd version used");
}
if (line.contains("Embedded-Artifacts") && !line.contains("jersey-server-3.1.7.jar")) {
diff --git a/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
index 7c54ba1b75..db38474ae1 100644
--- a/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
+++ b/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
@@ -550,8 +550,7 @@ protected Builder getOSGiBuilder( MavenProject currentProject, Map