You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2012/07/10 00:33:59 UTC
git commit: TAP5-1972: Include LICENSE.txt and NOTICE.txt for each
module in both the binary and source JARs
Updated Branches:
refs/heads/5.4-js-rewrite e0e2ef12d -> 9c7194eea
TAP5-1972: Include LICENSE.txt and NOTICE.txt for each module in both the binary and source JARs
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/9c7194ee
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/9c7194ee
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/9c7194ee
Branch: refs/heads/5.4-js-rewrite
Commit: 9c7194eeaf6fd80e79fe6345386ed7b959ded57b
Parents: e0e2ef1
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Mon Jul 9 15:33:48 2012 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Mon Jul 9 15:33:48 2012 -0700
----------------------------------------------------------------------
build.gradle | 583 +++++++++++++++++++++++++++--------------------------
1 files changed, 297 insertions(+), 286 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9c7194ee/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index ec806c7..e059963 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,17 +7,17 @@ apply from: "ssh.gradle"
apply from: "md5.gradle"
project.ext.versions = [
- // Remember that when generating a release, this should be incremented. Also don"t forget to
- // tag the release in Subversion.
- tapestry: "5.4-alpha-1",
- jetty: "7.0.0.v20091005",
- tomcat: "6.0.30",
- testng: "6.5.2",
- easymock: "3.0",
- servletapi: "2.5",
- spock: "0.6-groovy-1.8",
- hibernate: "4.1.2.Final",
- wro4j: "1.4.6"
+ // Remember that when generating a release, this should be incremented. Also don"t forget to
+ // tag the release in Subversion.
+ tapestry: "5.4-alpha-1",
+ jetty: "7.0.0.v20091005",
+ tomcat: "6.0.30",
+ testng: "5.14.10",
+ easymock: "3.0",
+ servletapi: "2.5",
+ spock: "0.6-groovy-1.8",
+ hibernate: "4.1.2.Final",
+ wro4j: "1.4.6"
]
// Provided so that the CI server can override the normal version number for nightly builds.
@@ -25,202 +25,213 @@ version = System.getProperty("project-version", versions.tapestry)
// Let analysis.apache.org get in touch with our builds
-project.ext {
- sonarUrl = System.getProperty("sonarUrl", "http://analysis.apache.org");
- sonarDbUrl = System.getProperty("sonarDbUrl", "");
- sonarDbUsername = System.getProperty("sonarDbUsername", "");
- sonarDbPassword = System.getProperty("sonarDbPassword", "");
- sonarDbDriverClassName = "com.mysql.jdbc.Driver"
+project.ext {
+ sonarUrl = System.getProperty("sonarUrl", "http://analysis.apache.org");
+ sonarDbUrl = System.getProperty("sonarDbUrl", "");
+ sonarDbUsername = System.getProperty("sonarDbUsername", "");
+ sonarDbPassword = System.getProperty("sonarDbPassword", "");
+ sonarDbDriverClassName = "com.mysql.jdbc.Driver"
- stagingUrl = "https://repository.apache.org/service/local/staging/deploy/maven2/"
- snapshotUrl = "https://repository.apache.org/content/repositories/snapshots"
+ stagingUrl = "https://repository.apache.org/service/local/staging/deploy/maven2/"
+ snapshotUrl = "https://repository.apache.org/content/repositories/snapshots"
- doSign = !project.hasProperty("noSign") && project.hasProperty("signing.keyId")
+ doSign = !project.hasProperty("noSign") && project.hasProperty("signing.keyId")
- // apacheDeployUserName and apacheDeployPassword should be specified in ~/.gradle/gradle.properties
+ // apacheDeployUserName and apacheDeployPassword should be specified in ~/.gradle/gradle.properties
- deployUsernameProperty = isSnapshot() ? "snapshotDeployUserName" : "apacheDeployUserName"
- deployPasswordProperty = isSnapshot() ? "snapshotDeployPassword" : "apacheDeployPassword"
+ deployUsernameProperty = isSnapshot() ? "snapshotDeployUserName" : "apacheDeployUserName"
+ deployPasswordProperty = isSnapshot() ? "snapshotDeployPassword" : "apacheDeployPassword"
- canDeploy = [deployUsernameProperty, deployPasswordProperty].every { project.hasProperty(it) }
+ canDeploy = [deployUsernameProperty, deployPasswordProperty].every { project.hasProperty(it) }
- deployUsername = { getProperty(deployUsernameProperty) }
- deployPassword = { getProperty(deployPasswordProperty) }
+ deployUsername = { getProperty(deployUsernameProperty) }
+ deployPassword = { getProperty(deployPasswordProperty) }
}
sonar {
- server {
- url = sonarUrl
- }
- database {
- url = sonarDbUrl
- driverClassName = sonarDbDriverClassName
- username = sonarDbUsername
- password = sonarDbPassword
- }
+ server {
+ url = sonarUrl
+ }
+ database {
+ url = sonarDbUrl
+ driverClassName = sonarDbDriverClassName
+ username = sonarDbUsername
+ password = sonarDbPassword
+ }
}
allprojects {
- apply plugin: "eclipse"
- apply plugin: "idea"
- apply plugin: "signing"
+ apply plugin: "eclipse"
+ apply plugin: "idea"
+ apply plugin: "signing"
- repositories {
- mavenCentral()
+ repositories {
+ mavenCentral()
- // All things JBoss/Hibernate
- mavenRepo name: "JBoss", url: "https://repository.jboss.org/nexus/content/repositories/releases/"
- }
+ // All things JBoss/Hibernate
+ mavenRepo name: "JBoss", url: "https://repository.jboss.org/nexus/content/repositories/releases/"
+ }
- idea {
- project {
- // Technically, Tapestry is built for JDK 1.5, but we're all using Eclipse or IntelliJ with
- // JDK 1.6 at this point.
- jdkName = "1.6"
+ idea {
+ project {
+ // Technically, Tapestry is built for JDK 1.5, but we're all using Eclipse or IntelliJ with
+ // JDK 1.6 at this point.
+ jdkName = "1.6"
+ }
}
- }
- configurations {
- // Non-code artifacts, such as sources JARs and zipped JavaDocs
- meta
- }
+ configurations {
+ // Non-code artifacts, such as sources JARs and zipped JavaDocs
+ meta
+ }
}
// Specific to top-level build, not set for subprojects:
configurations {
- javadoc
- published.extendsFrom archives, meta
- if (doSign) {
- published.extendsFrom signatures
- }
- binaries // additional dependencies included in the binary archive
+ javadoc
+ published.extendsFrom archives, meta
+ if (doSign) {
+ published.extendsFrom signatures
+ }
+ binaries // additional dependencies included in the binary archive
}
dependencies {
- javadoc project(":tapestry-javadoc")
-
- // From tapestry-ioc:
- binaries "javax.inject:javax.inject:1"
- binaries "org.slf4j:slf4j-api:1.6.1"
- binaries "log4j:log4j:1.2.14"
- binaries "org.slf4j:slf4j-log4j12:1.6.1"
- binaries "commons-codec:commons-codec:1.5"
- binaries "org.antlr:antlr-runtime:3.3", { transitive = false }
+ javadoc project(":tapestry-javadoc")
+
+ // From tapestry-ioc:
+ binaries "javax.inject:javax.inject:1"
+ binaries "org.slf4j:slf4j-api:1.6.1"
+ binaries "log4j:log4j:1.2.14"
+ binaries "org.slf4j:slf4j-log4j12:1.6.1"
+ binaries "commons-codec:commons-codec:1.5"
+ binaries "org.antlr:antlr-runtime:3.3", { transitive = false }
}
subprojects {
- version = parent.version
+ version = parent.version
- group = "org.apache.tapestry"
+ group = "org.apache.tapestry"
- configurations {
- provided
- deployerJars
+ configurations {
+ provided
+ deployerJars
- }
+ }
- apply plugin: "java"
- apply plugin: "groovy" // mostly for testing
- apply plugin: "maven"
- apply plugin: "project-report"
+ apply plugin: "java"
+ apply plugin: "groovy" // mostly for testing
+ apply plugin: "maven"
+ apply plugin: "project-report"
- sourceCompatibility = "1.5"
- targetCompatibility = "1.5"
+ sourceCompatibility = "1.5"
+ targetCompatibility = "1.5"
- // See http://jira.codehaus.org/browse/GRADLE-784
+ // See http://jira.codehaus.org/browse/GRADLE-784
- sourceSets {
- main {
- compileClasspath += configurations.provided
+ sourceSets {
+ main {
+ compileClasspath += configurations.provided
+ }
+ test {
+ compileClasspath += configurations.provided
+ runtimeClasspath += configurations.provided
+ }
}
- test {
- compileClasspath += configurations.provided
- runtimeClasspath += configurations.provided
+
+ idea.module {
+ scopes.PROVIDED.plus += configurations.provided
}
- }
- idea.module {
- scopes.PROVIDED.plus += configurations.provided
- }
+ dependencies {
+ groovy "org.codehaus.groovy:groovy-all:1.8.6"
- dependencies {
- groovy "org.codehaus.groovy:groovy-all:1.8.6"
+ deployerJars "org.apache.maven.wagon:wagon-http-lightweight:1.0-beta-6"
+ }
- deployerJars "org.apache.maven.wagon:wagon-http-lightweight:1.0-beta-6"
- }
+ test {
+ useTestNG()
- test {
- useTestNG()
+ options.suites("src/test/conf/testng.xml")
- options.suites("src/test/conf/testng.xml")
+ maxHeapSize "400M"
- maxHeapSize "400M"
+ // Turn off live service reloading
- // Turn off live service reloading
+ systemProperties["tapestry.service-reloading-enabled"] = "false"
- systemProperties["tapestry.service-reloading-enabled"] = "false"
+ jvmArgs("-XX:MaxPermSize=512m", "-Dfile.encoding=UTF-8")
+ }
- jvmArgs("-XX:MaxPermSize=512m", "-Dfile.encoding=UTF-8")
- }
+ jar {
+ from(projectDir) {
+ include "*.txt"
+ into "META-INF"
+ }
+ }
- task sourcesJar(type: Jar) {
- dependsOn classes
- classifier "sources"
- from sourceSets.main.allSource
- }
+ task sourcesJar(type: Jar) {
+ dependsOn classes
+ classifier "sources"
+ from sourceSets.main.allSource
+ from(projectDir) {
+ include "*.txt"
+ into "META-INF"
+ }
+ }
- artifacts {
- meta sourcesJar
- }
+ artifacts {
+ meta sourcesJar
+ }
- configurations {
- // published -- what gets uploaded to the Nexus repository
- published.extendsFrom archives, meta
+ configurations {
+ // published -- what gets uploaded to the Nexus repository
+ published.extendsFrom archives, meta
+
+ if (rootProject.doSign) {
+ published.extendsFrom signatures
+ }
+ }
if (rootProject.doSign) {
- published.extendsFrom signatures
+ // sign (create PGP signature for) archives (standard JARs)
+ // and meta (sources JARs)
+ signing { sign configurations.archives, configurations.meta }
}
- }
- if (rootProject.doSign) {
- // sign (create PGP signature for) archives (standard JARs)
- // and meta (sources JARs)
- signing { sign configurations.archives, configurations.meta }
- }
+ uploadPublished {
- uploadPublished {
+ doFirst {
+ if (!canDeploy) {
+ throw new InvalidUserDataException("Missing upload credentials. Set '$deployUsernameProperty' and '$deployPasswordProperty' root project properties.")
+ }
+ }
- doFirst {
- if (!canDeploy) {
- throw new InvalidUserDataException("Missing upload credentials. Set '$deployUsernameProperty' and '$deployPasswordProperty' root project properties.")
- }
- }
+ if (canDeploy) {
+ repositories {
- if (canDeploy) {
- repositories {
+ project.ext.deployer = repositories.mavenDeployer {
- project.ext.deployer = repositories.mavenDeployer {
-
- if (doSign) {
- beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
- }
+ if (doSign) {
+ beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
+ }
- repository(url: stagingUrl) {
- authentication(userName: deployUsername(), password: deployPassword())
- }
+ repository(url: stagingUrl) {
+ authentication(userName: deployUsername(), password: deployPassword())
+ }
- snapshotRepository(url: snapshotUrl) {
- authentication(userName: deployUsername(), password: deployPassword())
- }
+ snapshotRepository(url: snapshotUrl) {
+ authentication(userName: deployUsername(), password: deployPassword())
+ }
+ }
+ }
}
- }
}
- }
}
subprojects.each { project.evaluationDependsOn(it.name) }
@@ -230,194 +241,194 @@ subprojects.each { project.evaluationDependsOn(it.name) }
task aggregateJavadoc(type: Javadoc) {
- dependsOn configurations.javadoc
- group "Documentation"
-
- description "Build the aggregated JavaDocs for all modules"
- maxMemory "512m"
- destinationDir file("$buildDir/documentation/javadocs")
- configure(options) {
- splitIndex true
- linkSource true
- stylesheetFile file("src/javadoc/stylesheet.css")
- windowTitle "Tapestry API Documentation"
- docTitle "Tapestry JavaDoc ($project.version)"
- bottom 'Copyright © 2003-2012 <a href="http://tapestry.apache.org">The Apache Software Foundation</a>.'
- use = true // 'use' seems to be a reserved word for the DSL
- links "http://download.oracle.com/javase/6/docs/api/"
- links "http://download.oracle.com/javaee/6/api/"
- addStringOption "tagletpath", configurations.javadoc.asPath
- addStringOption "taglet", "org.apache.tapestry5.javadoc.TapestryDocTaglet"
- exclude "org/apache/tapestry5/internal/plastic/asm/**"
- }
-
- def allMainSourceSets = subprojects*.sourceSets*.main.flatten()
- def allMainJavaFiles = allMainSourceSets*.java
- def allMainJavaSrcDirs = allMainJavaFiles*.srcDirs
-
- source allMainJavaFiles
-
- classpath += files(allMainSourceSets*.compileClasspath)
-
- inputs.files allMainJavaSrcDirs
-
- // As part of generating the documentation, ALSO copy any related files:
- // Any extra images (Tapestry logo)
- // Any images stored under src/main/java ... everything exclude .java, .xdoc and package.html
-
- doLast {
- copy {
- from allMainJavaSrcDirs
- into aggregateJavadoc.destinationDir
- exclude "**/*.java"
- exclude "**/*.xdoc"
- exclude "**/package.html"
+ dependsOn configurations.javadoc
+ group "Documentation"
+
+ description "Build the aggregated JavaDocs for all modules"
+ maxMemory "512m"
+ destinationDir file("$buildDir/documentation/javadocs")
+ configure(options) {
+ splitIndex true
+ linkSource true
+ stylesheetFile file("src/javadoc/stylesheet.css")
+ windowTitle "Tapestry API Documentation"
+ docTitle "Tapestry JavaDoc ($project.version)"
+ bottom 'Copyright © 2003-2012 <a href="http://tapestry.apache.org">The Apache Software Foundation</a>.'
+ use = true // 'use' seems to be a reserved word for the DSL
+ links "http://download.oracle.com/javase/6/docs/api/"
+ links "http://download.oracle.com/javaee/6/api/"
+ addStringOption "tagletpath", configurations.javadoc.asPath
+ addStringOption "taglet", "org.apache.tapestry5.javadoc.TapestryDocTaglet"
+ exclude "org/apache/tapestry5/internal/plastic/asm/**"
}
- copy {
- from file("src/javadoc/images")
- into aggregateJavadoc.destinationDir
+ def allMainSourceSets = subprojects*.sourceSets*.main.flatten()
+ def allMainJavaFiles = allMainSourceSets*.java
+ def allMainJavaSrcDirs = allMainJavaFiles*.srcDirs
+
+ source allMainJavaFiles
+
+ classpath += files(allMainSourceSets*.compileClasspath)
+
+ inputs.files allMainJavaSrcDirs
+
+ // As part of generating the documentation, ALSO copy any related files:
+ // Any extra images (Tapestry logo)
+ // Any images stored under src/main/java ... everything exclude .java, .xdoc and package.html
+
+ doLast {
+ copy {
+ from allMainJavaSrcDirs
+ into aggregateJavadoc.destinationDir
+ exclude "**/*.java"
+ exclude "**/*.xdoc"
+ exclude "**/package.html"
+ }
+
+ copy {
+ from file("src/javadoc/images")
+ into aggregateJavadoc.destinationDir
+ }
}
- }
}
dependencies {
- meta aggregateJavadoc.outputs.files
+ meta aggregateJavadoc.outputs.files
}
task continuousIntegration {
- dependsOn subprojects.build, aggregateJavadoc, subprojects.uploadPublished
- description "Task executed on Jenkins CI server after SVN commits"
+ dependsOn subprojects.build, aggregateJavadoc, subprojects.uploadPublished
+ description "Task executed on Jenkins CI server after SVN commits"
}
task wrapper(type: Wrapper) {
- description "Regenerates the Gradle Wrapper files"
+ description "Regenerates the Gradle Wrapper files"
}
task zippedSources(type: Zip) {
- description "Creates a combined Zip file of all sub-project's sources"
- group "Release artifact"
-
- destinationDir buildDir
- baseName "apache-tapestry"
- version project.version
- classifier "sources"
-
- from project.projectDir
- exclude "out/**"
- exclude "**/*.iml"
- exclude "**/*.ipr"
- exclude "**/*.iws"
- exclude "**/.*/**"
- exclude "**/bin/**"
- exclude "**/target/**"
- exclude "**/build/**"
- exclude "**/test-output/**" // Left around by TestNG sometimes
+ description "Creates a combined Zip file of all sub-project's sources"
+ group "Release artifact"
+
+ destinationDir buildDir
+ baseName "apache-tapestry"
+ version project.version
+ classifier "sources"
+
+ from project.projectDir
+ exclude "out/**"
+ exclude "**/*.iml"
+ exclude "**/*.ipr"
+ exclude "**/*.iws"
+ exclude "**/.*/**"
+ exclude "**/bin/**"
+ exclude "**/target/**"
+ exclude "**/build/**"
+ exclude "**/test-output/**" // Left around by TestNG sometimes
}
task zippedJavadoc(type: Zip) {
- dependsOn aggregateJavadoc
- description "Zip archive of the project's aggregate JavaDoc"
- group "Release artifact"
+ dependsOn aggregateJavadoc
+ description "Zip archive of the project's aggregate JavaDoc"
+ group "Release artifact"
- destinationDir buildDir
- baseName "apache-tapestry"
- version project.version
- classifier "javadocs"
+ destinationDir buildDir
+ baseName "apache-tapestry"
+ version project.version
+ classifier "javadocs"
- from aggregateJavadoc.outputs.files
- into "apidocs"
+ from aggregateJavadoc.outputs.files
+ into "apidocs"
}
-task zippedBinaries(type:Zip) {
- description "Zip archive of binaries of each sub-project"
- // TODO: Plus dependencies?
- group "Release artifact"
- // This may create a few unwanted dependencies, but does
- // seem to ensure that the subprojects are created
- inputs.files subprojects*.configurations*.archives.artifacts
-
- destinationDir buildDir
- baseName "apache-tapestry"
- version project.version
- classifier "bin"
-
- // This is via some experimentation
- from subprojects*.configurations*.archives.artifacts*.file*.findAll {
- ! (it.name.endsWith(".asc") || it.name.startsWith("quickstart"))
- }
+task zippedBinaries(type: Zip) {
+ description "Zip archive of binaries of each sub-project"
+ // TODO: Plus dependencies?
+ group "Release artifact"
+ // This may create a few unwanted dependencies, but does
+ // seem to ensure that the subprojects are created
+ inputs.files subprojects*.configurations*.archives.artifacts
+
+ destinationDir buildDir
+ baseName "apache-tapestry"
+ version project.version
+ classifier "bin"
+
+ // This is via some experimentation
+ from subprojects*.configurations*.archives.artifacts*.file*.findAll {
+ !(it.name.endsWith(".asc") || it.name.startsWith("quickstart"))
+ }
- from configurations.binaries
+ from configurations.binaries
- // Pick up various licenses and notices
+ // Pick up various licenses and notices
- from (projectDir) {
- include "*.txt"
- }
+ from(projectDir) {
+ include "*.txt"
+ }
- subprojects.each { sub ->
- from (sub.projectDir) {
- include "*.txt"
- into sub.name
+ subprojects.each { sub ->
+ from(sub.projectDir) {
+ include "*.txt"
+ into sub.name
+ }
}
- }
}
if (canDeploy) {
- configurations {
- archives
- uploads.extendsFrom archives, signatures
- }
+ configurations {
+ archives
+ uploads.extendsFrom archives, signatures
+ }
- artifacts {
- archives zippedJavadoc, zippedSources, zippedBinaries
- }
+ artifacts {
+ archives zippedJavadoc, zippedSources, zippedBinaries
+ }
- configurations {
- upload.extendsFrom archives, signatures
- }
+ configurations {
+ upload.extendsFrom archives, signatures
+ }
- task generateMD5Checksums(type: GenMD5) {
- group "Release artifact"
- description "Creates MD5 checksums for archives of source and JavaDoc"
- source tasks.withType(Zip)
- outputDir "$buildDir/md5"
- }
-
- if (doSign) {
- signing {
- sign configurations.archives
+ task generateMD5Checksums(type: GenMD5) {
+ group "Release artifact"
+ description "Creates MD5 checksums for archives of source and JavaDoc"
+ source tasks.withType(Zip)
+ outputDir "$buildDir/md5"
}
- }
- task uploadArtifacts(type: Scp) {
- group "Release artifact"
- description "Uploads top-level artifacts to people.apache.org, along with MD5 checksums and PGP signatures (if signing is enabled)"
+ if (doSign) {
+ signing {
+ sign configurations.archives
+ }
+ }
+
+ task uploadArtifacts(type: Scp) {
+ group "Release artifact"
+ description "Uploads top-level artifacts to people.apache.org, along with MD5 checksums and PGP signatures (if signing is enabled)"
- source files(generateMD5Checksums, configurations.uploads.allArtifacts.files)
+ source files(generateMD5Checksums, configurations.uploads.allArtifacts.files)
- host "people.apache.org"
- userName deployUsername()
- password deployPassword()
+ host "people.apache.org"
+ userName deployUsername()
+ password deployPassword()
- // The destination folder at people.apache.org needs to already exist.
- destination "public_html/tapestry-releases"
+ // The destination folder at people.apache.org needs to already exist.
+ destination "public_html/tapestry-releases"
- doFirst {
- logger.info "Uploading the following files to people.apache.org (as user '${userName}'):"
- source.files.each { logger.info " $it"}
+ doFirst {
+ logger.info "Uploading the following files to people.apache.org (as user '${userName}'):"
+ source.files.each { logger.info " $it"}
+ }
}
- }
- task generateRelease {
- dependsOn "quickstart:clean", continuousIntegration, subprojects.uploadPublished, uploadArtifacts
- group "Release artifact"
- description "Generates and uploads a final release to Apache Nexus"
- }
+ task generateRelease {
+ dependsOn "quickstart:clean", continuousIntegration, subprojects.uploadPublished, uploadArtifacts
+ group "Release artifact"
+ description "Generates and uploads a final release to Apache Nexus"
+ }
}
boolean isSnapshot() {
- project.version.contains("SNAPSHOT")
+ project.version.contains("SNAPSHOT")
}