question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Publishing to confluence fails when included file has regex content

See original GitHub issue

hello, i have a problem with a file include. I want to include a json file which contains a regex:

"instanceVersionDate": {  
  "type": "string",  
  "pattern": "[0-9][0-9]\.[0-9][0-9]\.[0-9]{4}$",  
  "optional": false
}

now the publishing to confluence fails with the following exception: Caused by: org.apache.maven.plugin.MojoExecutionException: Publishing to Confluence failed at org.sahli.asciidoc.confluence.publisher.maven.plugin.AsciidocConfluencePublisherMojo.execute(AsciidocConfluencePublisherMojo.java:75) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ... 20 more Caused by: java.lang.RuntimeException: Could not convert asciidoc pages at org.sahli.asciidoc.confluence.publisher.converter.AsciidocConfluenceConverter.convert(AsciidocConfluenceConverter.java:85) at org.sahli.asciidoc.confluence.publisher.maven.plugin.AsciidocConfluencePublisherMojo.execute(AsciidocConfluencePublisherMojo.java:67) ... 22 more Caused by: java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Matcher.java:857) at org.sahli.asciidoc.confluence.publisher.converter.AsciidocConfluencePage.replaceAll(AsciidocConfluencePage.java:146) at org.sahli.asciidoc.confluence.publisher.converter.AsciidocConfluencePage.lambda$unescapeCdataHtmlContent$1(AsciidocConfluencePage.java:127) at org.sahli.asciidoc.confluence.publisher.converter.AsciidocConfluencePage.lambda$postProcessContent$4(AsciidocConfluencePage.java:156) at java.util.stream.ReduceOps$1ReducingSink.accept(ReduceOps.java:80) at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:484) at org.sahli.asciidoc.confluence.publisher.converter.AsciidocConfluencePage.postProcessContent(AsciidocConfluencePage.java:156) at org.sahli.asciidoc.confluence.publisher.converter.AsciidocConfluencePage.convertedContent(AsciidocConfluencePage.java:117) at org.sahli.asciidoc.confluence.publisher.converter.AsciidocConfluencePage.newAsciidocConfluencePage(AsciidocConfluencePage.java:101) at org.sahli.asciidoc.confluence.publisher.converter.AsciidocConfluenceConverter.lambda$buildPageTree$0(AsciidocConfluenceConverter.java:97) at java.util.ArrayList.forEach(ArrayList.java:1249) at org.sahli.asciidoc.confluence.publisher.converter.AsciidocConfluenceConverter.buildPageTree(AsciidocConfluenceConverter.java:92) at org.sahli.asciidoc.confluence.publisher.converter.AsciidocConfluenceConverter.convert(AsciidocConfluenceConverter.java:76) ... 23 more

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
alainsahlicommented, Nov 6, 2017

Hi @samuelstein, it’s not defined yet but for sure before the end of the year. In the meantime you can use the snapshot version (0.0.0-SNAPSHOT), you just need to add the snapshot repository in your pom.xml:

<pluginRepositories>
  <pluginRepository>
    <id>confluence-publisher-snapshot-repo</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    <releases>
      <enabled>false</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </pluginRepository>
</pluginRepositories>
0reactions
samuelsteincommented, Nov 6, 2017

thanks a lot. when will the next milestone published?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use regular expressions - Confluence
For Jira workflow functions using regex expressions to condition ... In dotall mode, the expression . matches any character, including a ...
Read more >
Table of Contents Macro | Confluence Data Center and Server ...
This macro is great for situations where: you have a large page with lots of information. you want to build your headings into...
Read more >
Configuring the Allowlist | Confluence Data Center and Server ...
Confluence will display an error if content has been added that is not from an allowed source, and prompt the user to add...
Read more >
Attachments become 'Unknown Attachment' in the page editor ...
When the storage format of a page embeds an image that is not yet attached to the page, the image will still be...
Read more >
"Your work is safe, but there's an issue" error while publishing ...
Upon trying to publish a page, the following error message is displayed: Your work is safe, but there's an issue.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found