diff --git a/README.adoc b/README.adoc index 6e2a3379..d110ef1e 100644 --- a/README.adoc +++ b/README.adoc @@ -1,3 +1,10 @@ +//// +DO NOT EDIT THIS FILE. IT WAS GENERATED. +Manual changes to this file will be lost when it is generated again. +Edit the files in the src/main/asciidoc/ directory instead. +//// + + = Spring Cloud Task image:https://build.spring.io/plugins/servlet/wittified/build-status/SCT-STASK[Build Status, link=https://build.spring.io/browse/SCT-STASK] Is a project centered around the idea of processing on demand. A user is able to develop @@ -24,22 +31,22 @@ $ ./mvnw clean install @EnableTask public class MyApp { - @Bean - public MyTaskApplication myTask() { - return new MyTaskApplication(); - } + @Bean + public MyTaskApplication myTask() { + return new MyTaskApplication(); + } - public static void main(String[] args) { - SpringApplication.run(MyApp.class); - } + public static void main(String[] args) { + SpringApplication.run(MyApp.class); + } - public static class MyTaskApplication implements ApplicationRunner { + public static class MyTaskApplication implements ApplicationRunner { - @Override - public void run(ApplicationArguments args) throws Exception { - System.out.println("Hello World"); - } - } + @Override + public void run(ApplicationArguments args) throws Exception { + System.out.println("Hello World"); + } + } } ---- diff --git a/docs/pom.xml b/docs/pom.xml new file mode 100644 index 00000000..b7b571e3 --- /dev/null +++ b/docs/pom.xml @@ -0,0 +1,113 @@ + + + 4.0.0 + + org.springframework.cloud + spring-cloud-task-parent + 2.3.1-SNAPSHOT + + spring-cloud-task-docs + Spring Cloud Task Docs + Spring Cloud Task Docs + + spring-cloud-task + ${basedir}/.. + spring.cloud.task.* + deploy + 1.5.0-alpha.16 + + + + ${project.groupId} + spring-cloud-starter-single-step-batch-job + ${project.version} + + + ${project.groupId} + spring-cloud-starter-task + ${project.version} + + + + src/main/asciidoc + + + + docs + + + + pl.project13.maven + git-commit-id-plugin + + + maven-dependency-plugin + + + maven-resources-plugin + + + org.codehaus.mojo + exec-maven-plugin + + + org.asciidoctor + asciidoctor-maven-plugin + + + org.asciidoctor + asciidoctorj-epub3 + ${asciidoctorj.pdf.version} + + + + + + generate-epub + generate-resources + + process-asciidoc + + + + .epubadoc + + epub3 + coderay + + font + + + + + + + + + + maven-antrun-plugin + + + javadocs + prepare-package + + run + + + + + + + + + + + + + maven-deploy-plugin + + + + + + diff --git a/spring-cloud-task-docs/src/main/asciidoc/.gitignore b/docs/src/main/asciidoc/.gitignore similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/.gitignore rename to docs/src/main/asciidoc/.gitignore diff --git a/spring-cloud-task-docs/src/main/asciidoc/Guardfile b/docs/src/main/asciidoc/Guardfile similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/Guardfile rename to docs/src/main/asciidoc/Guardfile diff --git a/docs/src/main/asciidoc/README.adoc b/docs/src/main/asciidoc/README.adoc new file mode 100644 index 00000000..6e2a3379 --- /dev/null +++ b/docs/src/main/asciidoc/README.adoc @@ -0,0 +1,52 @@ += Spring Cloud Task image:https://build.spring.io/plugins/servlet/wittified/build-status/SCT-STASK[Build Status, link=https://build.spring.io/browse/SCT-STASK] + +Is a project centered around the idea of processing on demand. A user is able to develop +a “task” that can be deployed, executed and removed on demand, yet the result of the +process persists beyond the life of the task for future reporting. + + +== Requirements: + +* Java 8 or Above + +== Build Main Project: + +[source,shell,indent=2] +---- +$ ./mvnw clean install +---- + +== Example: + +[source,java,indent=2] +---- +@SpringBootApplication +@EnableTask +public class MyApp { + + @Bean + public MyTaskApplication myTask() { + return new MyTaskApplication(); + } + + public static void main(String[] args) { + SpringApplication.run(MyApp.class); + } + + public static class MyTaskApplication implements ApplicationRunner { + + @Override + public void run(ApplicationArguments args) throws Exception { + System.out.println("Hello World"); + } + } +} +---- + +== Code of Conduct +This project adheres to the Contributor Covenant link:CODE_OF_CONDUCT.adoc[code of conduct]. By participating, you are expected to uphold this code. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io. + +== Building the Project + +This project requires that you invoke the Javadoc engine from the Maven command line. You can do so by appending `javadoc:aggregate` to the rest of your Maven command. +For example, to build the entire project, you could use `./mvnw -Pfull javadoc:aggregate`. diff --git a/spring-cloud-task-docs/src/main/asciidoc/index.adoc b/docs/src/main/asciidoc/_attributes.adoc similarity index 75% rename from spring-cloud-task-docs/src/main/asciidoc/index.adoc rename to docs/src/main/asciidoc/_attributes.adoc index 0648d746..9d81da7f 100644 --- a/spring-cloud-task-docs/src/main/asciidoc/index.adoc +++ b/docs/src/main/asciidoc/_attributes.adoc @@ -1,12 +1,20 @@ -= Spring Cloud Task Reference Guide -Michael Minella, Glenn Renfro, Jay Bryant :doctype: book -:toc: +:idprefix: +:idseparator: - +:toc: left :toclevels: 4 -:source-highlighter: prettify +:tabsize: 4 :numbered: +:sectanchors: +:sectnums: :icons: font :hide-uri-scheme: +:docinfo: shared,private + +:sc-ext: java +:project-full-name: Spring Cloud Task + +// project-specific attributes :spring-cloud-task-repo: snapshot :github-tag: master :spring-cloud-task-docs-version: current @@ -37,27 +45,3 @@ Michael Minella, Glenn Renfro, Jay Bryant :propdeps-plugin: https://github.com/spring-projects/gradle-plugins/tree/master/propdeps-plugin :ant-manual: https://ant.apache.org/manual :attributes: allow-uri-read -// ====================================================================================== - -(C) 2009-2020 VMware, Inc. All rights reserved. - -Copies of this document may be made for your own use and for distribution to -others, provided that you do not charge any fee for such copies and further -provided that each copy contains this Copyright Notice, whether distributed in -print or electronically. - -include::preface.adoc[] - -include::getting-started.adoc[] - -include::features.adoc[] - -include::batch.adoc[] - -include::batch-starter.adoc[] - -include::stream.adoc[] - -include::appendix.adoc[] - -// ====================================================================================== diff --git a/docs/src/main/asciidoc/_configprops.adoc b/docs/src/main/asciidoc/_configprops.adoc new file mode 100644 index 00000000..9f27944a --- /dev/null +++ b/docs/src/main/asciidoc/_configprops.adoc @@ -0,0 +1,35 @@ +|=== +|Name | Default | Description + +|spring.cloud.task.batch.command-line-runner-order | `0` | The order for the {@code CommandLineRunner} used to run batch jobs when {@code spring.cloud.task.batch.fail-on-job-failure=true}. Defaults to 0 (same as the {@link org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner}). +|spring.cloud.task.batch.events.chunk-order | | Establishes the default {@link Ordered} precedence for {@link org.springframework.batch.core.ChunkListener}. +|spring.cloud.task.batch.events.chunk.enabled | `true` | This property is used to determine if a task should listen for batch chunk events. +|spring.cloud.task.batch.events.enabled | `true` | This property is used to determine if a task should listen for batch events. +|spring.cloud.task.batch.events.item-process-order | | Establishes the default {@link Ordered} precedence for {@link org.springframework.batch.core.ItemProcessListener}. +|spring.cloud.task.batch.events.item-process.enabled | `true` | This property is used to determine if a task should listen for batch item processed events. +|spring.cloud.task.batch.events.item-read-order | | Establishes the default {@link Ordered} precedence for {@link org.springframework.batch.core.ItemReadListener}. +|spring.cloud.task.batch.events.item-read.enabled | `true` | This property is used to determine if a task should listen for batch item read events. +|spring.cloud.task.batch.events.item-write-order | | Establishes the default {@link Ordered} precedence for {@link org.springframework.batch.core.ItemWriteListener}. +|spring.cloud.task.batch.events.item-write.enabled | `true` | This property is used to determine if a task should listen for batch item write events. +|spring.cloud.task.batch.events.job-execution-order | | Establishes the default {@link Ordered} precedence for {@link org.springframework.batch.core.JobExecutionListener}. +|spring.cloud.task.batch.events.job-execution.enabled | `true` | This property is used to determine if a task should listen for batch job execution events. +|spring.cloud.task.batch.events.skip-order | | Establishes the default {@link Ordered} precedence for {@link org.springframework.batch.core.SkipListener}. +|spring.cloud.task.batch.events.skip.enabled | `true` | This property is used to determine if a task should listen for batch skip events. +|spring.cloud.task.batch.events.step-execution-order | | Establishes the default {@link Ordered} precedence for {@link org.springframework.batch.core.StepExecutionListener}. +|spring.cloud.task.batch.events.step-execution.enabled | `true` | This property is used to determine if a task should listen for batch step execution events. +|spring.cloud.task.batch.fail-on-job-failure | `false` | This property is used to determine if a task app should return with a non zero exit code if a batch job fails. +|spring.cloud.task.batch.fail-on-job-failure-poll-interval | `5000` | Fixed delay in milliseconds that Spring Cloud Task will wait when checking if {@link org.springframework.batch.core.JobExecution}s have completed, when spring.cloud.task.batch.failOnJobFailure is set to true. Defaults to 5000. +|spring.cloud.task.batch.job-names | | Comma-separated list of job names to execute on startup (for instance, `job1,job2`). By default, all Jobs found in the context are executed. @deprecated use spring.batch.job.names instead of spring.cloud.task.batch.jobNames. +|spring.cloud.task.batch.listener.enabled | `true` | This property is used to determine if a task will be linked to the batch jobs that are run. +|spring.cloud.task.closecontext-enabled | `false` | When set to true the context is closed at the end of the task. Else the context remains open. +|spring.cloud.task.events.enabled | `true` | This property is used to determine if a task app should emit task events. +|spring.cloud.task.executionid | | An id that will be used by the task when updating the task execution. +|spring.cloud.task.external-execution-id | | An id that can be associated with a task. +|spring.cloud.task.initialize-enabled | | If set to true then tables are initialized. If set to false tables are not initialized. Defaults to null. The requirement for it to be defaulted to null is so that we can support the spring.cloud.task.initialize.enable until it is removed. +|spring.cloud.task.parent-execution-id | | The id of the parent task execution id that launched this task execution. Defaults to null if task execution had no parent. +|spring.cloud.task.single-instance-enabled | `false` | This property is used to determine if a task will execute if another task with the same app name is running. +|spring.cloud.task.single-instance-lock-check-interval | `500` | Declares the time (in millis) that a task execution will wait between checks. Default time is: 500 millis. +|spring.cloud.task.single-instance-lock-ttl | | Declares the maximum amount of time (in millis) that a task execution can hold a lock to prevent another task from executing with a specific task name when the single-instance-enabled is set to true. Default time is: Integer.MAX_VALUE. +|spring.cloud.task.table-prefix | `TASK_` | The prefix to append to the table names created by Spring Cloud Task. + +|=== \ No newline at end of file diff --git a/docs/src/main/asciidoc/_index.adoc b/docs/src/main/asciidoc/_index.adoc new file mode 100644 index 00000000..ab8f9012 --- /dev/null +++ b/docs/src/main/asciidoc/_index.adoc @@ -0,0 +1,29 @@ += Spring Cloud Task Reference Guide +Michael Minella, Glenn Renfro, Jay Bryant + +include::_attributes.adoc[] + +// ====================================================================================== + +(C) 2009-2020 VMware, Inc. All rights reserved. + +Copies of this document may be made for your own use and for distribution to +others, provided that you do not charge any fee for such copies and further +provided that each copy contains this Copyright Notice, whether distributed in +print or electronically. + +include::preface.adoc[] + +include::getting-started.adoc[] + +include::features.adoc[] + +include::batch.adoc[] + +include::batch-starter.adoc[] + +include::stream.adoc[] + +include::appendix.adoc[] + +// ====================================================================================== diff --git a/docs/src/main/asciidoc/_index_pdf.adoc b/docs/src/main/asciidoc/_index_pdf.adoc new file mode 100644 index 00000000..daf859d9 --- /dev/null +++ b/docs/src/main/asciidoc/_index_pdf.adoc @@ -0,0 +1,29 @@ += Spring Cloud Task Reference Guide +Michael Minella, Glenn Renfro, Jay Bryant + +include::_attributes.adoc[] + +// ====================================================================================== + +(C) 2009-2020 VMware, Inc. All rights reserved. + +Copies of this document may be made for your own use and for distribution to +others, provided that you do not charge any fee for such copies and further +provided that each copy contains this Copyright Notice, whether distributed in +print or electronically. + +include::preface.adoc[leveloffset=+1] + +include::getting-started.adoc[leveloffset=+1] + +include::features.adoc[leveloffset=+1] + +include::batch.adoc[leveloffset=+1] + +include::batch-starter.adoc[leveloffset=+1] + +include::stream.adoc[leveloffset=+1] + +include::appendix.adoc[leveloffset=+1] + +// ====================================================================================== diff --git a/docs/src/main/asciidoc/_index_single.adoc b/docs/src/main/asciidoc/_index_single.adoc new file mode 100644 index 00000000..daf859d9 --- /dev/null +++ b/docs/src/main/asciidoc/_index_single.adoc @@ -0,0 +1,29 @@ += Spring Cloud Task Reference Guide +Michael Minella, Glenn Renfro, Jay Bryant + +include::_attributes.adoc[] + +// ====================================================================================== + +(C) 2009-2020 VMware, Inc. All rights reserved. + +Copies of this document may be made for your own use and for distribution to +others, provided that you do not charge any fee for such copies and further +provided that each copy contains this Copyright Notice, whether distributed in +print or electronically. + +include::preface.adoc[leveloffset=+1] + +include::getting-started.adoc[leveloffset=+1] + +include::features.adoc[leveloffset=+1] + +include::batch.adoc[leveloffset=+1] + +include::batch-starter.adoc[leveloffset=+1] + +include::stream.adoc[leveloffset=+1] + +include::appendix.adoc[leveloffset=+1] + +// ====================================================================================== diff --git a/spring-cloud-task-docs/src/main/asciidoc/appendix-building-the-documentation.adoc b/docs/src/main/asciidoc/appendix-building-the-documentation.adoc similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/appendix-building-the-documentation.adoc rename to docs/src/main/asciidoc/appendix-building-the-documentation.adoc diff --git a/spring-cloud-task-docs/src/main/asciidoc/appendix-cloud-foundry.adoc b/docs/src/main/asciidoc/appendix-cloud-foundry.adoc similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/appendix-cloud-foundry.adoc rename to docs/src/main/asciidoc/appendix-cloud-foundry.adoc diff --git a/spring-cloud-task-docs/src/main/asciidoc/appendix-task-repository-schema.adoc b/docs/src/main/asciidoc/appendix-task-repository-schema.adoc similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/appendix-task-repository-schema.adoc rename to docs/src/main/asciidoc/appendix-task-repository-schema.adoc diff --git a/spring-cloud-task-docs/src/main/asciidoc/appendix.adoc b/docs/src/main/asciidoc/appendix.adoc similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/appendix.adoc rename to docs/src/main/asciidoc/appendix.adoc diff --git a/spring-cloud-task-docs/src/main/asciidoc/batch-starter.adoc b/docs/src/main/asciidoc/batch-starter.adoc similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/batch-starter.adoc rename to docs/src/main/asciidoc/batch-starter.adoc diff --git a/spring-cloud-task-docs/src/main/asciidoc/batch.adoc b/docs/src/main/asciidoc/batch.adoc similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/batch.adoc rename to docs/src/main/asciidoc/batch.adoc diff --git a/spring-cloud-task-docs/src/main/asciidoc/features.adoc b/docs/src/main/asciidoc/features.adoc similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/features.adoc rename to docs/src/main/asciidoc/features.adoc diff --git a/spring-cloud-task-docs/src/main/asciidoc/getting-started.adoc b/docs/src/main/asciidoc/getting-started.adoc similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/getting-started.adoc rename to docs/src/main/asciidoc/getting-started.adoc diff --git a/spring-cloud-task-docs/src/main/asciidoc/images/task_schema.png b/docs/src/main/asciidoc/images/task_schema.png similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/images/task_schema.png rename to docs/src/main/asciidoc/images/task_schema.png diff --git a/docs/src/main/asciidoc/index.htmladoc b/docs/src/main/asciidoc/index.htmladoc new file mode 100644 index 00000000..1aeaaec5 --- /dev/null +++ b/docs/src/main/asciidoc/index.htmladoc @@ -0,0 +1 @@ +include::_index.adoc[] diff --git a/docs/src/main/asciidoc/index.htmlsingleadoc b/docs/src/main/asciidoc/index.htmlsingleadoc new file mode 100644 index 00000000..d42349c1 --- /dev/null +++ b/docs/src/main/asciidoc/index.htmlsingleadoc @@ -0,0 +1 @@ +include::_index_single.adoc[] diff --git a/spring-cloud-task-docs/src/main/asciidoc/preface.adoc b/docs/src/main/asciidoc/preface.adoc similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/preface.adoc rename to docs/src/main/asciidoc/preface.adoc diff --git a/spring-cloud-task-docs/src/main/asciidoc/sagan-index.adoc b/docs/src/main/asciidoc/sagan-index.adoc similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/sagan-index.adoc rename to docs/src/main/asciidoc/sagan-index.adoc diff --git a/docs/src/main/asciidoc/spring-cloud-task.adoc b/docs/src/main/asciidoc/spring-cloud-task.adoc new file mode 120000 index 00000000..1abdb4fd --- /dev/null +++ b/docs/src/main/asciidoc/spring-cloud-task.adoc @@ -0,0 +1 @@ +index.htmladoc \ No newline at end of file diff --git a/docs/src/main/asciidoc/spring-cloud-task.epubadoc b/docs/src/main/asciidoc/spring-cloud-task.epubadoc new file mode 100644 index 00000000..dd142a75 --- /dev/null +++ b/docs/src/main/asciidoc/spring-cloud-task.epubadoc @@ -0,0 +1 @@ +include::_index_pdf.adoc[] diff --git a/docs/src/main/asciidoc/spring-cloud-task.htmlsingleadoc b/docs/src/main/asciidoc/spring-cloud-task.htmlsingleadoc new file mode 120000 index 00000000..edc86da1 --- /dev/null +++ b/docs/src/main/asciidoc/spring-cloud-task.htmlsingleadoc @@ -0,0 +1 @@ +index.htmlsingleadoc \ No newline at end of file diff --git a/docs/src/main/asciidoc/spring-cloud-task.pdfadoc b/docs/src/main/asciidoc/spring-cloud-task.pdfadoc new file mode 100644 index 00000000..dd142a75 --- /dev/null +++ b/docs/src/main/asciidoc/spring-cloud-task.pdfadoc @@ -0,0 +1 @@ +include::_index_pdf.adoc[] diff --git a/spring-cloud-task-docs/src/main/asciidoc/stream.adoc b/docs/src/main/asciidoc/stream.adoc similarity index 100% rename from spring-cloud-task-docs/src/main/asciidoc/stream.adoc rename to docs/src/main/asciidoc/stream.adoc diff --git a/spring-cloud-task-docs/src/main/javadoc/spring-javadoc.css b/docs/src/main/javadoc/spring-javadoc.css similarity index 100% rename from spring-cloud-task-docs/src/main/javadoc/spring-javadoc.css rename to docs/src/main/javadoc/spring-javadoc.css diff --git a/pom.xml b/pom.xml index c3d71ca7..fb0adcb5 100755 --- a/pom.xml +++ b/pom.xml @@ -105,7 +105,7 @@ spring-cloud-starter-task spring-cloud-task-samples spring-cloud-task-integration-tests - spring-cloud-task-docs + docs spring-cloud-starter-single-step-batch-job diff --git a/spring-cloud-task-docs/pom.xml b/spring-cloud-task-docs/pom.xml deleted file mode 100644 index 9e6666dd..00000000 --- a/spring-cloud-task-docs/pom.xml +++ /dev/null @@ -1,251 +0,0 @@ - - - 4.0.0 - - org.springframework.cloud - spring-cloud-task-parent - 2.3.1-SNAPSHOT - - spring-cloud-task-docs - Spring Cloud Task Docs - Spring Cloud Task Docs - - ${basedir}/.. - 1.6.0 - 1.5.0-alpha.16 - - - - io.spring.docresources - spring-doc-resources - 0.2.0.RELEASE - zip - true - - - - - full - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-doc-resources - - unpack-dependencies - - generate-resources - - io.spring.docresources - spring-doc-resources - zip - true - ${project.build.directory}/refdocs/ - - - - - - org.apache.maven.plugins - maven-resources-plugin - - - copy-asciidoc-resources - generate-resources - - copy-resources - - - ${project.build.directory}/refdocs/ - - - src/main/asciidoc - false - - - - - - - - org.asciidoctor - asciidoctor-maven-plugin - ${asciidoctor.maven.plugin.version} - - - org.asciidoctor - asciidoctorj-pdf - ${asciidoctorj.pdf.version} - - - org.asciidoctor - asciidoctorj-epub3 - ${asciidoctorj.pdf.version} - - - - ${project.build.directory}/refdocs/ - index.adoc - - - - generate-html - generate-resources - - process-asciidoc - - - html5 - highlight.js - - left - 4 - true - - shared - css/ - spring.css - true - font - js/highlight - github - - - - - generate-pdf - generate-resources - - process-asciidoc - - - pdf - coderay - - font - - - - - - - - generate-epub - generate-resources - - process-asciidoc - - - epub3 - coderay - - font - - - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - ant-contrib - ant-contrib - 1.0b3 - - - ant - ant - - - - - org.apache.ant - ant-nodeps - 1.8.1 - - - org.tigris.antelope - antelopetasks - 3.2.10 - - - - - package-and-attach-docs-zip - package - - run - - - - - - - - - - - - - - setup-maven-properties - validate - - run - - - true - - - - - - - - - - - - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-zip - - attach-artifact - - - - - - ${project.build.directory}/${project.artifactId}-${project.version}.zip - - zip;zip.type=docs;zip.deployed=false - - - - - - - - - - - -