| <!--- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you 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. |
| --> |
| |
| maven-scm-provider-jgit |
| === |
| |
| This scm provider implementation allows the usage of git with the release and scm plugin without having to install a native git client. |
| This implementation can use both username and password, or public/private keys to authenticate the requests to a remote |
| repository like GitHub. At the moment, public/private keys are only supported for SSH access. |
| |
| Configuration |
| --- |
| |
| Usage with the `maven-release-plugin` |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-release-plugin</artifactId> |
| <version>2.3</version> |
| <configuration> |
| <providerImplementations> |
| <git>jgit</git> |
| </providerImplementations> |
| </configuration> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.maven.scm</groupId> |
| <artifactId>maven-scm-provider-jgit</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| </dependencies> |
| </plugin> |
| |
| Usage with the `maven-scm-plugin` |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-scm-plugin</artifactId> |
| <version>${project.version}</version> |
| <configuration> |
| <providerImplementations> |
| <git>jgit</git> |
| </providerImplementations> |
| </configuration> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.maven.scm</groupId> |
| <artifactId>maven-scm-provider-jgit</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| </dependencies> |
| </plugin> |
| |
| Public/private key configuration in settings.xml - for use with ssh URLs like ssh://git@github.com/apache/maven-scm |
| |
| <servers> |
| <server> |
| <id>git@github.com</id> |
| <privateKey>path/to/private/key</privateKey> |
| <passphrase>private key passphrase</passphrase> |
| </server> |
| <server> |
| |
| Examples |
| ____ |
| |
| changelog |
| |
| mvn org.apache.maven.plugins:maven-scm-plugin:${project.version}:changelog |
| |
| release |
| |
| mvn release:prepare release:perform -Dresume=false -Dusername=XXX -Dpassword=XXX |
| |
| |
| Committer / Author |
| ____ |
| |
| The jgit provider per default uses the information of the "user" section in the .gitconfig. If you explicitly configure a user there, this user will be used as author and committer. |
| If you don't define a user in the .gitconfig, then the user passed as "username" with the maven execution is used. The email per default will be 'username'@hostname. If you don't like |
| the hostname to be used as the domain. you can configure a default domain in the .gitconfig as follows: |
| |
| git config --global maven-scm.maildomain mycomp.com |
| |
| You can also enforce the usage of the "username" for the author and committer (omit the default in the .gitconfig): |
| |
| git config --global maven-scm.forceUsername true |
| |
| |
| |
| |
| Features |
| --- |
| |
| this is a brief list of the supported maven-scm-provider-jgit's integration status with regard to some core maven plugins |
| |
| |
| maven-scm-plugin |
| --- |
| |
| | goal | implemented?| |
| | ------------- |:-------------:| |
| | scm:list | yes | |
| | scm:tag | yes | |
| | scm:bootstrap | no | |
| | scm:export | no | |
| | scm:update | no | |
| | scm:status | yes | |
| | scm:edit | no | |
| | scm:changelog | yes | |
| | scm:add | yes | |
| | scm:unedit | no | |
| | scm:validate | yes | |
| | scm:branch | yes | |
| | scm:checkin | yes | |
| | scm:checkout | yes | |
| | scm:diff | yes | |
| | scm:blame | yes | |
| | scm:remoteinfo | yes | |
| |
| maven-release-plugin |
| --- |
| |
| | goal | implemented?| |
| | ------------- |:-------------:| |
| | release:clean | yes | |
| | release:prepare | yes | |
| | release:rollback | no | |
| | release:perform | yes | |
| | release:stage | no | |
| | release:branch | yes | |