public abstract class AbstractScmPublishMojo extends AbstractMojo
Modifier and Type | Field and Description |
---|---|
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 ScmProvider |
scmProvider |
protected ScmRepository |
scmRepository |
protected ScmRepositoryConfigurator |
scmRepositoryConfigurator
Tool that gets a configured SCM repository from release configuration.
|
protected Settings |
settings |
protected String |
siteOutputEncoding
The outputEncoding parameter of the site plugin.
|
protected boolean |
skipDeletedFiles
Do not delete files to the scm
|
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) |
getLog, getPluginContext, setLog, setPluginContext
@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 protected String excludes
@Parameter protected String includes
@Component protected ScmRepositoryConfigurator scmRepositoryConfigurator
@Parameter(property="username") protected String username
@Parameter(property="password") protected String password
@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="${basedir}", readonly=true) protected File basedir
@Component protected 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 ScmProvider scmProvider
protected ScmRepository scmRepository
protected boolean requireNormalizeNewlines(File f) throws IOException
IOException
protected void checkoutExisting() throws MojoExecutionException
MojoExecutionException
public void execute() throws MojoExecutionException, MojoFailureException
protected void checkinFiles() throws MojoExecutionException
MojoExecutionException
protected void deleteFiles(Collection<File> deleted) throws MojoExecutionException
MojoExecutionException
protected void addFiles(Collection<File> added) throws MojoFailureException, MojoExecutionException
added
- files to be addedMojoFailureException
MojoExecutionException
public boolean isDryRun()
public abstract void scmPublishExecute() throws MojoExecutionException, MojoFailureException
public void setPubScmUrl(String pubScmUrl)
Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.