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 plugin: jbake:watch should not exit if one of the templates have an error #727

Open
ge0ffrey opened this issue Oct 1, 2021 · 1 comment

Comments

@ge0ffrey
Copy link
Contributor

ge0ffrey commented Oct 1, 2021

I start mvn jbake:watch and start adding/editing content, looking at the output regularly. Whe I make some changes, write "foo" to refresh the output, it usually continues running, for hours on end. Unless I make a stupid mistake and cause an error in on my templates (a typo in an ftl, or a NPE for a field used in an ftl). That kills the mvn jbake:watch process, which it shouldn't:

[INFO] Baking finished!
[INFO] Baked 31 items in 5450ms
[ERROR] Failed to bake 1 item(s)!
Oct 01, 2021 9:44:13 AM com.orientechnologies.common.log.OLogManager log
INFO: - shutdown storage: cache...
[INFO] Oops
org.apache.maven.plugin.MojoFailureException: Baked with 1 errors. Check output above for details!
    at org.jbake.maven.GenerateMojo.reRender (GenerateMojo.java:83)
    at org.jbake.maven.WatchMojo$1.run (WatchMojo.java:68)
[INFO] Ooops
org.apache.maven.plugin.MojoExecutionException: Failure when running: 
    at org.jbake.maven.GenerateMojo.reRender (GenerateMojo.java:88)
    at org.jbake.maven.WatchMojo$1.run (WatchMojo.java:68)
Caused by: org.apache.maven.plugin.MojoFailureException: Baked with 1 errors. Check output above for details!
    at org.jbake.maven.GenerateMojo.reRender (GenerateMojo.java:83)
    at org.jbake.maven.WatchMojo$1.run (WatchMojo.java:68)
[INFO] Finishing
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  18:46 h
[INFO] Finished at: 2021-10-01T09:44:13+02:00
[INFO] ------------------------------------------------------------------------

Note: "mvn generate-resources" should fail the build if there is such an error. That's called by CI. But mvn jbake:watch is not called by CI.

@ge0ffrey
Copy link
Contributor Author

ge0ffrey commented Oct 1, 2021

Also, [ERROR] Failed to bake 1 item(s)! should mention the filesnames of the first 3 items that failed.

@ge0ffrey ge0ffrey changed the title Maven plugin: jbake:watch crashes the next morning Maven plugin: jbake:watch should not exit if one of the templates have an error Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant