Skip to content

Commit

Permalink
Merge pull request #337 from speedment/antora
Browse files Browse the repository at this point in the history
Update docs release script and Antora pipeline
  • Loading branch information
julgus committed Jun 5, 2023
2 parents 53c513c + 3a19a4f commit 7188235
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 3,718 deletions.
1 change: 1 addition & 0 deletions docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ nav:
- modules/stream-fundamentals/nav.adoc
- modules/fetching-data/nav.adoc
- modules/transactions/nav.adoc
- modules/troubleshooting/nav.adoc
20 changes: 14 additions & 6 deletions docs/modules/get-jpa-streamer/pages/spring_integration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ author:
:reftext: Spring Integration
:navtitle: Spring Integration
:source-highlighter: highlight.js
JPAstreamer comes with first-party support for projects built on top of Spring Boot. Dependency Injection is a fundamental feature of the Spring framework. With this in mind, a JPAstreamer autoconfiguration module can be used to quickly and easily integrate JPAstreamer into your Spring Boot projects.
JPAStreamer comes with first-party support for projects built on top of Spring Boot. Dependency Injection is a fundamental feature of the Spring framework. With this in mind, a JPAStreamer autoconfiguration module can be used to quickly and easily integrate JPAStreamer into your Spring Boot projects.

== Installing the autoconfiguration module

The installation process will differ depending on the build tool you're using. In this guide, Maven and Gradle are covered.

=== Maven
For Maven projects, the following JPAstreamer dependency must be added to the project's pom.xml file:
For Maven projects, the following JPAStreamer dependency must be added to the project's pom.xml file:

[source, xml]
----
Expand All @@ -25,7 +25,7 @@ For Maven projects, the following JPAstreamer dependency must be added to the pr
----

=== Gradle
For Gradle projects, the following JPAstreamer dependency must be added to the project's build.gradle file:
For Gradle projects, the following JPAStreamer dependency must be added to the project's build.gradle file:

[source, groovy]
----
Expand All @@ -38,9 +38,17 @@ dependencies {
}
----

== Accessing JPAstreamer
== Accessing JPAStreamer
Once the required dependencies are installed, you must make JPAStreamer available for injection by explicitly scanning for annotated components. This is done by setting the parameter `scanBasePackages` on the `SpringBootApplication` annotation as follows:

Once the required dependencies are installed, you can access JPAStreamer using Spring's Dependency Injection system:
[source, java]
----
@SpringBootApplication(scanBasePackages={"com.speedment.jpastreamer"})
----

NOTE: If you need to scan multiple base packages, just use a comma separated list e.g. "com.package.A, com.package.B".

You should now be able to access JPAStreamer using Spring's Dependency Injection system:

[source, java]
----
Expand Down Expand Up @@ -68,4 +76,4 @@ public class DummyService {
}
----

WARNING: JPAstreamer's autoconfiguration relies on a `EntityManagerFactory` bean being present. If you're using Spring Data JPA, this is already handled for you.
WARNING: JPAStreamer's autoconfiguration relies on a `EntityManagerFactory` bean being present. If you're using Spring Data JPA, this is already handled for you.
8 changes: 4 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"version": "1.0.0",
"description": "Documentation for JPAStreamer built with Antora",
"scripts": {
"build": "cross-env DOCSEARCH_ENABLED=true DOCSEARCH_ENGINE=lunr antora --generator antora-site-generator-lunr site.yml && NODE_PATH=\"$(npm -g root)\" antora --generator @antora/xref-validator site.yml",
"build-local": "cross-env DOCSEARCH_ENABLED=true DOCSEARCH_ENGINE=lunr antora --generator antora-site-generator-lunr site-local.yml && NODE_PATH=\"$(npm -g root)\" antora --generator @antora/xref-validator site-local.yml"
"build-local": "antora site-local.yml",
"build": "antora site.yml"
},
"author": "JPAStreamer",
"license": "UNLICENSED",
"devDependencies": {
"antora": "^3.1.2",
"antora-site-generator-lunr": "^0.6.1",
"cross-env": "^7.0.3"
},
"private": true,
"dependencies": {
"@antora/cli": "~2.3",
"@antora/cli": "^3.1.3",
"@antora/lunr-extension": "^1.0.0-alpha.8",
"@antora/site-generator-default": "~2.3"
}
}
11 changes: 9 additions & 2 deletions docs/site-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,19 @@ content:
# only generate from git tags (and not branches)
branches: []
start_path: docs
tags: [0.1*, 1.0*, '!1.0.3', 1.1*, '!1.1.1']
tags: [0.1*, 1.0*, '!1.0.3', 1.1*, '!1.1.1', 3.*]
ui:
bundle:
url: ui-bundle.zip
supplemental_files: ./supplemental_ui
asciidoc:
attributes:
page-pagination: true

output:
dir: ../../../jpa-streamer-gh-pages/jpa-streamer
antora:
extensions:
- require : '@antora/lunr-extension'
index_latest_only: true
urls:
latest_version_segment: latest
10 changes: 8 additions & 2 deletions docs/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ content:
# only generate from git tags (and not branches)
branches: []
start_path: docs
tags: [0.1*, 1.0*, '!1.0.3', 1.1*, '!1.1.1']
tags: [0.1*, 1.0*, '!1.0.3', 1.1*, '!1.1.1', 3.*]
ui:
bundle:
url: ui-bundle.zip
Expand All @@ -29,4 +29,10 @@ asciidoc:
attributes:
page-pagination: true
output:
dir: ../../jpa-streamer-gh-pages/jpa-streamer
dir: ../../../jpa-streamer-gh-pages/jpa-streamer
antora:
extensions:
- require : '@antora/lunr-extension'
index_latest_only: true
urls:
latest_version_segment: latest
3 changes: 3 additions & 0 deletions docs/supplemental_ui/css/search.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,6 @@
font-weight: 500;
}

.search-result-component-header {
display: none;
}

0 comments on commit 7188235

Please sign in to comment.