scm-publish:publish-scm

Full name:

org.apache.maven.plugins:maven-scm-publish-plugin:3.2.1:publish-scm

Description:

Publish a content to scm. By default, content is taken from default site staging directory ${project.build.directory}/staging. Can be used without project, so usable to update any SCM with any content.

Attributes:

  • Executes as an aggregator plugin.
  • The goal is not marked as thread-safe and thus does not support parallel builds.

Required Parameters

Name Type Since Description
<pubScmUrl> String - Location of the scm publication tree: scm:<scm_provider><delimiter><provider_specific_part>. Example: scm:svn:https://svn.apache.org/repos/infra/websites/production/maven/content/plugins/maven-scm-publish-plugin-LATEST/
Default value is: ${project.distributionManagement.site.url}.
User property is: scmpublish.pubScmUrl.

Optional Parameters

Name Type Since Description
<addUniqueDirectory> boolean - Add each directory in a separated SCM command: this can be necessary if SCM does not support adding subdirectories in one command.
Default value is: false.
<automaticRemotePathCreation> boolean - Configure svn automatic remote url creation.
Default value is: true.
User property is: scmpublish.automaticRemotePathCreation.
<checkinComment> String - SCM log/checkin comment for this publication.
Default value is: Site checkin for project ${project.name}.
User property is: scmpublish.checkinComment.
<checkoutDirectory> File - Location where the scm check-out is done. By default, scm checkout is done in build (target) directory, which is deleted on every mvn clean. To avoid this and get better performance, configure this ___location outside build structure and set tryUpdate to true. See Improving SCM Checkout Performance for more information.
Default value is: ${project.build.directory}/scmpublish-checkout.
User property is: scmpublish.checkoutDirectory.
<content> File - The content to be published.
Default value is: ${project.build.directory}/staging.
User property is: scmpublish.content.
<dryRun> boolean - Display list of added, deleted, and changed files, but do not do any actual SCM operations.
User property is: scmpublish.dryRun.
<excludes> String - Patterns to exclude from the scm tree.
<extraNormalizeExtensions> String[] - Extra file extensions to normalize line ending (will be added to default html,css,js list)
<ignorePathsToDelete> String[] - Collections of paths not to delete when checking content to delete. If your site has subdirectories published by an other mechanism/build
<includes> String - Patterns to include in the scm tree.
<localCheckout> boolean - Use a local checkout instead of doing a checkout from the upstream repository. WARNING: This will only work with distributed SCMs which support the file:// protocol. TODO: we should think about having the defaults for the various SCM providers provided via Modello!
Default value is: false.
User property is: localCheckout.
<password> String - The SCM password to use.
User property is: password.
<providerImplementations> Map<String,String> - List of SCM provider implementations. Key is the provider type, eg. cvs. Value is the provider implementation (the role-hint of the provider), eg. cvs or cvs_native.
See also: ScmManager.setScmProviderImplementation
<scmBranch> String - SCM branch to use. For github, you must configure with gh-pages.
User property is: scmpublish.scm.branch.
<serverId> String - The serverId specified in the settings.xml, which should be used for the authentication.
<siteOutputEncoding> String - The outputEncoding parameter of the site plugin. This plugin will corrupt your site if this does not match the value used by the site plugin.
Default value is: ${project.reporting.outputEncoding}.
User property is: outputEncoding.
<skipCheckin> boolean - Run add and delete commands, but leave the actually checkin for the user to run manually.
User property is: scmpublish.skipCheckin.
<skipDeletedFiles> boolean - Do not delete files to the scm
Default value is: false.
User property is: scmpublish.skipDeletedFiles.
<skipDeployement> boolean - Deprecated. Set this to 'true' to skip site deployment.
Default value is: false.
<skipDeployment> boolean - Set this to 'true' to skip site deployment.
Default value is: false.
User property is: scmpublish.skipDeploy.
Alias is: maven.site.deploy.skip.
<subDirectory> String - Location where the content is published inside the ${checkoutDirectory}. By default, content is copyed at the root of ${checkoutDirectory}.
User property is: scmpublish.subDirectory.
<tryUpdate> boolean - If the checkout directory exists and this flag is activated, the plugin will try an SCM-update instead of delete then checkout.
Default value is: false.
User property is: scmpublish.tryUpdate.
<username> String - The SCM username to use.
User property is: username.

Parameter Details

<addUniqueDirectory>

Add each directory in a separated SCM command: this can be necessary if SCM does not support adding subdirectories in one command.
  • Type: boolean
  • Required: No
  • Default: false

<automaticRemotePathCreation>

