public abstract class AbstractScmPublishMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
protected boolean |
addUniqueDirectory
Add each directory in a separated SCM command: this can be necessary if SCM does not support
adding subdirectories in one command.
|
protected boolean |
automaticRemotePathCreation
Configure svn automatic remote url creation.
|
protected File |
basedir |
protected File |
checkoutDirectory
Location where the scm check-out is done.
|
protected String |
excludes
Patterns to exclude from the scm tree.
|
protected String[] |
extraNormalizeExtensions
Extra file extensions to normalize line ending (will be added to default
html ,css ,js list) |
protected String[] |
ignorePathsToDelete
Collections of paths not to delete when checking content to delete.
|
protected String |
includes
Patterns to include in the scm tree.
|
protected boolean |
localCheckout
Use a local checkout instead of doing a checkout from the upstream repository.
|
protected String |
password
The SCM password to use.
|
protected String |
pubScmUrl
Location of the scm publication tree:
scm:<scm_provider><delimiter><provider_specific_part> . |
protected String |
scmBranch
SCM branch to use.
|
protected org.apache.maven.scm.provider.ScmProvider |
scmProvider |
protected org.apache.maven.scm.repository.ScmRepository |
scmRepository |
protected org.apache.maven.shared.release.scm.ScmRepositoryConfigurator |
scmRepositoryConfigurator
Tool that gets a configured SCM repository from release configuration.
|
protected org.apache.maven.settings.Settings |
settings |
protected String |
siteOutputEncoding
The outputEncoding parameter of the site plugin.
|
protected boolean |
skipDeletedFiles
Do not delete files to the scm
|
protected String |
subDirectory
Location where the content is published inside the
${checkoutDirectory} . |
protected boolean |
tryUpdate
If the checkout directory exists and this flag is activated, the plugin will try an SCM-update instead
of delete then checkout.
|
protected String |
username
The SCM username to use.
|
Constructor and Description |
---|
AbstractScmPublishMojo() |
Modifier and Type | Method and Description |
---|---|
protected void |
addFiles(Collection<File> added)
Add files to scm.
|
protected void |
checkinFiles()
Check-in content from scm checkout.
|
protected void |
checkoutExisting() |
protected void |
deleteFiles(Collection<File> deleted) |
void |
execute() |
boolean |
isDryRun() |
protected void |
logError(String format,
Object... params) |
protected void |
logInfo(String format,
Object... params) |
protected void |
logWarn(String format,
Object... params) |
protected boolean |
requireNormalizeNewlines(File f) |
abstract void |
scmPublishExecute() |
void |
setPubScmUrl(String pubScmUrl) |
@Parameter(property="scmpublish.pubScmUrl", defaultValue="${project.distributionManagement.site.url}", required=true) protected String pubScmUrl
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/
@Parameter(property="scmpublish.tryUpdate", defaultValue="false") protected boolean tryUpdate
@Parameter(property="scmpublish.checkoutDirectory", defaultValue="${project.build.directory}/scmpublish-checkout") protected File checkoutDirectory
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.@Parameter(property="scmpublish.subDirectory") protected String subDirectory
${checkoutDirectory}
.
By default, content is copyed at the root of ${checkoutDirectory}
.@Parameter protected String excludes
@Parameter protected String includes
@Component protected org.apache.maven.shared.release.scm.ScmRepositoryConfigurator scmRepositoryConfigurator
@Parameter(property="username") protected String username
serverId
.serverId
@Parameter(property="password") protected String password
serverId
.serverId
@Parameter(property="localCheckout", defaultValue="false") protected boolean localCheckout
@Parameter(property="outputEncoding", defaultValue="${project.reporting.outputEncoding}") protected String siteOutputEncoding
@Parameter(property="scmpublish.skipDeletedFiles", defaultValue="false") protected boolean skipDeletedFiles
@Parameter(defaultValue="false") protected boolean addUniqueDirectory
@Parameter(defaultValue="${basedir}", readonly=true) protected File basedir
@Parameter(defaultValue="${settings}", readonly=true, required=true) protected org.apache.maven.settings.Settings settings
@Parameter protected String[] ignorePathsToDelete
@Parameter(property="scmpublish.scm.branch") protected String scmBranch
gh-pages
.@Parameter(property="scmpublish.automaticRemotePathCreation", defaultValue="true") protected boolean automaticRemotePathCreation
@Parameter protected String[] extraNormalizeExtensions
html
,css
,js
list)protected org.apache.maven.scm.provider.ScmProvider scmProvider
protected org.apache.maven.scm.repository.ScmRepository scmRepository
protected boolean requireNormalizeNewlines(File f) throws IOException
IOException
protected void checkoutExisting() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected void checkinFiles() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
- in case of issueprotected void deleteFiles(Collection<File> deleted) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void addFiles(Collection<File> added) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
added
- files to be addedorg.apache.maven.plugin.MojoFailureException
- in case of issueorg.apache.maven.plugin.MojoExecutionException
- in case of issuepublic boolean isDryRun()
public abstract void scmPublishExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
public void setPubScmUrl(String pubScmUrl)
Copyright © 2002–2024 The Apache Software Foundation. All rights reserved.