Skip to content

Bundle commons-io with common.eval to satisfy commons-csv#65

Merged
khatchad merged 1 commit into
masterfrom
issue-64-commons-io-dependency
Jun 24, 2026
Merged

Bundle commons-io with common.eval to satisfy commons-csv#65
khatchad merged 1 commit into
masterfrom
issue-64-commons-io-dependency

Conversation

@khatchad

@khatchad khatchad commented Jun 24, 2026

Copy link
Copy Markdown
Member

Problem

The edu.cuny.citytech.refactoring.common.eval bundle carries commons-csv 1.12.0 as a private jar on its own Bundle-ClassPath, but commons-csv 1.12.0 has a hard dependency on commons-io 2.17.0. It references org.apache.commons.io.output.AppendableOutputStream. That dependency was never declared (it appeared when commons-csv was upgraded 1.10.0 to 1.12.0 in 7024035), so under strict OSGi classloading the bundle's classloader cannot find the class:

java.lang.NoClassDefFoundError: org/apache/commons/io/output/AppendableOutputStream
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.output.AppendableOutputStream
  cannot be found by edu.cuny.citytech.refactoring.common.eval_5.5.0

This passes in the IDE/test target (looser resolution) but fails in a materialized product, even when a separate commons-io bundle is present, because there is no wiring from common.eval to commons-io.

Fix

The target platform (common.target) is pure Eclipse update sites with no Orbit/commons bundles, which is precisely why commons-csv is bundled as a jar rather than consumed as the org.apache.commons.csv bundle. So the issue's Option 2 (depend on that bundle) is not viable in-repo. Instead, this PR bundles commons-io 2.17.0 the same way commons-csv is bundled (the exact version commons-csv 1.12.0's POM pins):

  • Add lib/commons-io-2.17.0.jar (plus sources/javadoc) to lib/.
  • Add it to Bundle-ClassPath (META-INF/MANIFEST.MF).
  • Add it to bin.includes (build.properties) so Tycho packages it.
  • Add the lib entry with source/javadoc attachments (.classpath) for IDE development.

commons-io is not exported. It stays private to this bundle's classloader, so it does not split-package with a product's own commons-io bundle. This is self-contained and works in both the IDE/test target and a materialized product.

Fixes #64.

🤖 Generated with Claude Code

commons-csv 1.12.0, bundled on common.eval's Bundle-ClassPath, has a hard
dependency on commons-io 2.17.0 (it references
org.apache.commons.io.output.AppendableOutputStream). That dependency was
never declared, so under strict OSGi classloading the bundle's classloader
cannot find the class, yielding a NoClassDefFoundError in a materialized
product even when a separate commons-io bundle is present.

The target platform is pure Eclipse update sites with no Orbit/commons
bundles, which is why commons-csv is bundled as a jar in the first place, so
depending on the org.apache.commons.csv bundle is not viable. Instead, bundle
commons-io 2.17.0 the same way commons-csv is bundled: self-contained, works
in both the IDE/test target and a materialized product, and private to this
bundle's classloader (not exported), so it does not split-package with a
product's own commons-io.

Fixes #64.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jRmWZMAqpMDjsKmTATy3A
@khatchad khatchad changed the title Bundle commons-io with common.eval to satisfy commons-csv Bundle commons-io with common.eval to satisfy commons-csv Jun 24, 2026
@khatchad khatchad changed the title Bundle commons-io with common.eval to satisfy commons-csv Bundle commons-io with common.eval to satisfy commons-csv Jun 24, 2026
@khatchad
khatchad merged commit 302b14f into master Jun 24, 2026
5 checks passed
@khatchad
khatchad deleted the issue-64-commons-io-dependency branch June 24, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

common.eval bundles commons-csv without declaring its commons-io dependency

1 participant