Skip to content

Commit

Permalink
[m2e] Expand bundle version ranges for M2E imports
Browse files Browse the repository at this point in the history
In recent versions (2022-06 and later) of Eclipse the version of the M2E maven runtime bundle has stopped matching the M2E version and now uses a higher version related to the maven it packages. We need to be able to use this if M2E support is to keep working.

Fixes #5417

Signed-off-by: Tim Ward <timothyjward@apache.org>
  • Loading branch information
timothyjward committed Nov 8, 2022
1 parent e9ffa01 commit 0cc2c27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions biz.aQute.bnd.maven/bnd.bnd
Expand Up @@ -6,9 +6,9 @@ Bundle-Description: Shared logic used by bnd maven plugins
-includepackage: aQute.bnd.maven.lib.*

Import-Package: \
org.apache.maven.*;bundle-symbolic-name="${@bundlesymbolicname}";bundle-version="${range;[==,+);${@bundleversion}}";version=!,\
org.eclipse.aether.*;bundle-symbolic-name="${@bundlesymbolicname}";bundle-version="${range;[==,+);${@bundleversion}}";version=!,\
org.codehaus.plexus.*;bundle-symbolic-name="${@bundlesymbolicname}";bundle-version="${range;[==,+);${@bundleversion}}";version=!,\
org.apache.maven.*;bundle-symbolic-name="${@bundlesymbolicname}";bundle-version="${range;[==,4);${@bundleversion}}";version=!,\
org.eclipse.aether.*;bundle-symbolic-name="${@bundlesymbolicname}";bundle-version="${range;[==,4);${@bundleversion}}";version=!,\
org.codehaus.plexus.*;bundle-symbolic-name="${@bundlesymbolicname}";bundle-version="${range;[==,4);${@bundleversion}}";version=!,\
*

# Decorate maven runtime dependencies
Expand Down
3 changes: 2 additions & 1 deletion bndtools.m2e/bnd.bnd
Expand Up @@ -43,7 +43,8 @@ Bundle-SymbolicName: ${p};singleton:=true
Bundle-ActivationPolicy: lazy

Import-Package: \
org.apache.maven.*;bundle-symbolic-name="${@bundlesymbolicname}";bundle-version="${range;[==,+);${@bundleversion}}";version=!,\
org.apache.maven.*;bundle-symbolic-name="${@bundlesymbolicname}";bundle-version="${range;[==,4);${@bundleversion}}";version=!,\
org.eclipse.aether.*;bundle-symbolic-name="${@bundlesymbolicname}";bundle-version="${range;[==,4);${@bundleversion}}";version=!,\
${eclipse.importpackage},\
*

Expand Down

0 comments on commit 0cc2c27

Please sign in to comment.