Skip to content

Fix duplicate opendj-server-legacy classes in distribution lib/#661

Open
vharseko wants to merge 2 commits into
OpenIdentityPlatform:masterfrom
vharseko:issues/opendj.jar
Open

Fix duplicate opendj-server-legacy classes in distribution lib/#661
vharseko wants to merge 2 commits into
OpenIdentityPlatform:masterfrom
vharseko:issues/opendj.jar

Conversation

@vharseko

@vharseko vharseko commented Jun 26, 2026

Copy link
Copy Markdown
Member

Problem

The assembled server distribution shipped two byte-identical copies of the same 2975 org.opends.server.* classes in lib/:

  • lib/opendj.jar — the canonical jar (referenced by the bootstrap manifests, upgrade and doc tooling)
  • lib/org.openidentityplatform.opendj.opendj-server-legacy.jar — an unwanted duplicate (~8 MB)

Root cause

The <dependencySet> in opendj-server-legacy/src/main/assembly/opendj-archive-component.xml includes the module's own artifact (useProjectArtifact defaults to true) and was supposed to drop it via an <exclude>. After the fork from ForgeRock the project groupId changed to org.openidentityplatform.opendj, but the exclude still used the pre-fork coordinate org.forgerock.opendj:opendj-server-legacy, so it no longer matched and the duplicate was copied in.

Fix

One line — correct the groupId in the exclude so the duplicate is filtered out. opendj.jar stays as the canonical jar. Nothing references the duplicate by name (verified across manifests, scripts, Dockerfiles and package specs), and all downstream packages (DEB/RPM/MSI/SVR4/Docker) reuse this distribution, so the duplicate is removed everywhere.

Verification

Built opendj-server-legacy and confirmed:

  • lib/ no longer contains org.openidentityplatform.opendj.opendj-server-legacy.jar; opendj.jar is present
  • bootstrap-client.jar manifest Class-Path still references opendj.jar
  • Smoke test passes: setup (sample data) → status (Started, 102 entries) → ldapsearchdsconfig (admin connector) → stop-ds, no NoClassDefFoundError

vharseko added 2 commits June 26, 2026 09:53
The dependencySet exclude in opendj-archive-component.xml used the pre-fork
groupId org.forgerock.opendj, so it no longer matched the module's own
artifact (org.openidentityplatform.opendj). As a result lib/ shipped both
opendj.jar and an identical org.openidentityplatform.opendj.opendj-server-legacy.jar.
Correct the groupId so the duplicate is excluded; opendj.jar remains the
canonical jar referenced by the bootstrap manifests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants