Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/jbake-mm' into freemarker-templa…
Browse files Browse the repository at this point in the history
…te-db-fix
  • Loading branch information
manikmagar committed May 29, 2017
2 parents f63380d + 9a95fea commit 6be3e91
Show file tree
Hide file tree
Showing 147 changed files with 1,832 additions and 1,183 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@
/.idea
*.iml
*~
*.ipr
*.iws
build/
.gradle
.gradletasknamecache
22 changes: 20 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,30 @@ addons:
hostname: short-hostname

jdk:
- openjdk6
- openjdk7
- oraclejdk7
- oraclejdk8

install: true

script:
- ./gradlew check

after_success:
- mvn jacoco:report coveralls:jacoco
- ./gradlew jacocoTestReport coveralls || ./gradlew clean

after_failure:
- ./gradlew clean check --debug

notifications:
irc: "irc.freenode.org#jbake"

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

19 changes: 6 additions & 13 deletions README.asciidoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
= JBake
Jonathan Bullock
2013-10-20
2017-05-11
:idprefix:

== JBake
Expand Down Expand Up @@ -54,33 +54,26 @@ Talk to other users of JBake on the forum:

== Build System

The project uses Apache Maven as the build system. To build the JBake distribution ZIP file execute the following command from the root of the repo:
The project uses http://gradle.org[Gradle] as the build system. To build the JBake distribution ZIP file execute the following command from the root of the repo:

----
$ mvn package
$ ./gradlew distZip
----

This will build a ZIP file in the `/dist` folder.

Alternatively you can run directly from the source code using the Maven exec plugin:

----
$ mvn exec:java -Dexec.mainClass=org.jbake.launcher.Main -Dexec.args="/fromFolder /tmp/toFolder/"
----
This will build a ZIP file in the `/build/distributions` folder.

== Tools & Libraries Used

* http://commons.apache.org/[Apache Commons IO, Configuration, Lang & Logging]
* http://maven.apache.org/[Apache Maven]
* http://args4j.kohsuke.org/[Args4j]
* http://asciidoctor.org/[AsciidoctorJ]
* http://www.eclipse.org/[Eclipse IDE]
* http://freemarker.org/[Freemarker]
* http://gradle.org[Gradle]
* http://groovy-lang.org/[Groovy]
* http://junit.org/[JUnit]
* http://pegdown.org/[Pegdown]
* http://www.eclipse.org/jetty/[Jetty Server]
* http://www.orientdb.org/[OrientDB]
* http://groovy-lang.org/[Groovy]

== Copyright & License

Expand Down
93 changes: 93 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
plugins {
id "java"
id "eclipse"
id "idea"
id "jacoco"
id "io.sdkman.vendors" version "1.1.1" apply false
id "com.jfrog.bintray" version "1.7.3" apply false
id "com.github.kt3k.coveralls" version "2.8.1" apply false
id 'com.github.ben-manes.versions' version '0.14.0'
}

if( JavaVersion.current().java7Compatible ) {
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'com.jfrog.bintray'
apply from: 'gradle/application.gradle'
apply from: 'gradle/signing.gradle'
apply from: 'gradle/maven-publishing.gradle'
apply from: 'gradle/publishing.gradle'
apply from: 'gradle/sdkman.gradle'
}

sourceCompatibility = 1.7
targetCompatibility = 1.7

repositories {
jcenter()
}

ext {
asciidoctorjVersion = '1.5.4.1'
commonsIoVersion = '2.5'
commonsConfigurationVersion = '1.10'
commonsLangVersion = '3.4'
commonsVfs2Version = '2.1'
args4jVersion = '2.33'
freemarkerVersion = '2.3.25-incubating'
junitVersion = '4.12'
pegdownVersion = '1.6.0'
jettyServerVersion = '8.1.19.v20160209'
orientDbVersion = '2.2.15'
groovyVersion = '2.4.8'
slf4jVersion = '1.7.22'
logbackVersion = '1.1.9'
assertjCoreVersion = '1.7.1'
thymeleafVersion = '3.0.3.RELEASE'
jsonSimpleVersion = '1.1.1'
jade4jVersion = '1.2.5'
mockitoVersion = '1.10.19'
jsoupVersion = '1.10.2'
}

