[
https://issues.apache.org/jira/browse/CONFIGURATION-852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17952827#comment-17952827
]
Robbie Gemmell commented on CONFIGURATION-852:
----------------------------------------------
Rather than the export indicating it also uses jakarta.servlet, the issue
actually is with the new jakarta.servlet. package import, which is not
optional. Note the new _",jakarta.servlet,"_ entry within the Import-Package
manifest entry specifying a hard requirement, versus the equivalent javax
pre-existing optional requirement of _",javax.servlet;resolution:=optional,"_
also still found there.
I'd guess the issue was caused by
[https://github.com/apache/commons-configuration/commit/3a81545a42666d2c60ede0cb870af9dfc6767d21]
committed for CONFIGURATION-836 (which is still open without version, and
referencing a different open PR than from the released commit). It added an
optional jakarta servlet dependency at
[https://github.com/apache/commons-configuration/blob/3a81545a42666d2c60ede0cb870af9dfc6767d21/pom.xml#L226-L233]
, similar to the existing javax servlet equivalent just above it, but didnt
adjust the _commons.osgi.import_ property in the pom in similar fashion to is
done for the javax servlet import here:
[https://github.com/apache/commons-configuration/blob/2.12.0/pom.xml#L52] . I
expect adding an equivalent for the jakarta variant is whats needed.
I'll give the change of updating commons.osgi.import a try out and raise a PR.
> MANIFEST.MF in 2.12.0 now contains uses:="jakarta.servlet,javax. servlet"
> -------------------------------------------------------------------------
>
> Key: CONFIGURATION-852
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-852
> Project: Commons Configuration
> Issue Type: Bug
> Affects Versions: 2.12.0
> Reporter: Justin Bertram
> Priority: Major
>
> We use commons-configuration2 in ActiveMQ Artemis which includes some OSGi
> integration. Recently when [attempting to move from 2.11.0 to
> 2.12.0|https://github.com/apache/activemq-artemis/pull/5663] an OSGi-related
> test started failing, and it turns out that the culprit is that
> {{Export-Package}} in {{MANIFEST.MF}} now contains:
> {noformat}
> uses:="jakarta.servlet,javax. servlet"{noformat}
> I can update our configuration to account for this, but it's not clear to me
> that this change was intentional given that the Maven dependencies for these
> artifacts are marked as {{optional}}.
> Does 2.12.0 really have a hard dependency on jakarta & javax servlet?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)