Configure svn automatic remote url creation.
  • Type: boolean
  • Required: No
  • User Property: scmpublish.automaticRemotePathCreation
  • Default: true

<checkinComment>

SCM log/checkin comment for this publication.
  • Type: java.lang.String
  • Required: No
  • User Property: scmpublish.checkinComment
  • Default: Site checkin for project ${project.name}

<checkoutDirectory>

Location where the scm check-out is done. By default, scm checkout is done in build (target) directory, which is deleted on every mvn clean. To avoid this and get better performance, configure this ___location outside build structure and set tryUpdate to true. See Improving SCM Checkout Performance for more information.
  • Type: java.io.File
  • Required: No
  • User Property: scmpublish.checkoutDirectory
  • Default: ${project.build.directory}/scmpublish-checkout

<content>

The content to be published.
  • Type: java.io.File
  • Required: No
  • User Property: scmpublish.content
  • Default: ${project.build.directory}/staging

<dryRun>

Display list of added, deleted, and changed files, but do not do any actual SCM operations.
  • Type: boolean
  • Required: No
  • User Property: scmpublish.dryRun

<excludes>

Patterns to exclude from the scm tree.
  • Type: java.lang.String
  • Required: No

<extraNormalizeExtensions>

Extra file extensions to normalize line ending (will be added to default html,css,js list)
  • Type: java.lang.String[]
  • Required: No

<ignorePathsToDelete>

Collections of paths not to delete when checking content to delete. If your site has subdirectories published by an other mechanism/build
  • Type: java.lang.String[]
  • Required: No

<includes>

Patterns to include in the scm tree.
  • Type: java.lang.String
  • Required: No

<localCheckout>

Use a local checkout instead of doing a checkout from the upstream repository. WARNING: This will only work with distributed SCMs which support the file:// protocol. TODO: we should think about having the defaults for the various SCM providers provided via Modello!
  • Type: boolean
  • Required: No
  • User Property: localCheckout
  • Default: false

<password>

The SCM password to use.
  • Type: java.lang.String
  • Required: No
  • User Property: password

<providerImplementations>

List of SCM provider implementations. Key is the provider type, eg. cvs. Value is the provider implementation (the role-hint of the provider), eg. cvs or cvs_native.
See also: ScmManager.setScmProviderImplementation
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Required: No

<pubScmUrl>

Location of the scm publication tree: scm:<scm_provider><delimiter><provider_specific_part>. Example: scm:svn:https://svn.apache.org/repos/infra/websites/production/maven/content/plugins/maven-scm-publish-plugin-LATEST/
  • Type: java.lang.String
  • Required: Yes
  • User Property: scmpublish.pubScmUrl
  • Default: ${project.distributionManagement.site.url}

<scmBranch>

SCM branch to use. For github, you must configure with gh-pages.
  • Type: java.lang.String
  • Required: No
  • User Property: scmpublish.scm.branch

<serverId>

The serverId specified in the settings.xml, which should be used for the authentication.
  • Type: java.lang.String
  • Required: No

<siteOutputEncoding>

The outputEncoding parameter of the site plugin. This plugin will corrupt your site if this does not match the value used by the site plugin.
  • Type: java.lang.String
  • Required: No
  • User Property: outputEncoding
  • Default: ${project.reporting.outputEncoding}

<skipCheckin>

Run add and delete commands, but leave the actually checkin for the user to run manually.
  • Type: boolean
  • Required: No
  • User Property: scmpublish.skipCheckin

<skipDeletedFiles>

Do not delete files to the scm
  • Type: boolean
  • Required: No
  • User Property: scmpublish.skipDeletedFiles
  • Default: false

<skipDeployement>

Deprecated. Please use skipDeployment.
Set this to 'true' to skip site deployment.
  • Type: boolean
  • Required: No
  • Default: false

<skipDeployment>

Set this to 'true' to skip site deployment.
  • Type: boolean
  • Required: No
  • User Property: scmpublish.skipDeploy
  • Default: false
  • Alias: maven.site.deploy.skip

<subDirectory>

Location where the content is published inside the ${checkoutDirectory}. By default, content is copyed at the root of ${checkoutDirectory}.
  • Type: java.lang.String
  • Required: No
  • User Property: scmpublish.subDirectory

<tryUpdate>

If the checkout directory exists and this flag is activated, the plugin will try an SCM-update instead of delete then checkout.
  • Type: boolean
  • Required: No
  • User Property: scmpublish.tryUpdate
  • Default: false

<username>

The SCM username to use.
  • Type: java.lang.String
  • Required: No
  • User Property: username