Skip to content

[Regression] commons-configuration2 is pulled in as a required dependency #1352

@papegaaij

Description

@papegaaij

Search before asking

  • I had searched in the issues and found no similar issues.

Environment

This is a dependency of shiro-core, so it's for every environment.

Shiro version

2.0.0

Regression from:

1.13.0

What was the actual outcome?

Observe commons-configuration2 in the output below:

[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------< org.apache.shiro:shiro-core >---------------------
[INFO] Building Apache Shiro :: Core 2.0.0
[INFO]   from shiro-core-2.0.0.pom
[INFO] -------------------------------[ bundle ]-------------------------------
[INFO] 
[INFO] --- dependency:3.6.1:tree (default-cli) @ shiro-core ---
[INFO] org.apache.shiro:shiro-core:bundle:2.0.0
[INFO] +- org.apache.shiro:shiro-lang:jar:2.0.0:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:2.0.12:compile
[INFO] +- org.apache.shiro:shiro-cache:jar:2.0.0:compile
[INFO] +- org.apache.shiro:shiro-crypto-hash:jar:2.0.0:compile
[INFO] |  +- org.apache.shiro:shiro-crypto-core:jar:2.0.0:compile
[INFO] |  \- org.bouncycastle:bcprov-jdk18on:jar:1.77:compile
[INFO] +- org.apache.shiro:shiro-crypto-cipher:jar:2.0.0:compile
[INFO] +- org.apache.shiro:shiro-config-core:jar:2.0.0:compile
[INFO] +- org.apache.shiro:shiro-config-ogdl:jar:2.0.0:compile
[INFO] |  \- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] |     \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] +- org.apache.shiro:shiro-event:jar:2.0.0:compile
[INFO] +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:provided
[INFO] \- org.apache.commons:commons-configuration2:jar:2.9.0:compile
[INFO]    +- org.apache.commons:commons-lang3:jar:3.12.0:compile
[INFO]    \- org.apache.commons:commons-text:jar:1.10.0:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.969 s
[INFO] Finished at: 2024-03-11T21:48:45+01:00
[INFO] ------------------------------------------------------------------------

What was the expected outcome?

Commons-configuration2 should be made optional. The code here already supports it being optional:

private Interpolator createInterpolator() {
if (ClassUtils.isAvailable("org.apache.commons.configuration2.interpol.ConfigurationInterpolator")) {
return new CommonsInterpolator();
}
return new DefaultInterpolator();
}

How to reproduce

see above

Debug logs

No response

Metadata

Metadata

Assignees

Labels

jakartaeeJakarta EEjavaPull requests that update Java code

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions