Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
I can't made sense of this, so I hope something can help out here.
In this sample pom, the version range is missing from the created MANIFEST.MF.
Expected: Import-Package: jakarta.el;version="[5.0.0,6.0.0)"
Actual: Import-Package: jakarta.el
It fails for tomcat-el-api's 10.1.0 jar and maven-bundle-plugin's 4.1.0 or higher. If I use version 4.0.0, then the expected behavior occurs. This leads to to believe something changed to the felix maven plugin?
Tomcat: https://repo1.maven.org/maven2/org/apache/tomcat/tomcat-el-api/10.1.0/
All other jars seem to work fine (even with the newer plugin versions).
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<groupId>test.manifest</groupId>
<artifactId>manifiest</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>MissingImportVersionsInManifest</name>
<modelVersion>4.0.0</modelVersion>
<build>
<plugins>
<!-- create manifest.mf for OSGi -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<!-- 4.1.0 - Fails for tomcat-el-api's 10.1.0 Jar -->
<version>4.1.0</version>
<!-- 4.0.0 - Works for all 3 versions -->
<!-- <version>4.0.0</version> -->
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<Import-Package>
jakarta.el;version="[5.0.0, 6.0.0)"
</Import-Package>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- WORKING : Import-Package: jakarta.el;version="[5.0.0,6.0.0)" -->
<!-- <dependency>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
<version>5.0.1</version>
<scope>provided</scope>
</dependency> -->
<!-- ^^^ Jakarta API Manifest -> Export-Package: jakarta.el;version="5.0.1" -->
<!-- FAILING: Import-Package: jakarta.el -->
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-el-api</artifactId>
<version>10.1.0</version>
<scope>provided</scope>
</dependency>
<!-- ^^^^ Tomcat API Manifest -> Export-Package: jakarta.el;version="5.0" -->
<!-- WORKING : Import-Package: jakarta.el;version="[5.0.0,6.0.0)" -->
<!-- <dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-el-api</artifactId>
<version>10.0.0-M4</version>
<scope>provided</scope>
</dependency> -->
<!-- ^^^^ Tomcat API Manifest: Export-Package: jakarta.el -->
</dependencies>
</project>