Skip to content

Commit

Permalink
Merge pull request #132 from alainsahli/pr/aloren/feature/add-ability…
Browse files Browse the repository at this point in the history
…-to-skip-execution
  • Loading branch information
cstettler committed Feb 26, 2019
2 parents 08e214b + f73eac2 commit 760e9b0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions asciidoc-confluence-publisher-doc/etc/docs/00-index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ remove all orphaned pages (requires the documentation source structure to contai
Note: in order to preserve leading or trailing spaces in the page title suffix, the attribute `xml:space="preserve"`
has to be added to the `pageTitleSuffix` element.
| optional (defaults to empty)

| skip
| Defines whether the plugin execution should be skipped.
| optional (defaults to false, only supported for Maven plugin)
|===

As usually with Maven, configuration properties can either be defined directly in the Confluence Publisher maven plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,16 @@ public class AsciidocConfluencePublisherMojo extends AbstractMojo {
@Parameter
private String pageTitleSuffix;

@SuppressWarnings("ResultOfMethodCallIgnored")
@Parameter(defaultValue = "false")
private boolean skip;

@Override
public void execute() throws MojoExecutionException {
if (this.skip) {
getLog().info("Publishing to Confluence skipped");
return;
}

try {
PageTitlePostProcessor pageTitlePostProcessor = new PrefixAndSuffixPageTitlePostProcessor(this.pageTitlePrefix, this.pageTitleSuffix);

Expand Down

0 comments on commit 760e9b0

Please sign in to comment.