dependencies {
compile group: 'commons-io', name: 'commons-io', version: commonsIoVersion
compile group: 'commons-configuration', name: 'commons-configuration', version: commonsConfigurationVersion
compile group: 'org.apache.commons', name: 'commons-vfs2', version: commonsVfs2Version
compile group: 'org.apache.commons', name: 'commons-lang3', version: commonsLangVersion
compile group: 'com.googlecode.json-simple', name: 'json-simple', version: jsonSimpleVersion
compile group: 'args4j', name: 'args4j', version: args4jVersion
compile group: 'org.freemarker', name: 'freemarker', version: freemarkerVersion
compile group: 'com.orientechnologies', name: 'orientdb-graphdb', version: orientDbVersion
compile group: 'org.pegdown', name: 'pegdown', version: pegdownVersion
compile group: 'org.asciidoctor', name: 'asciidoctorj', version: asciidoctorjVersion
compile group: 'org.eclipse.jetty', name: 'jetty-server', version: jettyServerVersion
compile group: 'org.codehaus.groovy', name: 'groovy', version: groovyVersion
compile group: 'org.codehaus.groovy', name: 'groovy-templates', version: groovyVersion
compile group: 'org.thymeleaf', name: 'thymeleaf', version: thymeleafVersion
compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
compile group: 'org.slf4j', name: 'jul-to-slf4j', version: slf4jVersion
compile group: 'ch.qos.logback', name: 'logback-classic', version: logbackVersion
compile group: 'ch.qos.logback', name: 'logback-core', version: logbackVersion
compile group: 'de.neuland-bfi', name: 'jade4j', version: jade4jVersion
compile group: 'org.jsoup', name:'jsoup', version: jsoupVersion
testCompile group: 'junit', name: 'junit', version: junitVersion
testCompile group: 'org.assertj', name: 'assertj-core', version: assertjCoreVersion
testCompile group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
}

test {
jvmArgs '-XX:MaxDirectMemorySize=512m', '-Dorientdb.installCustomFormatter=false=false'
}

jacoco {
toolVersion = jacocoVersion
}

jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}

jacocoTestReport.dependsOn test
14 changes: 14 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
group=org.jbake
version=2.6.0-SNAPSHOT
description=JBake is a Java based open source static site/blog generator for developers.

website=http://jbake.org
issues=https://github.com/jbake-org/jbake/issues
vcs=https://github.com/jbake-org/jbake/

jacocoVersion=0.7.9

bintrayDryRun=false
bintrayOrg=jbake
bintrayRepo=maven

90 changes: 90 additions & 0 deletions gradle/application.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import org.ajoberstar.grgit.Grgit

import java.text.SimpleDateFormat

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.ajoberstar:grgit:1.6.0'
}
}

apply plugin: 'application'

mainClassName = "org.jbake.launcher.Main"
applicationName = "jbake"

ext {
examplesBase = "$project.buildDir/examples"

exampleRepositories = [
"example_project_freemarker": "git://github.com/jbake-org/jbake-example-project-freemarker.git",
"example_project_groovy" : "git://github.com/jbake-org/jbake-example-project-groovy.git",
"example_project_thymeleaf" : "git://github.com/jbake-org/jbake-example-project-thymeleaf.git",
"example_project_groovy-mte": "git://github.com/jbake-org/jbake-example-project-groovy-mte.git",
"example_project_jade" : "git://github.com/jbake-org/jbake-example-project-jade.git"
]
}

processResources {
from("src/main/resources"){
include 'default.properties'
expand jbakeVersion: project.version,
timestamp: new SimpleDateFormat("yyyy-MM-dd HH:mm:ssa").format( new Date() )
}
}


task cloneProjectExampleRepositories() {
group = "distribution"
description "Clone jbake example project repositories"

outputs.dir examplesBase

doLast {
exampleRepositories.each { name, repository ->
Grgit.clone(dir: "$examplesBase/$name", uri: repository)
}
}
}

//create Zip Task for each repository
exampleRepositories.each { name, repository ->

task "${name}Zip"(type: Zip, dependsOn: cloneProjectExampleRepositories) {
group "distribution"
description "Zip $name repository"

baseName = name
archiveName = "${baseName}.zip"

from "$examplesBase/$baseName"
exclude 'README.md'
exclude 'LICENSE'
exclude '.git'
}

}

distributions {
main {
contents {
//Include Outputs from zip tasks
exampleRepositories.each { name, repository ->
def task = project.tasks.getByName("${name}Zip")
from(task)
}
}
}
}

startScripts {
defaultJvmOpts = ['-XX:MaxDirectMemorySize=512m']
classpath += files('lib/logging')
}

distZip {
classifier = "bin"
}
70 changes: 70 additions & 0 deletions gradle/maven-publishing.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
apply plugin: 'maven'

ext.isReleaseVersion = !version.endsWith("SNAPSHOT")

def jbakePom = pom {
project {
description project.description
url project.website
developers {
developer {
id 'jonbullock'
name 'Jonathan Bullock'
email '[email protected]'
url 'http://jonathanbullock.com'
timezone '0'
}
}
scm {
url project.vcs
connection 'scm:git:[email protected]:jbake-org/jbake.git'
developerConnection 'scm:git:https://github.com/jbake-org/jbake.git'
}
issueManagement {
system 'GitHub Issues'
url project.issues
}
mailingLists {

mailingList {
name 'jbake-dev'
subscribe '[email protected]'
unsubscribe '[email protected]'
archive 'http://groups.google.com/group/jbake-dev'
}
mailingList {
name 'jbake-user'
subscribe '[email protected]'
unsubscribe '[email protected]'
archive 'http://groups.google.com/group/jbake-user'
}
}

licenses {
license {
name 'The MIT License (MIT)'
url 'http://opensource.org/licenses/MIT'
}
}
}
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives javadocJar, sourcesJar
}

install {
repositories.mavenInstaller {
setPom jbakePom
}
}
Loading

0 comments on commit 6be3e91

Please sign in to comment.