diff --git a/.github/workflows/new-module-verification.yml b/.github/workflows/new-module-verification.yml index 26465313c9a..74f13b3fd90 100644 --- a/.github/workflows/new-module-verification.yml +++ b/.github/workflows/new-module-verification.yml @@ -129,7 +129,7 @@ jobs: fi # 2. Check if added to tests-coverage-reporting pom.xml - if ! grep -q ".*$MODULE_NAME" test/tests-coverage-reporting/pom.xml 2>/dev/null; then + if ! grep -q "$MODULE_NAME" test/tests-coverage-reporting/pom.xml 2>/dev/null; then echo "::error::Module $MODULE_NAME is not added to tests-coverage-reporting pom.xml" HAS_ERRORS=1 else @@ -137,7 +137,7 @@ jobs: fi # 3. Check if added to aws-sdk-java pom.xml - if ! grep -q ".*$MODULE_NAME" aws-sdk-java/pom.xml 2>/dev/null; then + if ! grep -q "$MODULE_NAME" aws-sdk-java/pom.xml 2>/dev/null; then echo "::error::Module $MODULE_NAME is not added to aws-sdk-java pom.xml" HAS_ERRORS=1 else @@ -145,7 +145,7 @@ jobs: fi # 4. Check if added to architecture-tests pom.xml - if ! grep -q ".*$MODULE_NAME" test/architecture-tests/pom.xml 2>/dev/null; then + if ! grep -q "$MODULE_NAME" test/architecture-tests/pom.xml 2>/dev/null; then echo "::error::Module $MODULE_NAME is not added to architecture-tests pom.xml" HAS_ERRORS=1 else @@ -176,6 +176,31 @@ jobs: else echo "✅ Package name mapping is added in .brazil.json" fi + + # 8. Maven Central validation - Check for required tags + echo "Verifying Maven Central requirements..." + + if ! grep -q "" "$POM_FILE" 2>/dev/null; then + echo "::error::Maven Central validation: tag is missing in $POM_FILE" + HAS_ERRORS=1 + else + echo "✅ Maven Central validation: tag is present" + fi + + if ! grep -q "" "$POM_FILE" 2>/dev/null; then + echo "::error::Maven Central validation: tag is missing in $POM_FILE" + HAS_ERRORS=1 + else + echo "✅ Maven Central validation: tag is present" + fi + + if ! grep -q "" "$POM_FILE" 2>/dev/null; then + echo "::error::Maven Central validation: tag is missing in $POM_FILE" + HAS_ERRORS=1 + else + echo "✅ Maven Central validation: tag is present" + fi + echo "::endgroup::" fi done