Common structure of pom.xml files
Change Type:
- 
Feature  - 
Bugfix  - 
Refactoring  
Context and Scope
Currently we have several issue with current common structure of pom.xml files:
- It contain direct dependency on Community GitLab - making it hard to run build pipelines from isolated perimeters:
 
<repository>
  <id>${gitlab-server}</id>
  <url>https://community.opengroup.org/api/v4/projects/118/packages/maven</url>
</repository>
- Child pom files duplicate 
<repositories>and<distributionManagement>sections of the pom. 
Please see Delivery service as an example of the service that already use this approach.
Decision
- Introduce common naming convention for Git repos variables:
 
- 
repo.releases.id- source repo for release version of maven dependencies - 
repo.snapshot.id- source repo for snapshot version of maven dependencies - 
publish.releases.id- target repo for publishing of release version of artifacts - 
publish.snapshot.id- target repo for publishing of snapshot version of artifacts - etc
 
- 
Community configuration will be available for each module in
.mvn/community-maven.settings.xml. - 
There will be profiles both for local development and for GitLab CICD
 - 
For
community-maven.settings.xmlthere will be a Default profile to work with Community, so developers could use:mvn clean compile -s .mvn/community-maven.settings.xmlon local environment. - 
Information about community profiles and configuration of Local environment will be documented.
 - 
Remove duplication of
repositoriesanddistributionManagementin child projects and move them to parent POMs 
Rational
- This will remove dependency of code on OSDU infrastructure and will allow to build with operator specific Maven configurations
 - Remove code duplication
 
Consequences
- Developers should be aware of changes and configure their Local environments
 - 
.mvn/community-maven.settings.xmlshould be applied for CICDs outside of Community GitLab. 
Edited  by Dmitriy Rudko