ADR-035: Azure-Only Maven Profile Restriction
Context
- Forked OSDU services carry multiple cloud-provider Maven profiles (Azure, AWS, IBM, GC), built via the standard Java/Maven architecture (ADR-025). Only Azure is relevant to SPI work — the profile is the CSP selector, and SPI is permanently Azure-only.
- Building and unit-testing the non-Azure profiles in every SPI CI run is wasted CPU and irrelevant signal.
- Surveying all ten service forks shows a near-uniform layout: no default
<modules>, acoreprofile markedactiveByDefault(the*-core/*-core-plusmodules), and one profile per provider (azure→provider/<svc>-azure). Maven deactivates anactiveByDefaultprofile the moment any explicit-Pis passed, so-P azurealone silently dropscore, and the Azure module then fails to resolve<svc>-core:<revision>-SNAPSHOT. The Azure build therefore requires-P core,azure, not a bare provider profile. - Two forks deviate:
entitlementsbuilds atprovider/entitlements-v2-azure, andindexer-queuehas no provider profiles at all (providers live in the default<modules>, with two Azure deployables). A per-fork override is needed for these.
Decision
- CI builds the Azure profile set with a hardcoded engineering-system default of
core,azure— correct for nine of the ten forks and not requiring any per-fork configuration. MAVEN_PROFILEremains a per-service repository variable, but optional: when set it overrides the default (the workflow passes${{ vars.MAVEN_PROFILE || 'core,azure' }}); when unset CI usescore,azure. The override exists for forks whose profile shape differs (e.g.indexer-queue).- The build always passes a non-empty
-Pvalue; it never emits a bare-P. (Earlier this ADR specified "unset = no profile filter"; that is superseded — for these profile-gated poms an unfiltered build produces no provider JAR, so a real default is both simpler and more correct.)
Consequences
- Positive
- Faster, cheaper CI (~3–5× fewer modules built) for Azure SPI service repositories.
- Unit-test results are 100% Azure-relevant.
- Zero per-fork configuration for the common case: nine of ten forks build correctly on the
core,azuredefault with no variable set. - The optional
MAVEN_PROFILEoverride handles deviant forks without a template edit + sync. - Negative
- Lost signal on whether upstream changes break other providers (AWS/IBM/GC) — acceptable since SPI does not ship those.
- The
core,azuredefault assumes the common pom layout; a fork that deviates (e.g.indexer-queue) silently builds the wrong module set unless itsMAVEN_PROFILEoverride is set — caught on the fork's first build. - Neutral
- Cross-provider validation, when needed, is handled outside this default CI path.
Alternatives Considered
- Continue building all provider profiles in every CI run — rejected: higher runtime/cost and low relevance to Azure-focused delivery.