Collection of Maven plugins that integrate with GitHub. These plugins are built on top of API v3 through the GitHub Java library.
Released builds are available from Maven Central.
The plugins support several configuration options that can either be expressed
in your project's POM file or in your settings.xml
file. Where you put the
plugin settings depends on whether you want a specific setting to be configured
globally or on a per-project basis.
All GitHub Maven plugins support the following core configuration elements.
The notation below shows the plugin configuration property name followed by the settings configuration property in parentheses.
host
(github.global.host
)
api.github.com
)oauth2Token
(github.global.oauth2Token
)
userName
(github.global.userName
)
password
(github.global.password
)
server
(github.global.server
)
server
element from the settings.xml
. To use standard authentication
set the username
and password
elements in the servers
section of your
settings.xml
file along with an id
. Configure an OAuth2 token by leaving the
username
element blank/missing and just specify the token in the password
element.userName
, password
or oauth2Token
in the plugin configuration
element or as a properties.repositoryName
repositoryOwner
Note: repositoryOwner
property and repositoryName
are optional and will be
inferred from the following properties if not specified
project.scm.url
project.scm.connection
project.scm.developerConnection
project.url
<servers>
<server>
<id>github</id>
<username>GitHubLogin</username>
<password>GitHubPassw0rd</password>
</server>
</servers>
or
<servers>
<server>
<id>github</id>
<password>OAUTH2TOKEN</password>
</server>
</servers>
<properties>
<github.global.server>github</github.global.server>
</properties>
Maven plugin that commits files generated and updates a specific branch
reference in a GitHub repository. This plugin can be used to deploy a created
Maven site to a gh-pages
branch so that it can be served statically as a
GitHub Project Page. The plugin has a site
goal and is configured with a goal
prefix of ghSite
.
branch
refs/heads/gh-pages
message
outputDirectory
siteOutputDirectory
or project.reporting.outputDirectory
includes
outputDirectory
excludes
outputDirectory
path
force
(github.site.force
)
true
| false
(default: false
)merge
(github.site.merge
)
true
| false
(default: false
)dryRun
(github.site.dryRun
)
true
| false
(default: false
)noJekyll
(github.site.noJekyll
)
true
| false
(default: false
).nojekyll
file at the root of the site if one
doesn't already exist. This setting should be enabled if your site contains
any folders that begin with an underscore.<build>
<plugins>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.12</version>
<configuration>
<message>Creating site for ${project.version}</message>
</configuration>
<executions>
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>site</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
To commit a created site run the following command:
$ mvn site