{"id":28963773,"url":"https://github.com/crowdcode-de/maven-bgav-plugin","last_synced_at":"2025-06-24T04:12:36.363Z","repository":{"id":52434030,"uuid":"210790864","full_name":"crowdcode-de/maven-bgav-plugin","owner":"crowdcode-de","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-18T19:20:57.000Z","size":195,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":6,"default_branch":"develop","last_synced_at":"2024-04-16T11:05:51.856Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crowdcode-de.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-25T08:11:28.000Z","updated_at":"2023-03-24T08:00:05.000Z","dependencies_parsed_at":"2022-08-19T03:42:13.267Z","dependency_job_id":null,"html_url":"https://github.com/crowdcode-de/maven-bgav-plugin","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/crowdcode-de/maven-bgav-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdcode-de%2Fmaven-bgav-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdcode-de%2Fmaven-bgav-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdcode-de%2Fmaven-bgav-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdcode-de%2Fmaven-bgav-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crowdcode-de","download_url":"https://codeload.github.com/crowdcode-de/maven-bgav-plugin/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdcode-de%2Fmaven-bgav-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261601533,"owners_count":23183099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-24T04:12:35.808Z","updated_at":"2025-06-24T04:12:36.338Z","avatar_url":"https://github.com/crowdcode-de.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maven BGAV Plugin\n\n\n## Overview\n\nMaven plugin for adding ticket id to POM Version, if Git branch is feature, bugfix or hotfix\n\n\n## Requirements\n\nJDK 8+\n\n\n## Installation\n\nFor local build you have to add the Maven BGAV Plugin to your project POM.\nIf you want to use with Jenkins, just add it your Jenkinsfile, tested on Jenkins with multi pipelines.\n\n*Note:* Jenkins Git plugin checks out with the last commit id, make sure Jenkins is using this command: git checkout ${env.BRANCH_NAME}\n\n### for local build\n\n```java\n  \u003cbuild\u003e\n    \u003cplugins\u003e\n      \u003cplugin\u003e\n        \u003cgroupId\u003eio.crowdcode\u003c/groupId\u003e\n        \u003cartifactId\u003ebgav-maven-plugin\u003c/artifactId\u003e\n        \u003cversion\u003e1.2.0\u003c/version\u003e\n        \u003cexecutions\u003e\n          \u003cexecution\u003e\n            \u003cphase\u003ecompile\u003c/phase\u003e\n            \u003cgoals\u003e\n              \u003cgoal\u003ebgav\u003c/goal\u003e\n            \u003c/goals\u003e\n          \u003c/execution\u003e\n        \u003c/executions\u003e\n        \u003cconfiguration\u003e\n          \u003cregex_ticket\u003e(\\p{Upper}{1,}-\\d{1,})\u003c/regex_ticket\u003e\n          \u003cgituser\u003egituser\u003c/gituser\u003e\n          \u003cgitpassword\u003egitpassword\u003c/gitpassword\u003e\n          \u003cnamespace\u003eyour.groupid.namespace\u003c/namespace\u003e\n        \u003c/configuration\u003e\n      \u003c/plugin\u003e\n    \u003c/plugins\u003e\n  \u003c/build\u003e\n```\n\n### for Jenkins\n\n```java\npipeline {\n    agent { label 'jenkins-jdk11' }\n    stages {\n        stage('checkout') {\n            steps {\n                echo 'Pulling...' + env.BRANCH_NAME\n                checkout scm\n            }\n        }\n        stage('Prepare') {\n           steps {\n                withCredentials(\n                        [usernamePassword(credentialsId: 'crowdcodeBitbucket',\n                                usernameVariable: 'gitUser',\n                                passwordVariable: 'gitPwd'\n                        )]) {\n                sh \"git status\"\n                sh \"git checkout ${env.BRANCH_NAME}\"\n                mvn(\"-DfailOnAlteredPom=false -DbranchName=${env.BRANCH_NAME} -Dgituser=${gituser} -D=gitpassword=${gitPwd} io.crowdcode:bgav-maven-plugin:1.2.0:bgav\")\n                }\n           }\n        }\n        stage('Build') {\n           steps {  mvn(\"clean install -DskipTests=true\") }\n        }\n        stage('Unit tests') {\n           steps { mvn(\"test -P-checks,test-coverage -Dskip.unit.tests=false -Dskip.integration.tests=true\") }\n        }\n        stage('Integration tests') {\n           steps { mvn(\"verify -P-checks,test-coverage -Dskip.unit.tests=true -Dskip.integration.tests=false\") }\n        }\n        stage('Deploy') {\n           steps { mvn(\"deploy -P-checks -DskipTests=true \") }\n        }\n    }\n}\ndef mvn(param) {\n  withMaven(\n      mavenOpts: '-Xmx1536m -Xms512m',\n      mavenSettingsConfig: 'crowdcode-maven-settings',\n      maven: 'maven-3.6.0') {\n    sh \"mvn -U -B -e ${param}\"\n  }\n}\n```\n\n\n## Usage\n\nmvn -Dgituser=xxxx -D=gitpassword=yyyy io.crowdcode:bgav-maven-plugin:bgav\n\n## Parameters\n\n- gituser, Git user\n- gitpassword, Git password\n- regex_ticket, RegEx for getting the ticket id\n- regex_branch, RegEx for getting the branch\n- (DEPRECATED) failOnMissingBranchId, flag for fail on Jenkins if missing branch id, default true, set for Jenkins build to false, -DfailOnMissingBranchId=false\n- failOnAlteredPom, flag to fail the build if the pom has been modified, commited and pushed by the plugin\n- branchName, for setting branch name in Jenkins\n- namespace, a list of groupIds which shall be regarded when the plugin is walking through the dependencies. Normally this \n  should be the groupIds of your own modules, e.g. com.yourcompany\n- pomFile - if your target pom is not pom.xml, you can override the pom.xml filename \n- suppressCommit - with suppress a commit after modifying the pom (only useful on development)\n- suppressCommit - with suppress a commit after modifying the pom (only useful on development)\n- suppressPush - do not push the changes. This can be useful, if the push is handled by the caller (e.g. Jenkinsfile)   \n\n## Author\n\nAndreas Ernst, andreas.ernst@crowdcode.io\n\nMarcus Nörder-Tuitje, marcus.noerder-tuitje@crowdcode.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrowdcode-de%2Fmaven-bgav-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrowdcode-de%2Fmaven-bgav-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrowdcode-de%2Fmaven-bgav-plugin/lists"}