Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSGi dependency on Apache Commons IO is declared incorrectly #6020

Open
1 of 2 tasks
malachyb opened this issue Jun 18, 2024 · 1 comment · May be fixed by #6015
Open
1 of 2 tasks

OSGi dependency on Apache Commons IO is declared incorrectly #6020

malachyb opened this issue Jun 18, 2024 · 1 comment · May be fixed by #6015

Comments

@malachyb
Copy link

Search first

  • I searched and no similar issues were found

Description

According to Maven, Liquibase 4.28.0 has a dependency on commons-io:2.16.1, but in the manifest file we can see Import-Package: org.apache.commons.io;resolution:=optional;version="[1.4,2). This causes issues when running an application using OSGi, as it is declared as optional. Additionally, it is the incorrect version of commons-io.

Because of this, when running this on an OSGi application it causes this error to occur.

java.lang.NoClassDefFoundError: org/apache/commons/io/FilenameUtils
	at liquibase.changelog.DatabaseChangeLog.normalizePath(DatabaseChangeLog.java:1090)
	at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:20)
	at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:281)
	at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:266)

Steps To Reproduce

Run the Liquibase library using OSGi and attempt any operation that uses a class from commons-io like DatabaseChangeLog.normalizePath()

Expected/Desired Behavior

Liquibase manifest declares hard dependency on the correct version of commons-io.

Liquibase Version

4.28.0

Database Vendor & Version

No response

Liquibase Integration

No response

Liquibase Extensions

No response

OS and/or Infrastructure Type/Provider

No response

Additional Context

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR (Thank you!)
@vkolomeyko vkolomeyko linked a pull request Jun 18, 2024 that will close this issue
1 task
@a1flecke
Copy link

We are impacted by this as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Development PR Issues
Development

Successfully merging a pull request may close this issue.

2 participants