diff --git a/pom.xml b/pom.xml index 8e1d14671cf55d06d20b0ad5b5141fdfeab4fa5f..aac23418d9449f7faa0eabd2d439e00660baa74e 100644 --- a/pom.xml +++ b/pom.xml @@ -189,9 +189,9 @@ <plugins> <plugin> - <groupId>pl.project13.maven</groupId> - <artifactId>git-commit-id-plugin</artifactId> - <version>4.0.5</version> + <groupId>io.github.git-commit-id</groupId> + <artifactId>git-commit-id-maven-plugin</artifactId> + <version>8.0.2</version> <executions> <execution> <goals> diff --git a/provider/legal-aws/build-aws/buildspec.yaml b/provider/legal-aws/build-aws/buildspec.yaml index b5ff249efb3759bbcf20e1d361a8d8dcffdf0cea..1c66e4dbc3fa55f6b8340cc8ab417f46dd49f0d7 100644 --- a/provider/legal-aws/build-aws/buildspec.yaml +++ b/provider/legal-aws/build-aws/buildspec.yaml @@ -36,9 +36,7 @@ phases: # - mvn -B clean # .m2 is not created until the first Maven command - echo $JAVA_HOME #WHY - mkdir -p /root/.m2 - - cp ./provider/legal-aws/maven/settings.xml /root/.m2/settings.xml # copy the AWS-specific settings.xml to the CodeBuild instance's .m2 folder - - export AWS_ACCOUNT_ID=`aws sts get-caller-identity | grep Account | cut -d':' -f 2 | cut -d'"' -f 2` - - export AWS_OSDU_DEV_MAVEN_AUTH_TOKEN=`aws codeartifact get-authorization-token --domain $AWS_OSDU_DEV_MAVEN_DOMAIN --domain-owner $AWS_ACCOUNT_ID --query authorizationToken --output text` + - cp ./.mvn/community-maven.settings.xml /root/.m2/settings.xml # Install git secrets - git clone https://github.com/awslabs/git-secrets.git - cd git-secrets && make install && cd .. @@ -69,7 +67,7 @@ phases: - echo "Building primary service assemblies..." - mvn -ntp -B test install -pl .,legal-core,provider/legal-aws -Ddeployment.environment=prod - - mvn sonar:sonar -pl .,provider/legal-aws -Dsonar.login=${SONAR_USERNAME} -Dsonar.password=${SONAR_PASSWORD} -Dsonar.branch.name=${BRANCH_NAME} + - mvn sonar:sonar -pl .,provider/legal-aws -Dsonar.login=${SONAR_USERNAME} -Dsonar.password=${SONAR_PASSWORD} -Dsonar.branch.name=${BRANCH_NAME} -Dsonar.host.url=${SONAR_URL} - echo "Building integration testing assemblies and gathering artifacts..." - ./testing/legal-test-aws/build-aws/prepare-dist.sh diff --git a/provider/legal-aws/maven/settings.xml b/provider/legal-aws/maven/settings.xml deleted file mode 100644 index 2236ea5de89bdee61b20327c1bf9eb27d4274eed..0000000000000000000000000000000000000000 --- a/provider/legal-aws/maven/settings.xml +++ /dev/null @@ -1,90 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright © 2020 Amazon Web Services - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> - - <profiles> - <profile> - <id>aws-osdu-dev-maven</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <repositories> - <repository> - <id>aws-osdu-dev-maven</id> - <url>${env.AWS_OSDU_DEV_MAVEN_URL}</url> - </repository> - <repository> - <id>gitlab-os-core-common-maven</id> - <url>https://community.opengroup.org/api/v4/projects/67/packages/maven</url> - </repository> - <repository> - <id>gitlab-os-core-lib-aws-maven</id> - <url>https://community.opengroup.org/api/v4/projects/68/packages/maven</url> - </repository> - </repositories> - </profile> - <profile> - <id>credentialsConfiguration</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <properties> - <deployment.environment>dev</deployment.environment> - <aws.accessKeyId>no-default</aws.accessKeyId> - <aws.secretKey>no-default</aws.secretKey> - <azure.devops.username>Another-Access-Token-2021</azure.devops.username> - <azure.devops.token>no-default</azure.devops.token> - </properties> - </profile> - <profile> - <id>sonar</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <properties> - <sonar.host.url> - ${env.SONAR_URL} - </sonar.host.url> - </properties> - </profile> - </profiles> - - <servers> - <server> - <id>aws-osdu-dev-maven</id> - <username>aws</username> - <password>${env.AWS_OSDU_DEV_MAVEN_AUTH_TOKEN}</password> - </server> - </servers> - - <mirrors> - <mirror> - <id>aws-osdu-dev-maven</id> - <name>aws-osdu-dev-maven</name> - <url>https://osdu-dev-${AWS_ACCOUNT_ID}.d.codeartifact.us-east-1.amazonaws.com/maven/osdu-maven/</url> - <mirrorOf>central,!gitlab-os-core-common-maven,!gitlab-os-core-lib-aws-maven</mirrorOf> - </mirror> - </mirrors> - - <activeProfiles> - <activeProfile>credentialsConfiguration</activeProfile> - </activeProfiles> - -</settings> \ No newline at end of file