diff --git a/.travis.yml b/.travis.yml
index 859438b56..88c3844f5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -29,17 +29,17 @@ jobs:
- jdk: openjdk11
os: osx
- - stage: Quality Check
- name: sonarqube
- jdk: openjdk11
- script:
- - "./gradlew jacocoRootReport sonarqube -i --stacktrace"
-
- - stage: Quality Check
- name: coveralls
- jdk: openjdk11
- script:
- - "./gradlew -PskipSigning jacocoRootReport coveralls -i --stacktrace"
+# - stage: Quality Check
+# name: sonarqube
+# jdk: openjdk11
+# script:
+# - "./gradlew jacocoRootReport sonarqube -i --stacktrace"
+#
+# - stage: Quality Check
+# name: coveralls
+# jdk: openjdk11
+# script:
+# - "./gradlew -PskipSigning jacocoRootReport coveralls -i --stacktrace"
notifications:
irc: "irc.freenode.org#jbake"
diff --git a/BUILD.adoc b/BUILD.adoc
index 024b8d136..dc4f0ffea 100644
--- a/BUILD.adoc
+++ b/BUILD.adoc
@@ -25,7 +25,7 @@ To get an overview of all available tasks with a short description run `./gradle
== Structure
-There are 3 projects
+There are 4 projects:
root aka. jbake-base::
configures subprojects, jacoco execution aggregation and coveralls
@@ -34,6 +34,9 @@ jbake-core::
- the core library. produces jbake-core-{version}.jar (`build/libs`)
- publishes to bintray maven repository jbake-core
+jbake-maven-plugin::
+ - the JBake maven plugin, build by Gradle too
+
jbake-dist::
- bundles the cli to an distribution (`build/distribution`)
- publishes to bintray binary repository jbake
diff --git a/build.gradle b/build.gradle
index 3fbfcf837..6a2f560a7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,16 +1,15 @@
+import java.time.format.DateTimeFormatter
+
plugins {
- id "eclipse"
- id "idea"
- id "io.sdkman.vendors" version "2.0.0" apply false
- id "com.github.kt3k.coveralls" version "2.10.2" apply false
- id "org.sonarqube" version "3.1.1" apply false
+ id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
id 'com.github.ben-manes.versions' version '0.38.0'
- id "nebula.optional-base" version "5.0.3" apply false
id 'org.ajoberstar.grgit' version "$grgitVersion"
- id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
- id "com.github.breadmoirai.github-release" version "2.2.12"
+ id "eclipse"
+ id "idea"
}
+def buildTimeAndDate = grgit.head().dateTime
+
// common variables
ext {
isTravis = (System.getenv("TRAVIS") == "true")
@@ -23,177 +22,26 @@ ext {
sonarDefaultProjectKey = "org.jbake:jbake-base:jbake-core"
sonarURL = System.getenv("SONARHOST") ?: sonarDefaultURL
sonarProjectKey = System.getenv("SONARPROJECTKEY") ?: sonarDefaultProjectKey
+ buildDate = buildTimeAndDate.format(DateTimeFormatter.ofPattern('yyyy-MM-dd'))
+ buildTime = buildTimeAndDate.format(DateTimeFormatter.ofPattern('HH:mm:ss.SSSZ'))
+ isReleaseVersion = !version.endsWith("SNAPSHOT")
}
-/**
- * Apply coveralls to the root project as we just need it here to send the
- * aggregated coverage execution data from the jacocoRootReport task
- */
-apply plugin: 'com.github.kt3k.coveralls'
-
-/**
- * Apply jacoco plugin to all projects and add jcenter as default repository
- */
-allprojects {
- apply plugin: 'jacoco'
-
- if (JavaVersion.current().isJava8Compatible()) {
-
- apply plugin: 'checkstyle'
-
- tasks.withType(Checkstyle) {
- reports {
- xml.enabled false
- html.enabled true
- }
- }
-
- }
-
+nexusPublishing {
repositories {
- mavenCentral()
- }
-
- jacoco {
- toolVersion = jacocoVersion
- }
-
- tasks.withType(AbstractArchiveTask) {
- preserveFileTimestamps = false
- reproducibleFileOrder = true
+ sonatype()
}
}
-/**
- * Common setup for all subprojects
- */
-subprojects {
-
- apply plugin: 'java'
- apply plugin: 'nebula.optional-base'
-
- // We do not publish any jars from the jbake-dist project
- if ( project.name != "jbake-dist" ) {
- apply from: "$rootDir/gradle/maven-publishing.gradle"
- apply from: "$rootDir/gradle/publishing.gradle"
- apply from: "$rootDir/gradle/signing.gradle"
- }
-
- // add source and target compatibility for all JavaCompile tasks
- tasks.withType(JavaCompile) {
- sourceCompatibility = 1.8
- targetCompatibility = 1.8
- }
-
- test {
- useJUnitPlatform()
-
- testLogging {
- events "passed", "skipped", "failed"
- exceptionFormat "full"
- }
-
- jacoco {
- excludes = ["**/*OrientSqlTokenManager*"]
- }
- }
-
- dependencies {
- implementation "org.slf4j:slf4j-api:$slf4jVersion"
- implementation "org.slf4j:jul-to-slf4j:$slf4jVersion"
- implementation "org.slf4j:jcl-over-slf4j:$slf4jVersion"
- implementation "ch.qos.logback:logback-classic:$logbackVersion", optional
- implementation "ch.qos.logback:logback-core:$logbackVersion", optional
-
- testImplementation "org.junit-pioneer:junit-pioneer:$junitPioneer"
- testImplementation "org.junit.jupiter:junit-jupiter-api:$junit5Version"
- testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5Version"
- // compatibility for Junit 4 test
- testCompileOnly "junit:junit:$junit4Version"
- testRuntimeOnly "org.junit.vintage:junit-vintage-engine:$junit5Version"
-
- testImplementation "org.assertj:assertj-core:$assertjCoreVersion"
- testImplementation "org.mockito:mockito-core:$mockitoVersion"
- testImplementation "org.mockito:mockito-junit-jupiter:$mockitoVersion"
- testImplementation 'org.itsallcode:junit5-system-extensions:1.1.0'
- }
-
- dependencyUpdates.resolutionStrategy {
- componentSelection { rules ->
- rules.all { ComponentSelection selection ->
- boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier ->
- selection.candidate.version ==~ /(?i).*[.-]?${qualifier}[.\d-]*/
- }
- if (rejected) {
- selection.reject('Release candidate')
- }
+dependencyUpdates.resolutionStrategy {
+ componentSelection { rules ->
+ rules.all { ComponentSelection selection ->
+ boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier ->
+ selection.candidate.version ==~ /(?i).*[.-]?${qualifier}[.\d-]*/
+ }
+ if (rejected) {
+ selection.reject('Release candidate')
}
}
}
-
- //set jvm for all Test tasks (like test and smokeTest)
- tasks.withType(Test) {
-
- def args = ['-Xms512m', '-Xmx3g', '-Dorientdb.installCustomFormatter=false=false','-Djna.nosys=true']
-
- /**
- * jdk9 build is unable to determine the amount of MaxDirectMemorySize
- * See https://pastebin.com/ECvQeHx0
- */
- if ( JavaVersion.current().java9Compatible ) {
- args << '-XX:MaxDirectMemorySize=2g'
- }
- jvmArgs args
- }
-
- jacocoTestReport {
- reports {
- xml.enabled = true // coveralls plugin depends on xml format report
- html.enabled = true
- }
- }
-
- jacocoTestReport.dependsOn test
-}
-
-task jacocoMerge(type: JacocoMerge) {
- description 'Merge all testreport execution data from subprojects excluding jbake-dist'
- dependsOn subprojects.test
- executionData subprojects.findAll{it.name!="jbake-dist"}.jacocoTestReport.executionData
-}
-
-task jacocoRootReport(type: JacocoReport, group: 'Coverage reports') {
- description = 'Generates an aggregate report from all subprojects'
- dependsOn jacocoMerge
-
- sourceDirectories.from files(subprojects.sourceSets.main.allSource.srcDirs)
- classDirectories.from files(subprojects.sourceSets.main.output)
- executionData.from jacocoMerge.executionData
-
- reports {
- html.enabled = true
- xml.enabled = true
- }
-}
-
-task testReport(type: TestReport) {
- description "Generate an aggregated Testreport for all projects"
-
- destinationDir = file("$buildDir/reports/allTests")
- // Include the results from the `test` task in all subprojects
- reportOn subprojects*.test
-}
-
-coveralls {
- jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml"
-}
-
-tasks.coveralls {
- group = 'Coverage reports'
- description = 'Uploads the aggregated coverage report to Coveralls'
-
- dependsOn jacocoRootReport
- // Skip Task if not run on CI Server
-
- onlyIf { System.env.'CI' }
}
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
new file mode 100644
index 000000000..678405245
--- /dev/null
+++ b/buildSrc/build.gradle
@@ -0,0 +1,3 @@
+plugins {
+ id 'groovy-gradle-plugin'
+}
diff --git a/buildSrc/settings.gradle b/buildSrc/settings.gradle
new file mode 100644
index 000000000..e69de29bb
diff --git a/buildSrc/src/main/groovy/org/jbake/convention/org.jbake.convention.java-common.gradle b/buildSrc/src/main/groovy/org/jbake/convention/org.jbake.convention.java-common.gradle
new file mode 100644
index 000000000..359ba6d88
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/jbake/convention/org.jbake.convention.java-common.gradle
@@ -0,0 +1,97 @@
+plugins {
+ id 'java'
+ id 'jacoco'
+ id 'checkstyle'
+}
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ implementation "org.slf4j:slf4j-api:$slf4jVersion"
+ implementation "org.slf4j:jul-to-slf4j:$slf4jVersion"
+ implementation "org.slf4j:jcl-over-slf4j:$slf4jVersion"
+ implementation "ch.qos.logback:logback-classic:$logbackVersion"
+ implementation "ch.qos.logback:logback-core:$logbackVersion"
+
+ testImplementation "org.junit-pioneer:junit-pioneer:$junitPioneer"
+ testImplementation "org.junit.jupiter:junit-jupiter-api:$junit5Version"
+ testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5Version"
+ // compatibility for Junit 4 test
+ testCompileOnly "junit:junit:$junit4Version"
+ testRuntimeOnly "org.junit.vintage:junit-vintage-engine:$junit5Version"
+
+ testImplementation "org.assertj:assertj-core:$assertjCoreVersion"
+ testImplementation "org.mockito:mockito-core:$mockitoVersion"
+ testImplementation "org.mockito:mockito-junit-jupiter:$mockitoVersion"
+ testImplementation 'org.itsallcode:junit5-system-extensions:1.1.0'
+}
+
+tasks.withType(JavaCompile) {
+ sourceCompatibility = 1.8
+ targetCompatibility = 1.8
+}
+
+//set jvm for all Test tasks (like test and smokeTest)
+tasks.withType(Test) {
+
+ def args = ['-Xms512m', '-Xmx3g', '-Dorientdb.installCustomFormatter=false=false', '-Djna.nosys=true']
+
+ /**
+ * jdk9 build is unable to determine the amount of MaxDirectMemorySize
+ * See https://pastebin.com/ECvQeHx0
+ */
+ if (JavaVersion.current().java9Compatible) {
+ args << '-XX:MaxDirectMemorySize=2g'
+ }
+ jvmArgs args
+}
+
+task javadocJar(type: Jar) {
+ archiveClassifier.set('javadoc')
+ from javadoc
+}
+
+task sourcesJar(type: Jar) {
+ archiveClassifier.set('sources')
+ from sourceSets.main.allSource
+}
+
+tasks.withType(AbstractArchiveTask) {
+ preserveFileTimestamps = false
+ reproducibleFileOrder = true
+}
+
+test {
+ useJUnitPlatform()
+
+ testLogging {
+ events "passed", "skipped", "failed"
+ exceptionFormat "full"
+ }
+
+ jacoco {
+ excludes = ["**/*OrientSqlTokenManager*"]
+ }
+}
+
+jacoco {
+ toolVersion = jacocoVersion
+}
+
+jacocoTestReport {
+ reports {
+ xml.required.set true // coveralls plugin depends on xml format report
+ html.required.set true
+ }
+}
+
+jacocoTestReport.dependsOn test
+
+tasks.withType(Checkstyle) {
+ reports {
+ xml.enabled false
+ html.enabled true
+ }
+}
diff --git a/gradle.properties b/gradle.properties
index d1e77fef3..9f511a888 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -47,3 +47,8 @@ org.gradle.caching=true
org.gradle.parallel=true
org.gradle.configureondemand = true
org.gradle.vfs.watch = true
+
+# jbake-maven-plugin dependencies
+mavenVersion = 3.8.1
+mavenAnnotationsVersion = 3.6.2
+sparkVersion = 2.9.3
diff --git a/gradle/application.gradle b/gradle/application.gradle
index db96255dd..165c9bb04 100644
--- a/gradle/application.gradle
+++ b/gradle/application.gradle
@@ -1,5 +1,3 @@
-apply plugin: 'application'
-
mainClassName = "org.jbake.launcher.Main"
applicationName = "jbake"
diff --git a/gradle/maven-publishing.gradle b/gradle/maven-publishing.gradle
index e82810c86..f5fb4f554 100644
--- a/gradle/maven-publishing.gradle
+++ b/gradle/maven-publishing.gradle
@@ -1,106 +1,85 @@
-import java.time.format.DateTimeFormatter
-
apply plugin: 'maven-publish'
-def buildTimeAndDate = grgit.head().dateTime
-ext {
- buildDate = buildTimeAndDate.format(DateTimeFormatter.ofPattern('yyyy-MM-dd'))
- buildTime = buildTimeAndDate.format(DateTimeFormatter.ofPattern('HH:mm:ss.SSSZ'))
- isReleaseVersion = !version.endsWith("SNAPSHOT")
-}
-
-task javadocJar(type: Jar) {
- archiveClassifier.set('javadoc')
- from javadoc
-}
-
-task sourcesJar(type: Jar) {
- archiveClassifier.set('sources')
- from sourceSets.main.allSource
-}
-
publishing {
publications {
- mavenJava(MavenPublication) {
- from components.java
+ mavenJava(MavenPublication) {
+ from components.java
- artifact javadocJar
- artifact sourcesJar
+ artifact javadocJar
+ artifact sourcesJar
- pom {
- name = "jbake"
- description = project.description
- url = project.website
- developers {
- developer {
- id = 'jonbullock'
- name = 'Jonathan Bullock'
- email = 'jonbullock@gmail.com'
- url = 'http://jonathanbullock.com'
- timezone = 'Europe/London'
- }
- developer {
- id = 'ancho'
- name = 'Frank Becker'
- email = 'frank@calmdevelopment.de'
- timezone = 'Europe/Berlin'
- }
- developer {
- id = 'manikmagar'
- name = 'Manik Magar'
- url = 'https://manik.magar.me/'
- timezone = 'America/New_York'
- }
+ pom {
+ name = "jbake"
+ description = project.description
+ url = project.website
+ developers {
+ developer {
+ id = 'jonbullock'
+ name = 'Jonathan Bullock'
+ email = 'jonbullock@gmail.com'
+ url = 'http://jonathanbullock.com'
+ timezone = 'Europe/London'
}
- scm {
- url = project.vcs
- connection = 'scm:git:git@github.com:jbake-org/jbake.git'
- developerConnection = 'scm:git:https://github.com/jbake-org/jbake.git'
+ developer {
+ id = 'ancho'
+ name = 'Frank Becker'
+ email = 'frank@calmdevelopment.de'
+ timezone = 'Europe/Berlin'
}
- issueManagement {
- system = 'GitHub Issues'
- url = project.issues
+ developer {
+ id = 'manikmagar'
+ name = 'Manik Magar'
+ url = 'https://manik.magar.me/'
+ timezone = 'America/New_York'
}
- mailingLists {
-
- mailingList {
- name = 'jbake-dev'
- subscribe = 'jbake-dev@googlegroups.com'
- unsubscribe = 'jbake-dev+unsubscribe@googlegroups.com'
- archive = 'http://groups.google.com/group/jbake-dev'
- }
- mailingList {
- name = 'jbake-user'
- subscribe = 'jbake-user@googlegroups.com'
- unsubscribe = 'jbake-user+unsubscribe@googlegroups.com'
- archive = 'http://groups.google.com/group/jbake-user'
- }
+ developer {
+ id = 'aldrinleal'
+ name = 'Aldrin Leal'
+ timezone = 'America/Bogota'
}
+ }
+ scm {
+ url = project.vcs
+ connection = 'scm:git:git@github.com:jbake-org/jbake.git'
+ developerConnection = 'scm:git:https://github.com/jbake-org/jbake.git'
+ }
+ issueManagement {
+ system = 'GitHub Issues'
+ url = project.issues
+ }
+ mailingLists {
- licenses {
- license {
- name = 'The MIT License (MIT)'
- url = 'http://opensource.org/licenses/MIT'
- }
+ mailingList {
+ name = 'jbake-dev'
+ subscribe = 'jbake-dev@googlegroups.com'
+ unsubscribe = 'jbake-dev+unsubscribe@googlegroups.com'
+ archive = 'http://groups.google.com/group/jbake-dev'
+ }
+ mailingList {
+ name = 'jbake-user'
+ subscribe = 'jbake-user@googlegroups.com'
+ unsubscribe = 'jbake-user+unsubscribe@googlegroups.com'
+ archive = 'http://groups.google.com/group/jbake-user'
}
}
}
}
}
+}
jar {
manifest {
attributes(
- 'Built-By': System.properties['user.name'],
- 'Created-By': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})".toString(),
- 'Build-Date': buildDate,
- 'Build-Time': buildTime,
- 'Specification-Title': project.name,
- 'Specification-Version': project.version,
- 'Specification-Vendor': project.name,
- 'Implementation-Title': project.name,
- 'Implementation-Version': project.version,
- 'Implementation-Vendor': project.name
+ 'Built-By': System.properties['user.name'],
+ 'Created-By': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})".toString(),
+ 'Build-Date': buildDate,
+ 'Build-Time': buildTime,
+ 'Specification-Title': project.name,
+ 'Specification-Version': project.version,
+ 'Specification-Vendor': project.name,
+ 'Implementation-Title': project.name,
+ 'Implementation-Version': project.version,
+ 'Implementation-Vendor': project.name
)
}
}
diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle
deleted file mode 100644
index edcd23152..000000000
--- a/gradle/publishing.gradle
+++ /dev/null
@@ -1,6 +0,0 @@
-nexusPublishing {
- repositories {
- sonatype()
- }
-}
-
diff --git a/gradle/sdkman.gradle b/gradle/sdkman.gradle
index 90f7aa991..3e907362c 100644
--- a/gradle/sdkman.gradle
+++ b/gradle/sdkman.gradle
@@ -1,5 +1,3 @@
-apply plugin: "io.sdkman.vendors"
-
ext.sdkman_consumer_key = project.hasProperty('sdkman_consumer_key')?sdkman_consumer_key:''
ext.sdkman_consumer_token = project.hasProperty('sdkman_consumer_token')?sdkman_consumer_token:''
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 442d9132e..2e6e5897b 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/jbake-core/build.gradle b/jbake-core/build.gradle
index 3e41caa41..b935114ff 100644
--- a/jbake-core/build.gradle
+++ b/jbake-core/build.gradle
@@ -1,14 +1,37 @@
import java.time.format.DateTimeFormatter
-apply from: "$rootDir/gradle/sonarqube.gradle"
-apply plugin: 'java-library'
+plugins {
+ id "org.jbake.convention.java-common"
+ id 'java-library'
+ id 'nebula.optional-base' version '3.0.3'
+}
+apply from: "$rootDir/gradle/maven-publishing.gradle"
+apply from: "$rootDir/gradle/signing.gradle"
description = "The core library of JBake"
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ pom {
+ name = "jbake-core"
+
+ licenses {
+ license {
+ name = 'The MIT License (MIT)'
+ url = 'http://opensource.org/licenses/MIT'
+ }
+ }
+ }
+ }
+ }
+}
+
+
dependencies {
- implementation "commons-io:commons-io:$commonsIoVersion"
- implementation "org.apache.commons:commons-configuration2:$commonsConfigurationVersion"
+ api "commons-io:commons-io:$commonsIoVersion"
+ api "org.apache.commons:commons-configuration2:$commonsConfigurationVersion"
implementation "commons-beanutils:commons-beanutils:$commonsBeanutilsVersion"
implementation "org.apache.commons:commons-vfs2:$commonsVfs2Version", optional
implementation "org.apache.commons:commons-lang3:$commonsLangVersion"
@@ -16,17 +39,17 @@ dependencies {
exclude group: "junit", module: "junit"
}
implementation "com.orientechnologies:orientdb-core:$orientDbVersion"
- implementation "org.asciidoctor:asciidoctorj:$asciidoctorjVersion", optional
- implementation "org.codehaus.groovy:groovy:$groovyVersion", optional
- implementation "org.codehaus.groovy:groovy-templates:$groovyVersion", optional
- implementation "org.codehaus.groovy:groovy-dateutil:$groovyVersion", optional
- implementation "org.freemarker:freemarker:$freemarkerVersion", optional
- implementation "org.thymeleaf:thymeleaf:$thymeleafVersion", optional
- implementation "de.neuland-bfi:jade4j:$jade4jVersion", optional
- implementation "com.vladsch.flexmark:flexmark:$flexmarkVersion", optional
- implementation "com.vladsch.flexmark:flexmark-profile-pegdown:$flexmarkVersion", optional
+ api "org.asciidoctor:asciidoctorj:$asciidoctorjVersion", optional
+ api "org.codehaus.groovy:groovy:$groovyVersion", optional
+ api "org.codehaus.groovy:groovy-templates:$groovyVersion", optional
+ api "org.codehaus.groovy:groovy-dateutil:$groovyVersion", optional
+ api "org.freemarker:freemarker:$freemarkerVersion", optional
+ api "org.thymeleaf:thymeleaf:$thymeleafVersion", optional
+ api "de.neuland-bfi:jade4j:$jade4jVersion", optional
+ api "com.vladsch.flexmark:flexmark:$flexmarkVersion", optional
+ api "com.vladsch.flexmark:flexmark-profile-pegdown:$flexmarkVersion", optional
+ api "io.pebbletemplates:pebble:$pebbleVersion", optional
implementation "org.jsoup:jsoup:$jsoupVersion"
- implementation "io.pebbletemplates:pebble:$pebbleVersion", optional
implementation "org.yaml:snakeyaml:$snakeYamlVersion", optional
// cli specific dependencies
@@ -36,6 +59,7 @@ dependencies {
processResources {
from("src/main/resources") {
+ duplicatesStrategy = DuplicatesStrategy.EXCLUDE
include 'default.properties'
expand jbakeVersion: project.version,
timestamp: grgit.head().dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss'['VV']'")),
diff --git a/jbake-dist/build.gradle b/jbake-dist/build.gradle
index 486aa4392..bd5567bdf 100644
--- a/jbake-dist/build.gradle
+++ b/jbake-dist/build.gradle
@@ -1,3 +1,10 @@
+plugins {
+ id "io.sdkman.vendors" version "2.0.0"
+ id "com.github.breadmoirai.github-release" version "2.2.12"
+ id "org.jbake.convention.java-common"
+ id 'application'
+}
+
apply from: "$rootDir/gradle/application.gradle"
apply from: "$rootDir/gradle/sdkman.gradle"
apply from: "$rootDir/gradle/signing.gradle"
@@ -33,7 +40,7 @@ dependencies {
}
smokeTestImplementation "org.eclipse.jgit:org.eclipse.jgit:$jgitVersion"
- smokeTestImplementation "org.apache.commons:commons-vfs2:$commonsVfs2Version", optional
+ smokeTestImplementation "org.apache.commons:commons-vfs2:$commonsVfs2Version"
}
task smokeTest(type: Test, dependsOn: installDist) {
diff --git a/jbake-maven-plugin/.gitignore b/jbake-maven-plugin/.gitignore
new file mode 100644
index 000000000..eb5a316cb
--- /dev/null
+++ b/jbake-maven-plugin/.gitignore
@@ -0,0 +1 @@
+target
diff --git a/jbake-maven-plugin/LICENSE.txt b/jbake-maven-plugin/LICENSE.txt
new file mode 100644
index 000000000..261eeb9e9
--- /dev/null
+++ b/jbake-maven-plugin/LICENSE.txt
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/jbake-maven-plugin/README.asciidoc b/jbake-maven-plugin/README.asciidoc
new file mode 100644
index 000000000..dbfebd365
--- /dev/null
+++ b/jbake-maven-plugin/README.asciidoc
@@ -0,0 +1,100 @@
+= JBake Maven Plugin
+Jonathan Bullock
+2021-04-20
+:idprefix:
+
+JBake Maven Plugin is a Maven plugin allowing you to integrate http://jbake.org[JBake] into your projects build. This is the official version published at
+the following Maven coordinates:
+
+----
+
+ org.jbake
+ jbake-maven-plugin
+ ...
+
+----
+
+The JBake Maven Plugin version now matches the JBake version.
+
+Special thanks must go to the original author of this plugin - https://github.com/aldrinleal[Aldrin Leal].
+
+== Usage
+
+To use JBake Maven Plugin in your build add the plugin into your pom.xml as shown below:
+
+----
+
+...
+
+ ...
+
+ org.jbake
+ jbake-maven-plugin
+ ...
+
+
+
+
+
+
+ default-generate
+ generate-resources
+
+ generate
+
+
+
+
+ ...
+
+...
+
+----
+
+=== Dependencies
+
+The plugin automatically includes all optional dependencies of `jbake-core`,
+including freemarker, thymeleaf, asciidoctor, flexmark (markdown), etc.
+This makes it easy to get started with the plugin.
+It also reduces maintenance when upgrading to a new JBake version,
+because you don't need to align the versions of freemarker, thymeleaf, asciidoctor, flexmark, etc.
+
+However, if you want your build to only download the bare minimum it needs,
+you can use `` to exclude the dependencies you don't need.
+
+An example of the plugin being used can be found in this project: https://github.com/jonbullock/maven-jbake-site[https://github.com/jonbullock/maven-jbake-site]
+
+== Goals
+
+There are 4 goals provided by this plugin:
+
+* `jbake:seed` - seeds your project/site with example content and templates
+* `jbake:generate` - bakes your project/site
+* `jbake:watch` - watches to changes and bakes your site whenever a change is detected
+* `jbake:inline` - bakes, watches and serves out content on http://localhost:8820[http://localhost:8820]
+
+You can also more details on each goal by running the help goal:
+
+----
+$ mvn jbake:help -Ddetail # -DgoalName=[seed|generate|watch|inline]
+----
+
+== Versioning
+
+The project adopts the http://semver.org[Semantic Versioning] spec to maintain an understandable backwards compatibility strategy.
+
+The version format is as follows:
+
+----
+..-