Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven report generation breaks, if a new page was added with new attachments and references to it #287

Closed
FromirDread opened this issue Jun 21, 2023 · 7 comments
Assignees
Labels

Comments

@FromirDread
Copy link

FromirDread commented Jun 21, 2023

Hi,
I guess I found an issue when a new page was created with new attachments and references.
Probably at this point, only attachments which were already uploaded are considered and new uploads are ignored.

Site structure:
X
--X1
----X1.1
----page.md
----attachments
pom.xml

In page.md
![some.txt](./attachments/some.png)

How to reproduce:
1.) Reference a new file ![some.txt](./attachments/some.png)
2.) Add suitable <attachment uri=""/> for your attachments folder
3.) Provide your new attachment in attachment folder

Job result:

12:29:36 Caused by: org.apache.maven.plugin.MojoExecutionException: error generating report
12:29:36     at org.bsc.mojo.AbstractBaseConfluenceMojo.execute (AbstractBaseConfluenceMojo.java:411)
12:29:36     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
12:29:36     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
12:29:36     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
12:29:36     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
12:29:36     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
12:29:36     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
12:29:36     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
12:29:36     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
12:29:36     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
12:29:36     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
12:29:36     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
12:29:36     at org.jvnet.hudson.maven3.launcher.Maven35Launcher.main (Maven35Launcher.java:130)
12:29:36     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
12:29:36     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
12:29:36     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
12:29:36     at java.lang.reflect.Method.invoke (Method.java:498)
12:29:36     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
12:29:36     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
12:29:36     at jenkins.maven3.agent.Maven35Main.launch (Maven35Main.java:178)
12:29:36     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
12:29:36     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
12:29:36     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
12:29:36     at java.lang.reflect.Method.invoke (Method.java:498)
12:29:36     at hudson.maven.Maven3Builder.call (Maven3Builder.java:139)
12:29:36     at hudson.maven.Maven3Builder.call (Maven3Builder.java:70)
12:29:36     at hudson.remoting.UserRequest.perform (UserRequest.java:211)
12:29:36     at hudson.remoting.UserRequest.perform (UserRequest.java:54)
12:29:36     at hudson.remoting.Request$2.run (Request.java:376)
12:29:36     at hudson.remoting.InterceptingExecutorService.lambda$wrap$0 (InterceptingExecutorService.java:78)
12:29:36     at java.util.concurrent.FutureTask.run (FutureTask.java:266)
12:29:36     at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
12:29:36     at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
12:29:36     at java.lang.Thread.run (Thread.java:748)
12:29:36 Caused by: java.lang.NullPointerException
12:29:36     at java.util.Objects.requireNonNull (Objects.java:203)
12:29:36     at java.util.Optional.<init> (Optional.java:96)
12:29:36     at java.util.Optional.of (Optional.java:108)
12:29:36     at org.bsc.confluence.model.SiteProcessor$1.isLinkPrefixEnabled (SiteProcessor.java:320)
12:29:36     at org.bsc.markdown.MarkdownVisitorHelper.lambda$processImageUrl$0 (MarkdownVisitorHelper.java:90)
12:29:36     at java.util.Optional.map (Optional.java:215)
12:29:36     at org.bsc.markdown.MarkdownVisitorHelper.processImageUrl (MarkdownVisitorHelper.java:90)
12:29:36     at org.bsc.markdown.commonmark.CommonmarkConfluenceWikiVisitor.visit (CommonmarkConfluenceWikiVisitor.java:261)
12:29:36     at org.commonmark.node.Image.accept (Image.java:18)
12:29:36     at org.bsc.markdown.commonmark.CommonmarkConfluenceWikiVisitor$ChildrenProcessor.process (CommonmarkConfluenceWikiVisitor.java:532)
12:29:36     at org.bsc.markdown.commonmark.CommonmarkConfluenceWikiVisitor.visit (CommonmarkConfluenceWikiVisitor.java:138)
12:29:36     at org.commonmark.node.Paragraph.accept (Paragraph.java:10)
12:29:36     at org.bsc.markdown.commonmark.CommonmarkConfluenceWikiVisitor$ChildrenProcessor.process (CommonmarkConfluenceWikiVisitor.java:532)
12:29:36     at org.bsc.markdown.commonmark.CommonmarkConfluenceWikiVisitor.visit (CommonmarkConfluenceWikiVisitor.java:116)
12:29:36     at org.commonmark.node.Document.accept (Document.java:7)
12:29:36     at org.bsc.markdown.commonmark.CommonmarkConfluenceWikiVisitor$Parser.parseMarkdown (CommonmarkConfluenceWikiVisitor.java:52)
12:29:36     at org.bsc.markdown.commonmark.CommonmarkMarkdownProcessorImpl.processMarkdown (CommonmarkMarkdownProcessorImpl.java:25)
12:29:36     at org.bsc.markdown.MarkdownProcessor$Shared.processMarkdown (MarkdownProcessor.java:79)
12:29:36     at org.bsc.confluence.model.SiteProcessor.processMarkdown (SiteProcessor.java:295)
12:29:36     at org.bsc.confluence.model.SiteProcessor.processPageUri (SiteProcessor.java:186)
12:29:36     at org.bsc.mojo.AbstractConfluenceDeployMojo.getPageContent (AbstractConfluenceDeployMojo.java:297)
12:29:36     at org.bsc.mojo.AbstractConfluenceDeployMojo.lambda$generateChild$13 (AbstractConfluenceDeployMojo.java:422)
12:29:36     at org.bsc.mojo.AbstractConfluenceDeployMojo.lambda$generateChild$15 (AbstractConfluenceDeployMojo.java:429)
12:29:36     at java.util.Optional.orElseGet (Optional.java:267)
12:29:36     at org.bsc.mojo.AbstractConfluenceDeployMojo.lambda$generateChild$16 (AbstractConfluenceDeployMojo.java:429)
12:29:36     at java.util.concurrent.CompletableFuture.uniComposeStage (CompletableFuture.java:981)
12:29:36     at java.util.concurrent.CompletableFuture.thenCompose (CompletableFuture.java:2124)
12:29:36     at org.bsc.mojo.AbstractConfluenceDeployMojo.generateChild (AbstractConfluenceDeployMojo.java:447)
12:29:36     at org.bsc.mojo.AbstractConfluenceDeployMojo.generateChildren (AbstractConfluenceDeployMojo.java:774)
12:29:36     at org.bsc.mojo.AbstractConfluenceDeployMojo.generateChildren (AbstractConfluenceDeployMojo.java:782)
12:29:36     at org.bsc.mojo.AbstractConfluenceDeployMojo.generateChildren (AbstractConfluenceDeployMojo.java:782)
12:29:36     at org.bsc.mojo.ConfluenceDeployMojo.lambda$generateProjectReport$14 (ConfluenceDeployMojo.java:575)
12:29:36     at java.util.concurrent.CompletableFuture.uniAccept (CompletableFuture.java:656)
12:29:36     at java.util.concurrent.CompletableFuture$UniAccept.tryFire (CompletableFuture.java:632)
12:29:36     at java.util.concurrent.CompletableFuture.postComplete (CompletableFuture.java:474)
12:29:36     at java.util.concurrent.CompletableFuture$AsyncRun.run (CompletableFuture.java:1632)
12:29:36     at java.util.concurrent.CompletableFuture$AsyncRun.exec (CompletableFuture.java:1618)
12:29:36     at java.util.concurrent.ForkJoinTask.doExec (ForkJoinTask.java:289)
12:29:36     at java.util.concurrent.ForkJoinPool$WorkQueue.runTask (ForkJoinPool.java:1056)
12:29:36     at java.util.concurrent.ForkJoinPool.runWorker (ForkJoinPool.java:1692)
12:29:36     at java.util.concurrent.ForkJoinWorkerThread.run (ForkJoinWorkerThread.java:157)

