You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-14Lines changed: 10 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,8 @@ All of the solutions to these issues are implemented independently in different
32
32
33
33
# I want all of that. (Usage)
34
34
35
-
1. Make sure your build server sets environment variables for git branches and git URLs. The plugin defaults are configured out of the box for Jenkins & Hudson.
35
+
1. Make sure you have a your Project SCM configured for your git repository, or that your build server sets environment variables for git branches and git URLs.
36
+
Out of the box, the plugin will try to resolve the git branch based upon the SCM definition on your maven project, or fall back to the environment variables set by Jenkins and Hudson.
36
37
2. Configure the plugin goals and add the build extension to your Maven project. Here's an example that will get you going quickly...
37
38
38
39
```
@@ -53,7 +54,7 @@ All of the solutions to these issues are implemented independently in different
| gitBranchExpression | ${env.GIT_BRANCH} | n/a | Maven property expression to resolve in order to determine the current git branch |
106
+
| gitBranchExpression |current git branch resolved from SCM or ${env.GIT_BRANCH} | n/a | Maven property expression to resolve in order to determine the current git branch |
106
107
| masterBranchPattern | origin/master | No | Regex. When matched, signals the master branch is being built. Note the lack of a subgroup. |
107
108
| releaseBranchPattern | origin/release/(.*) | No | Regex. When matched, signals a release branch being built. Subgroup 1, if present, must match the Maven project version. |
108
109
| hotfixBranchPattern | origin/hotfix/(.*) | No | Regex. When matched, signals a hotfix branch is being built. Subgroup 1, if present, must match the Maven project version. |
@@ -122,7 +123,7 @@ plugins in the build process (deploy, site-deploy, etc.) will use the repositori
122
123
123
124
| Property | Default Value | Description |
124
125
| -------- | ------------- | ----------- |
125
-
| gitBranchExpression | ${env.GIT_BRANCH} | Maven property expression to resolve in order to determine the current git branch |
126
+
| gitBranchExpression |current git branch resolved from SCM or ${env.GIT_BRANCH} | Maven property expression to resolve in order to determine the current git branch |
126
127
| releaseDeploymentRepository | n/a | The repository to use for releases. (Builds with a GIT_BRANCH matching `masterBranchPattern`) |
127
128
| stageDeploymentRepository | n/a | The repository to use for staging. (Builds with a GIT_BRANCH matching `releaseBranchPattern` or `hotfixBranchPattern`|
128
129
| snapshotDeploymentRepository | n/a | The repository to use for snapshots. (Builds matching `developmentBranchPattern`|
@@ -179,21 +180,16 @@ Can be replaced with the following plugin configuration, which also introduces t
179
180
In a gitflow environment, a commit to a master branch should trigger a job to build on the master branch, which would result in the release being tagged if successful.
180
181
181
182
The `tag-master` goal executes the [maven-scm-plugin tag goal](https://maven.apache.org/scm/maven-scm-plugin/tag-mojo.html) when the
182
-
`gitBranchExpression` resolves to a value matching the `masterBranchPattern` regular expression. To determine the SCM URL to use, the `gitURLExpression`
183
-
is evaluated at run-time. The default expression, `${env.GIT_URL}`, is provided by Jenkins & Hudson.
184
-
185
-
To resolve the `<developerConnection>` in an `<scm>` block in your pom, you can specify the following in your plugin configuration:
`gitBranchExpression` resolves to a value matching the `masterBranchPattern` regular expression. To determine the SCM URL to use, the plugin looks for a
184
+
`developerConnection` or `connection` information in an SCM block, and if not found the `gitURLExpression` is evaluated at run-time.
185
+
The default expression, `${env.GIT_URL}`, is one that is commonly provided by Jenkins & Hudson.
190
186
191
187
The following properties can be configured for this goal:
| gitBranchExpression | ${env.GIT_BRANCH} | Maven property expression to resolve in order to determine the current git branch |
196
-
| gitURLExpression | ${env.GIT_URL} | Maven property expression to resolve for the GIT URL connection to use. |
191
+
| gitBranchExpression |current git branch resolved from SCM or ${env.GIT_BRANCH} | Maven property expression to resolve in order to determine the current git branch |
192
+
| gitURLExpression |current git branch resolved from SCM or ${env.GIT_URL} | Maven property expression to resolve for the GIT URL connection to use. |
197
193
| masterBranchPattern | origin/master | Regex. When matched against the resolved value of `gitBranchExpression` this plugin executes the scm:tag goal using the `gitURLExpression` to resolve the git URL to use. |
198
194
| tag | ${project.version} | An expression to use for the SCM tag. |
199
195
| tag.plugin.groupId | org.apache.maven.plugins | The groupId of the plugin to use for tagging. |
0 commit comments