Skip to content

Commit

Permalink
Merge 11ee798 into 1b3019b
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloren committed Feb 26, 2019
2 parents 1b3019b + 11ee798 commit 47c77af
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions asciidoc-confluence-publisher-doc/etc/docs/00-index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ The Confluence Publisher is configured with the help of a Maven plugin. A typica
| The documentation root folder with the AsciiDoc file structure.
| mandatory

| skip
| Defines whether execution of plugin should be skipped.
| optional (defaults to false)

| sourceEncoding
| The encoding of the AsciiDoc files.
| optional (defaults to UTF-8)
Expand Down Expand Up @@ -245,6 +249,7 @@ docker run --rm -e ROOT_CONFLUENCE_URL=http://confluence-host \
-e PAGE_TITLE_SUFFIX=" (V 1.0)" \
-e PUBLISHING_STRATEGY=REPLACE_ANCESTOR \
-e VERSION_MESSAGE=V 1.0 \
-e SKIP=false \
-v /absolute/path/to/asciidoc-root-folder:/var/asciidoc-root-folder \
confluencepublisher/confluence-publisher:0.0.0-SNAPSHOT
----
4 changes: 3 additions & 1 deletion asciidoc-confluence-publisher-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ ENV SOURCE_ENCODING="" \
PAGE_TITLE_PREFIX="" \
PAGE_TITLE_SUFFIX="" \
PUBLISHING_STRATEGY="" \
VERSION_MESSAGE=""
VERSION_MESSAGE="" \
SKIP=""

ENTRYPOINT ["sh", "-c", "java -jar /opt/asciidoc-confluence-publisher-docker.jar \
\"asciidocRootFolder=/var/asciidoc-root-folder\" \
Expand All @@ -29,4 +30,5 @@ ENTRYPOINT ["sh", "-c", "java -jar /opt/asciidoc-confluence-publisher-docker.jar
\"pageTitleSuffix=$PAGE_TITLE_SUFFIX\" \
\"publishingStrategy=$PUBLISHING_STRATEGY\" \
\"versionMessage=$VERSION_MESSAGE\" \
\"skip=$SKIP\" \
"]
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;

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

@SuppressWarnings("ResultOfMethodCallIgnored")
@Override
public void execute() throws MojoExecutionException {
if (skip) {
getLog().info("Publishing to Confluence skipped");
return;
}
try {
PageTitlePostProcessor pageTitlePostProcessor = new PrefixAndSuffixPageTitlePostProcessor(this.pageTitlePrefix, this.pageTitleSuffix);

Expand Down

0 comments on commit 47c77af

Please sign in to comment.