Files
spring-webflow/build.gradle
Andy Wilkinson 96f27501b1 Align EL API dependency with Spring Framework 5
Upgrade to 3.0.1-b04. The implementation dependency, tomcat-jasper-el,
has also been upgraded so that it implements the 3.0 API. Lastly,
the EL API dependency has been marked as compileOnly to prevent
conflicts with the API classes that are pulled in transitively by
tomcat-jasper-el.
2017-03-13 17:39:31 +00:00

346 lines
9.9 KiB
Groovy

buildscript {
repositories {
maven { url "http://repo.spring.io/plugins-release" }
}
dependencies {
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
classpath("io.spring.gradle:spring-io-plugin:0.0.6.RELEASE")
classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
}
}
allprojects {
group = "org.springframework.webflow"
apply plugin: "propdeps"
apply plugin: "java"
apply from: "${rootProject.projectDir}/ide.gradle"
}
subprojects { subproject ->
apply from: "${rootProject.projectDir}/publish-maven.gradle"
sourceCompatibility=1.8
targetCompatibility=1.8
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:none"]
sourceSets.test.resources.srcDirs = ["src/main/java", "src/test/resources", "src/test/java"]
repositories {
maven { url "http://repo.spring.io/libs-release" }
maven { url "http://repo.spring.io/libs-snapshot" }
}
jar {
manifest.attributes["Implementation-Title"] = subproject.name
manifest.attributes["Implementation-Version"] = subproject.version
from("${rootProject.projectDir}/src/dist") {
include "license.txt"
include "notice.txt"
into "META-INF"
expand(copyright: new Date().format("yyyy"), version: project.version)
}
}
if (project.hasProperty('platformVersion')) {
apply plugin: 'spring-io'
repositories {
maven { url "https://repo.spring.io/libs-snapshot" }
}
dependencyManagement {
springIoTestRuntime {
imports {
mavenBom "io.spring.platform:platform-bom:${platformVersion}"
}
}
}
}
subproject.ext {
hibernate5Version = "5.2.6.Final"
log4jVersion = "2.7"
servletVersion = "3.1.0"
slf4jVersion = "1.7.22"
springVersion = "5.0.0.BUILD-SNAPSHOT"
springSecurityVersion = "4.2.1.RELEASE"
tiles3Version = "3.0.7"
}
dependencies {
compile("org.springframework:spring-beans:$springVersion")
compile("org.springframework:spring-context:$springVersion")
compile("org.springframework:spring-core:$springVersion")
compile("org.springframework:spring-expression:$springVersion")
compile("commons-logging:commons-logging:1.2")
compileOnly("javax.el:javax.el-api:3.0.1-b04")
testCompile("junit:junit:4.12") {
exclude group:'org.hamcrest', module:'hamcrest-core'
}
testCompile("org.hamcrest:hamcrest-all:1.3")
testCompile("org.easymock:easymock:3.4")
testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
testRuntime("org.apache.logging.log4j:log4j-jcl:${log4jVersion}")
testCompile("org.apache.tomcat:tomcat-jasper-el:8.5.11")
}
tasks.withType(Test).all {
systemProperty("java.awt.headless", "true")
include "**/*Tests.class"
if (name ==~ /springIo.*/) {
exclude '**/tiles2/**'
}
}
javadoc {
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = project.name
}
task sourcesJar(type: Jar, dependsOn:classes) {
classifier = "sources"
from sourceSets.main.allJava
}
task javadocJar(type: Jar) {
classifier = "javadoc"
from javadoc
}
artifacts {
archives sourcesJar
archives javadocJar
}
}
project("spring-binding") {
description = "Spring Binding"
}
project("spring-webflow") {
description = "Spring Web Flow"
dependencies {
compile(project(":spring-binding"))
compile("org.springframework:spring-web:$springVersion")
compile("org.springframework:spring-webmvc:$springVersion")
provided("javax.servlet:javax.servlet-api:$servletVersion")
optional("org.hibernate:hibernate-core:$hibernate5Version")
optional("org.springframework.security:spring-security-core:$springSecurityVersion")
optional("org.springframework:spring-orm:$springVersion")
optional("org.springframework:spring-tx:$springVersion")
optional("org.apache.tiles:tiles-api:$tiles3Version")
optional("org.apache.tiles:tiles-core:$tiles3Version") {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
}
optional("org.apache.tiles:tiles-servlet:$tiles3Version") {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
}
optional("org.apache.tiles:tiles-jsp:$tiles3Version") {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
}
optional("org.apache.tiles:tiles-el:$tiles3Version") {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
}
optional("org.apache.tiles:tiles-extras:$tiles3Version") {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
exclude group: "org.springframework", module: "spring-web"
}
provided("junit:junit:3.8.2")
testCompile("org.springframework:spring-aop:$springVersion")
testCompile("org.springframework:spring-jdbc:$springVersion")
testCompile("org.springframework:spring-test:$springVersion")
testCompile("javax.validation:validation-api:1.1.0.Final")
testCompile("org.hibernate:hibernate-entitymanager:$hibernate5Version")
testCompile("org.hibernate:hibernate-validator:4.3.2.Final")
testCompile("org.hsqldb:hsqldb:2.3.1")
testCompile("javax.servlet.jsp:javax.servlet.jsp-api:2.2.1")
testCompile("javax.servlet:jstl:1.2")
testCompile("org.slf4j:slf4j-api:$slf4jVersion")
testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
}
}
project("spring-faces") {
description = "Spring Faces"
dependencies {
compile(project(":spring-binding"))
compile(project(":spring-webflow"))
compile("org.springframework:spring-web:$springVersion")
compile("org.springframework:spring-webmvc:$springVersion")
provided("javax.servlet:javax.servlet-api:$servletVersion")
provided("com.sun.faces:jsf-api:2.2.14")
provided("com.sun.faces:jsf-impl:2.2.14")
provided("org.apache.myfaces.core:myfaces-impl:2.1.18")
optional("com.sun.facelets:jsf-facelets:1.1.14")
optional("org.springframework.security:spring-security-core:$springSecurityVersion")
optional("org.springframework.security:spring-security-web:$springSecurityVersion")
optional("org.springframework.security:spring-security-taglibs:$springSecurityVersion")
testCompile("org.apache.myfaces.test:myfaces-test22:1.0.7")
testCompile("org.slf4j:slf4j-api:$slf4jVersion")
testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
testCompile("org.springframework:spring-test:$springVersion")
}
}
configure(rootProject) {
description = "Spring Web Flow"
apply plugin: "docbook-reference"
reference {
sourceDir = file("src/reference")
pdfFilename = "spring-webflow-reference.pdf"
}
// don"t publish the default jar for the root project
configurations.archives.artifacts.clear()
artifacts {
}
task api(type: Javadoc) {
group = "Documentation"
description = "Generates aggregated Javadoc API documentation."
title = "${rootProject.description} ${version} API"
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = rootProject.description
options.overview = "src/api/overview.html"
source subprojects.collect { project ->
project.sourceSets.main.allJava
}
destinationDir = new File(buildDir, "api")
classpath = files(subprojects.collect { project ->
project.sourceSets.main.compileClasspath
})
maxMemory = "1024m"
}
task docsZip(type: Zip) {
group = "Distribution"
baseName = "spring-webflow"
classifier = "docs"
description = "Builds -${classifier} archive containing api and reference " +
"for deployment at static.springframework.org/spring-webflow/docs."
from (api) {
into "api"
}
from (reference) {
into "reference"
}
}
task schemaZip(type: Zip) {
group = "Distribution"
baseName = "spring-webflow"
classifier = "schema"
description = "Builds -${classifier} archive containing all " +
"XSDs for deployment at static.springframework.org/schema."
subprojects.each { subproject ->
def Properties schemas = new Properties();
subproject.sourceSets.main.resources.find {
it.path.endsWith("META-INF/spring.schemas")
}?.withInputStream { schemas.load(it) }
for (def key : schemas.keySet()) {
def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
assert shortName != key
File xsdFile = subproject.sourceSets.main.allSource.find {
it.path.endsWith(schemas.get(key))
}
assert xsdFile != null
into (shortName) {
from xsdFile.path
}
}
}
project(":spring-webflow").sourceSets.main.resources.matching {
include '**/engine/model/builder/xml/*.xsd'
}.each { File file ->
into ('webflow') {
from file.path
}
}
}
task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
group = "Distribution"
baseName = "spring-webflow"
classifier = "dist"
description = "Builds -${classifier} archive, containing all jars and docs, " +
"suitable for community download page."
def baseDir = "${baseName}-${project.version}";
from("src/dist") {
include "notice.txt"
into "${baseDir}"
expand(copyright: new Date().format("yyyy"), version: project.version)
}
from("src/dist") {
include "readme.txt"
include "license.txt"
into "${baseDir}"
}
from(zipTree(docsZip.archivePath)) {
into "${baseDir}/docs"
}
from(zipTree(schemaZip.archivePath)) {
into "${baseDir}/schema"
}
subprojects.each { subproject ->
into ("${baseDir}/libs") {
from subproject.jar
if (subproject.tasks.findByPath("sourcesJar")) {
from subproject.sourcesJar
}
if (subproject.tasks.findByPath("javadocJar")) {
from subproject.javadocJar
}
}
}
}
artifacts {
archives docsZip
archives schemaZip
archives distZip
}
task wrapper(type: Wrapper) {
description = "Generates gradlew[.bat] scripts"
gradleVersion = '3.2.1'
doLast() {
def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=256m"
File wrapperFile = file("gradlew")
wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
File wrapperBatFile = file("gradlew.bat")
wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=",
"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
}
}
}