Cloud Manager code quality · Content package rules (OakPAL) · updated
DuplicateOsgiConfigurations: Packages should not contain duplicate OSGi configurations
DuplicateOsgiConfigurations fires when two packages configure the same OSGi component for the same run mode, as in Adobe's example of ExternalizerImpl in both projectA and projectB. Keep one configuration per PID and run mode, typically in a shared configuration package.
| Rule key | DuplicateOsgiConfigurations |
|---|---|
| Adobe's rule name | Packages should not contain duplicate OSGi configurations |
| Type | Bug |
| Severity | Major |
| Since | 2019.6.0 |
| Checked by | OakPAL scan of your content packages |
Why Cloud Manager flags it
When two packages ship the same PID, the one installed last wins, and installation order is not something you want production behaviour to depend on. Typical results are the Externalizer pointing at the wrong domain on one environment, or a logger configured twice with different levels. The rule is run-mode aware: config.author and config.publish copies of the same PID are fine; two config.publish copies are not.
Multi-brand programs hit this most often, when each brand's project carries its own copy of platform settings that only one of them should own.
Worked example
| File | Run mode | Status |
|---|---|---|
| projectA/.../config.publish/com.day.cq.commons.impl.ExternalizerImpl.cfg.json | publish | Duplicate |
| projectB/.../config.publish/com.day.cq.commons.impl.ExternalizerImpl.cfg.json | publish | Duplicate |
| shared-config/.../config.publish/com.day.cq.commons.impl.ExternalizerImpl.cfg.json | publish | Keep this one only |
How to fix it
- Export all .cfg.json (and legacy .config/.xml) files with their folder run modes and group by PID + run mode.
- For each duplicate, decide which value is right per environment; use environment variables in .cfg.json ($[env:NAME]) where values differ by environment.
- Move the single copy into a shared configuration project that every site depends on.
- For factory configurations, give each instance a unique name (PID~name) so they are not seen as duplicates.
Does it stop the pipeline?
A major bug lowers the Reliability Rating but stays above Adobe's D threshold, so it does not stop the pipeline by itself. It is counted under Open Issues (an info metric).
If a finding is a genuine false positive, Adobe's code quality page lets you annotate the code with @SuppressWarnings and the rule ID. In a full-stack pipeline, important failures can be overridden by a deployment manager, project manager or business lead; in a code-quality-only pipeline they cannot.
Related pages on this site
Questions
Are factory configurations affected?
Only if two packages use the same factory PID and the same instance name. Distinct ~names are separate configurations.
What about config and config.publish for the same PID?
That is allowed: the configuration with the most matching run modes wins, so config.publish overrides config on publish.
How do I keep per-environment values without duplicates?
Use one file with $[env:VAR] or $[secret:VAR] placeholders and set the values per environment in Cloud Manager.
See the Cloud Service blockers in your code before Cloud Manager shows them. The free Surge Migrate readiness scan reads a repository zip or a Best Practices Analyzer CSV in your browser and lists them with file, fix and effort. Nothing is uploaded.
Sources
- Adobe: Custom code quality rules (checked 10 Nov 2026)
- Adobe: Code quality testing in Cloud Manager (checked 10 Nov 2026)
- Adobe: Deploying to AEM as a Cloud Service (checked 10 Nov 2026)
Rule key, type, severity and version are as listed on Adobe's page, checked 10 Nov 2026. Explanations and examples are ours unless marked as Adobe's.