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

Add SpringBoot integration test to showcase cp configuration #994

Merged

Conversation

abelsromero
Copy link
Member

Kind of change

  • Bug fix
  • New non-breaking feature
  • New breaking feature
  • Documentation update
  • Build improvement

Description

What is the goal of this pull request?

Fixes #976 adding a test to validate and showcase SpringBoot required configuration for a Gradle project.

How does it achieve that?

Add a new module asciidoctorj-springboot-integration-test that contains a spring-boot rest service springboot-app to convert Asciidoc sources and a test that:

  • Starts and intances of a SpringBoot service in the background that uses Asciidoctorj
  • Asserts it's working
  • To build the SpringBoot project using the snapshot asciidoctorj version springboot-app is added as another module to the overall build and the assemble task is set as dependency for the asciidoctorj-springboot-integration-test test.

Are there any alternative ways to implement this?

Studied a version where springboot-app was a fully independent project and was build from the test using a Process, however:

  • I could see no way to inject the snapshot version of asciidoctorj
  • There was a problem in my machine in which even setting the PATH in the child process (see ProcessHelper class) the build was executed with the default's OS javac. I suspect this still can happen when starting the service but should not be an issue in CI 🤞 .

Are there any implications of this pull request? Anything a user must know?

  • The test covers Gradle configuration, Maven is obviously different but uses a XML parameter with the same name.
  • Not sure if it's worth it adding a guide to the docs. I am open to suggestions.
    On one side SpringBoot issues is a regular question and would be nice to add something users can find easily...on the other, I'd rather not add manual tasks or duplicate docs from other sources. Also having a note in the docs is no guarantee users will check docs since this the error message and cause of it is quite missleading.

Issue

If this PR fixes an open issue, please add a line of the form:

Fixes #Issue
#973 #820

Release notes

Please add a corresponding entry to the file CHANGELOG.adoc

@abelsromero abelsromero force-pushed the feature/add-springboot-it branch 2 times, most recently from 13620de to 3365ccf Compare February 13, 2021 22:12
@robertpanzer
Copy link
Member

This is awesome, thank you!
I guess it would be worth adding a page to the docs explaining the major roadblocks similar to what we have with wildfly: https://docs.asciidoctor.org/asciidoctorj/latest/guides/run-in-wildfly/

@robertpanzer robertpanzer merged commit b406d36 into asciidoctor:master Feb 14, 2021
@abelsromero abelsromero deleted the feature/add-springboot-it branch December 23, 2021 10:31
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

Successfully merging this pull request may close these issues.

None yet

2 participants