WIP
This commit is contained in:
33
README.adoc
33
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
----
|
||||
|
||||
|
||||
113
docs/pom.xml
Normal file
113
docs/pom.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-task-parent</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-task-docs</artifactId>
|
||||
<name>Spring Cloud Task Docs</name>
|
||||
<description>Spring Cloud Task Docs</description>
|
||||
<properties>
|
||||
<docs.main>spring-cloud-task</docs.main>
|
||||
<main.basedir>${basedir}/..</main.basedir>
|
||||
<configprops.inclusionPattern>spring.cloud.task.*</configprops.inclusionPattern>
|
||||
<upload-docs-zip.phase>deploy</upload-docs-zip.phase>
|
||||
<asciidoctorj.pdf.version>1.5.0-alpha.16</asciidoctorj.pdf.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-cloud-starter-single-step-batch-job</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>spring-cloud-starter-task</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<sourceDirectory>src/main/asciidoc</sourceDirectory>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>docs</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>pl.project13.maven</groupId>
|
||||
<artifactId>git-commit-id-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctorj-epub3</artifactId>
|
||||
<version>${asciidoctorj.pdf.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
<!-- Why Michael, why?! -->
|
||||
<execution>
|
||||
<id>generate-epub</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sourceDocumentExtensions>
|
||||
<sourceDocumentExtension>.epubadoc</sourceDocumentExtension>
|
||||
</sourceDocumentExtensions>
|
||||
<backend>epub3</backend>
|
||||
<sourceHighlighter>coderay</sourceHighlighter>
|
||||
<attributes>
|
||||
<icons>font</icons>
|
||||
<pagenums />
|
||||
<sectnums />
|
||||
<toc />
|
||||
</attributes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>javadocs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<copy todir="${project.basedir}/target/generated-docs/">
|
||||
<fileset dir="${project.basedir}/target/site/apidocs"/>
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
52
docs/src/main/asciidoc/README.adoc
Normal file
52
docs/src/main/asciidoc/README.adoc
Normal file
@@ -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`.
|
||||
@@ -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[]
|
||||
|
||||
// ======================================================================================
|
||||
35
docs/src/main/asciidoc/_configprops.adoc
Normal file
35
docs/src/main/asciidoc/_configprops.adoc
Normal file
@@ -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 <code>spring.cloud.task.initialize.enable</code> 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.
|
||||
|
||||
|===
|
||||
29
docs/src/main/asciidoc/_index.adoc
Normal file
29
docs/src/main/asciidoc/_index.adoc
Normal file
@@ -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[]
|
||||
|
||||
// ======================================================================================
|
||||
29
docs/src/main/asciidoc/_index_pdf.adoc
Normal file
29
docs/src/main/asciidoc/_index_pdf.adoc
Normal file
@@ -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]
|
||||
|
||||
// ======================================================================================
|
||||
29
docs/src/main/asciidoc/_index_single.adoc
Normal file
29
docs/src/main/asciidoc/_index_single.adoc
Normal file
@@ -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]
|
||||
|
||||
// ======================================================================================
|
||||
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
1
docs/src/main/asciidoc/index.htmladoc
Normal file
1
docs/src/main/asciidoc/index.htmladoc
Normal file
@@ -0,0 +1 @@
|
||||
include::_index.adoc[]
|
||||
1
docs/src/main/asciidoc/index.htmlsingleadoc
Normal file
1
docs/src/main/asciidoc/index.htmlsingleadoc
Normal file
@@ -0,0 +1 @@
|
||||
include::_index_single.adoc[]
|
||||
1
docs/src/main/asciidoc/spring-cloud-task.adoc
Symbolic link
1
docs/src/main/asciidoc/spring-cloud-task.adoc
Symbolic link
@@ -0,0 +1 @@
|
||||
index.htmladoc
|
||||
1
docs/src/main/asciidoc/spring-cloud-task.epubadoc
Normal file
1
docs/src/main/asciidoc/spring-cloud-task.epubadoc
Normal file
@@ -0,0 +1 @@
|
||||
include::_index_pdf.adoc[]
|
||||
1
docs/src/main/asciidoc/spring-cloud-task.htmlsingleadoc
Symbolic link
1
docs/src/main/asciidoc/spring-cloud-task.htmlsingleadoc
Symbolic link
@@ -0,0 +1 @@
|
||||
index.htmlsingleadoc
|
||||
1
docs/src/main/asciidoc/spring-cloud-task.pdfadoc
Normal file
1
docs/src/main/asciidoc/spring-cloud-task.pdfadoc
Normal file
@@ -0,0 +1 @@
|
||||
include::_index_pdf.adoc[]
|
||||
2
pom.xml
2
pom.xml
@@ -105,7 +105,7 @@
|
||||
<module>spring-cloud-starter-task</module>
|
||||
<module>spring-cloud-task-samples</module>
|
||||
<module>spring-cloud-task-integration-tests</module>
|
||||
<module>spring-cloud-task-docs</module>
|
||||
<module>docs</module>
|
||||
<module>spring-cloud-starter-single-step-batch-job</module>
|
||||
</modules>
|
||||
|
||||
|
||||
@@ -1,251 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-task-parent</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-task-docs</artifactId>
|
||||
<name>Spring Cloud Task Docs</name>
|
||||
<description>Spring Cloud Task Docs</description>
|
||||
<properties>
|
||||
<main.basedir>${basedir}/..</main.basedir>
|
||||
<asciidoctor.maven.plugin.version>1.6.0</asciidoctor.maven.plugin.version>
|
||||
<asciidoctorj.pdf.version>1.5.0-alpha.16</asciidoctorj.pdf.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.spring.docresources</groupId>
|
||||
<artifactId>spring-doc-resources</artifactId>
|
||||
<version>0.2.0.RELEASE</version>
|
||||
<type>zip</type>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>full</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-doc-resources</id>
|
||||
<goals>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<includeGroupIds>io.spring.docresources</includeGroupIds>
|
||||
<includeArtifactIds>spring-doc-resources</includeArtifactIds>
|
||||
<includeTypes>zip</includeTypes>
|
||||
<excludeTransitive>true</excludeTransitive>
|
||||
<outputDirectory>${project.build.directory}/refdocs/</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-asciidoc-resources</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/refdocs/</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/asciidoc</directory>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<version>${asciidoctor.maven.plugin.version}</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctorj-pdf</artifactId>
|
||||
<version>${asciidoctorj.pdf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctorj-epub3</artifactId>
|
||||
<version>${asciidoctorj.pdf.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<sourceDirectory>${project.build.directory}/refdocs/</sourceDirectory>
|
||||
<sourceDocumentName>index.adoc</sourceDocumentName>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-html</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<backend>html5</backend>
|
||||
<sourceHighlighter>highlight.js</sourceHighlighter>
|
||||
<attributes>
|
||||
<toc>left</toc>
|
||||
<toc-levels>4</toc-levels>
|
||||
<sectanchors>true</sectanchors>
|
||||
<sectnums />
|
||||
<docinfo>shared</docinfo>
|
||||
<stylesdir>css/</stylesdir>
|
||||
<stylesheet>spring.css</stylesheet>
|
||||
<linkcss>true</linkcss>
|
||||
<icons>font</icons>
|
||||
<highlightjsdir>js/highlight</highlightjsdir>
|
||||
<highlightjs-theme>github</highlightjs-theme>
|
||||
</attributes>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generate-pdf</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<backend>pdf</backend>
|
||||
<sourceHighlighter>coderay</sourceHighlighter>
|
||||
<attributes>
|
||||
<icons>font</icons>
|
||||
<pagenums />
|
||||
<sectnums />
|
||||
<toc />
|
||||
</attributes>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generate-epub</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<backend>epub3</backend>
|
||||
<sourceHighlighter>coderay</sourceHighlighter>
|
||||
<attributes>
|
||||
<icons>font</icons>
|
||||
<pagenums />
|
||||
<sectnums />
|
||||
<toc />
|
||||
</attributes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ant-contrib</groupId>
|
||||
<artifactId>ant-contrib</artifactId>
|
||||
<version>1.0b3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant-nodeps</artifactId>
|
||||
<version>1.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.tigris.antelope</groupId>
|
||||
<artifactId>antelopetasks</artifactId>
|
||||
<version>3.2.10</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>package-and-attach-docs-zip</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<zip destfile="${project.build.directory}/${project.artifactId}-${project.version}.zip">
|
||||
<zipfileset dir="${project.build.directory}/generated-docs" prefix="reference">
|
||||
</zipfileset>
|
||||
<zipfileset dir="${project.build.directory}/generated-docs/" includes="index.epub" prefix="reference" />
|
||||
<zipfileset dir="../target/site/apidocs" prefix="apidocs" />
|
||||
</zip>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>setup-maven-properties</id>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<exportAntProperties>true</exportAntProperties>
|
||||
<target>
|
||||
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
|
||||
<taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask" />
|
||||
<var name="version-type" value="${project.version}" />
|
||||
<propertyregex property="version-type" override="true" input="${version-type}" regexp=".*\.(.*)" replace="\1" />
|
||||
<propertyregex property="version-type" override="true" input="${version-type}" regexp="(M)\d+" replace="MILESTONE" />
|
||||
<propertyregex property="version-type" override="true" input="${version-type}" regexp="(RC)\d+" replace="MILESTONE" />
|
||||
<propertyregex property="version-type" override="true" input="${version-type}" regexp="BUILD-(.*)" replace="SNAPSHOT" />
|
||||
<stringutil string="${version-type}" property="spring-boot-repo">
|
||||
<lowercase />
|
||||
</stringutil>
|
||||
<var name="github-tag" value="v${project.version}" />
|
||||
<propertyregex property="github-tag" override="true" input="${github-tag}" regexp=".*SNAPSHOT" replace="master" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-zip</id>
|
||||
<goals>
|
||||
<goal>attach-artifact</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifacts>
|
||||
<artifact>
|
||||
<file>
|
||||
${project.build.directory}/${project.artifactId}-${project.version}.zip
|
||||
</file>
|
||||
<type>zip;zip.type=docs;zip.deployed=false
|
||||
</type>
|
||||
</artifact>
|
||||
</artifacts>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
Reference in New Issue
Block a user