Workaround:

  1. Generate page.md without any image markup and execute job
  2. Add image markup and execute job again
@bsorrentino
Copy link
Owner

Hi @FromirDread

I used this plugin for myself a lot, but what you are describing never happened.

Please share your site.xml (or .yaml) and the content of page.md so I can verify the issue

williamschey pushed a commit to williamschey/maven-confluence-plugin that referenced this issue Jun 23, 2023
williamschey pushed a commit to williamschey/maven-confluence-plugin that referenced this issue Jun 23, 2023
@bsorrentino
Copy link
Owner

@FromirDread I've deployed the release 7.12-SNAPSHOT with a fix

Please take chance to test it and let me know

@bsorrentino bsorrentino self-assigned this Jun 26, 2023
@bsorrentino
Copy link
Owner

fixed in release 7.12

@FromirDread
Copy link
Author

Hi,
I unfortunaly I haven't found time to test it last days.
Do you know when it's published to maven central?
I would also like to test it, if it's also from functional point of view fine.

https://mvnrepository.com/artifact/org.bsc.maven/confluence-reporting-maven-plugin

@bsorrentino
Copy link
Owner

Hi, I unfortunaly I haven't found time to test it last days. Do you know when it's published to maven central? I would also like to test it, if it's also from functional point of view fine.

https://mvnrepository.com/artifact/org.bsc.maven/confluence-reporting-maven-plugin

Probably the publication process is bit slow today.

@bsorrentino
Copy link
Owner

bsorrentino commented Jun 26, 2023

It is published confluence-reporting-maven-plugin-7.12

@FromirDread
Copy link
Author

@bsorrentino my problem was fixed with 7.12. I would also like to highlight that your response time and community is super fast. Thank you very much for this effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants