Skip to content

Commit

Permalink
Move documentation snippet generation (using Spring REST docs) to the…
Browse files Browse the repository at this point in the history
… web project to avoid starting up another instance of the server during the build. Also keeps all tests consolidated and less redundancy. Speeds up build. Upgraded REST docs to 1.1.2 to get some of the new features that aren't in 1.0.x. Improved the documentation but still a lot of work to do before 3.0.0 release (#400)
  • Loading branch information
tgianos authored Sep 28, 2016
1 parent f9e9bf0 commit 7a087e7
Show file tree
Hide file tree
Showing 16 changed files with 1,027 additions and 913 deletions.
36 changes: 0 additions & 36 deletions genie-docs/build.gradle

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions genie-docs/src/test/java/com/netflix/genie/docs/package-info.java

This file was deleted.

28 changes: 0 additions & 28 deletions genie-docs/src/test/resources/application-docs.properties

This file was deleted.

34 changes: 24 additions & 10 deletions genie-web/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ plugins {
id "com.moowork.node" version "0.12"
}

apply plugin: 'org.asciidoctor.convert'

ext {
snippetsDir = file('build/generated-snippets')
}

dependencies {
/*******************************
* Compile Dependencies
Expand All @@ -21,15 +27,14 @@ dependencies {
compile("org.apache.httpcomponents:httpclient")

// JWT JOSE implementation lib
compile("org.bitbucket.b_c:jose4j:0.5.1")
compile("org.bitbucket.b_c:jose4j:${jose4j_version}")

// Spring Libs
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.boot:spring-boot-starter-mail")
compile("org.springframework.boot:spring-boot-starter-hateoas")
compile("org.springframework.boot:spring-boot-starter-redis")
compile("org.springframework.boot:spring-boot-starter-security")
compile("org.springframework.boot:spring-boot-starter-thymeleaf")
compile("org.springframework.boot:spring-boot-starter-tomcat")
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.cloud:spring-cloud-cluster-autoconfigure:${spring_cloud_cluster_version}")
Expand All @@ -43,9 +48,6 @@ dependencies {
compile("org.springframework.security.oauth:spring-security-oauth2")
compile("org.springframework.session:spring-session")

// Thymeleaf Extras for Spring Security
compile("org.thymeleaf.extras:thymeleaf-extras-springsecurity4")

/*******************************
* Provided Dependencies
*******************************/
Expand All @@ -66,6 +68,8 @@ dependencies {
testCompile("com.github.springtestdbunit:spring-test-dbunit:${spring_test_dbunit_version}")
testCompile("com.jayway.jsonpath:json-path")
testCompile("org.dbunit:dbunit:${dbunit_version}")
testCompile("org.springframework.restdocs:spring-restdocs-core:1.1.2.RELEASE")
testCompile("org.springframework.restdocs:spring-restdocs-mockmvc:1.1.2.RELEASE")
testCompile("org.springframework.security:spring-security-test")
testCompile("net.sf.jtidy:jtidy:${jtidy_version}")
testCompile("com.github.tomakehurst:wiremock:${wiremock_version}")
Expand All @@ -75,10 +79,14 @@ license {
excludes(["static/*", "*.yml", "genie-banner.txt"])
}

jar {
manifest {
attributes("Implementation-Version": version)
}
test {
outputs.dir snippetsDir
}

asciidoctor {
attributes 'snippets': snippetsDir
inputs.dir snippetsDir
dependsOn test
}

processResources {
Expand All @@ -105,9 +113,15 @@ bundle.dependsOn(npm_install)

jar {
dependsOn bundle
dependsOn asciidoctor

from("${project.projectDir}/src/main/resources/static/build") {
into 'static'
}
from ("${asciidoctor.outputDir}/html5") {
into 'static/docs'
}
manifest {
attributes("Implementation-Version": version)
}
}

Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
*
* Copyright 2016 Netflix, Inc.
*
* 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.
*
*/
package com.netflix.genie.web.tasks.job

import com.netflix.genie.common.exceptions.GenieException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
*
* Copyright 2016 Netflix, Inc.
*
* 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.
*
*/
package com.netflix.genie.web.tasks.job

import com.netflix.genie.common.dto.Job
Expand Down
Loading

0 comments on commit 7a087e7

Please sign in to comment.