You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2012/01/24 18:51:37 UTC

svn commit: r1235377 - in /tapestry/tapestry5/branches/5.3: ./ gradle/wrapper/ plastic/ quickstart/ quickstart/filtered/archetype-resources/ tapestry-core/ tapestry-hibernate-core/ tapestry-jpa/ tapestry-kaptcha/

Author: hlship
Date: Tue Jan 24 17:51:36 2012
New Revision: 1235377

URL: http://svn.apache.org/viewvc?rev=1235377&view=rev
Log:
Back port Gradle build changes and 1.0-milestone-7 gradle wrapper

Modified:
    tapestry/tapestry5/branches/5.3/build.gradle
    tapestry/tapestry5/branches/5.3/gradle/wrapper/gradle-wrapper.jar
    tapestry/tapestry5/branches/5.3/gradle/wrapper/gradle-wrapper.properties
    tapestry/tapestry5/branches/5.3/gradlew
    tapestry/tapestry5/branches/5.3/gradlew.bat
    tapestry/tapestry5/branches/5.3/plastic/build.gradle
    tapestry/tapestry5/branches/5.3/quickstart/build.gradle
    tapestry/tapestry5/branches/5.3/quickstart/filtered/archetype-resources/build.gradle
    tapestry/tapestry5/branches/5.3/tapestry-core/build.gradle
    tapestry/tapestry5/branches/5.3/tapestry-hibernate-core/build.gradle
    tapestry/tapestry5/branches/5.3/tapestry-jpa/build.gradle
    tapestry/tapestry5/branches/5.3/tapestry-kaptcha/build.gradle

Modified: tapestry/tapestry5/branches/5.3/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/build.gradle?rev=1235377&r1=1235376&r2=1235377&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/build.gradle (original)
+++ tapestry/tapestry5/branches/5.3/build.gradle Tue Jan 24 17:51:36 2012
@@ -1,297 +1,316 @@
 description = "Apache Tapestry 5 Project"
 
-// Remember that when generating a release, this should be incremented. Also don't forget to
+apply plugin: "base"
+apply from: "ssh.gradle"
+apply from: "md5.gradle"
+
+// Remember that when generating a release, this should be incremented. Also don"t forget to
 // tag the release in Subversion.
 tapestryVersion = "5.3.2-RC1"
 
-jettyVersion = '7.0.0.v20091005'
-tomcatVersion = '6.0.30'
-testngVersion = '5.14.9'
-easymockVersion = '3.0'
-servletAPIVersion = '2.5'
+jettyVersion = "7.0.0.v20091005"
+tomcatVersion = "6.0.30"
+testngVersion = "5.14.9"
+easymockVersion = "3.0"
+servletAPIVersion = "2.5"
 
-// Provided so that Jenkins can override the normal version number for nightly builds.
-version = System.getProperty('project-version', tapestryVersion)
+// Provided so that the CI server can override the normal version number for nightly builds.
+version = System.getProperty("project-version", tapestryVersion)
 
 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")
 
-buildscript {
-    repositories {
-        mavenLocal()
-        mavenRepo name: "Gradle", urls: "http://repo.gradle.org/gradle/plugins-snapshots/"
-    }
-    dependencies {
-        classpath "org.gradle.plugins:gradle-signing-plugin:0.0.1-SNAPSHOT"
-    }
-}
+// apacheDeployUserName and apacheDeployPassword should be specified in ~/.gradle/gradle.properties
+
+deployUsernameProperty = isSnapshot() ? "snapshotDeployUserName" : "apacheDeployUserName"
+deployPasswordProperty = isSnapshot() ? "snapshotDeployPassword" : "apacheDeployPassword"
+
+canDeploy = [deployUsernameProperty, deployPasswordProperty].every { project.hasProperty(it) }
+deployUsername = { getProperty(deployUsernameProperty) }
+deployPassword = { getProperty(deployPasswordProperty) }
 
 allprojects {
 
-    apply plugin: 'eclipse'
-    apply plugin: 'idea'
+  apply plugin: "eclipse"
+  apply plugin: "idea"
 
-    ideaProject {
-        javaVersion = 1.5
-        beforeConfigured { project ->
-            project.modulePaths.clear()
-        }
-    }
+  repositories {
+    mavenCentral()
 
-    repositories {
-        mavenCentral()
+    // 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"
+    }
+  }
+
+  configurations {
+    // Non-code artifacts, such as sources JARs and zipped JavaDocs
+    meta
+  }
 
-        // All things JBoss/Javassist/Hibernate
-        mavenRepo urls: "https://repository.jboss.org/nexus/content/repositories/releases/"
-    }
+}
+
+// Specific to top-level build, not set for subprojects:
+
+configurations {
+  javadoc
+  published.extendsFrom archives, meta
+  if (doSign) {
+    published.extendsFrom signatures
+  }
+}
+
+dependencies {
+  javadoc project(":tapestry-javadoc")
 }
 
 subprojects {
-    version = parent.version
+  version = parent.version
 
-    group = 'org.apache.tapestry'
+  group = "org.apache.tapestry"
 
-    configurations {
-        provided
-        deployerJars
+  configurations {
+    provided
+    deployerJars
 
-        // meta -- non-code artifacts, such as sources and javadoc JARs
-        meta
-    }
+  }
 
-    apply plugin: 'java'
-    apply plugin: 'groovy' // mostly for testing
-    apply plugin: 'maven'
-    apply plugin: 'project-report'
-
-    sourceCompatibility = '1.5'
-    targetCompatibility = '1.5'
-
-    // See http://jira.codehaus.org/browse/GRADLE-784
-
-    sourceSets {
-        main {
-            compileClasspath += configurations.provided
-        }
-        test {
-            compileClasspath += configurations.provided
-            runtimeClasspath += configurations.provided
-        }
-    }
+  apply plugin: "java"
+  apply plugin: "groovy" // mostly for testing
+  apply plugin: "maven"
+  apply plugin: "project-report"
 
-    ideaModule {
-        scopes.PROVIDED.plus += configurations.provided
-    }
+  sourceCompatibility = "1.5"
+  targetCompatibility = "1.5"
 
-    dependencies {
-        groovy "org.codehaus.groovy:groovy-all:1.7.4"
+  // See http://jira.codehaus.org/browse/GRADLE-784
 
-        deployerJars "org.apache.maven.wagon:wagon-http-lightweight:1.0-beta-6"
+  sourceSets {
+    main {
+      compileClasspath += configurations.provided
     }
-
     test {
-        useTestNG()
+      compileClasspath += configurations.provided
+      runtimeClasspath += configurations.provided
+    }
+  }
 
-        options.suites("src/test/conf/testng.xml")
+  idea.module {
+    scopes.PROVIDED.plus += configurations.provided
+  }
 
-        maxHeapSize = "400M"
+  dependencies {
+    groovy "org.codehaus.groovy:groovy-all:1.7.4"
 
-        // Turn off live service reloading
+    deployerJars "org.apache.maven.wagon:wagon-http-lightweight:1.0-beta-6"
+  }
 
-        systemProperties["tapestry.service-reloading-enabled"] = "false"
+  test {
+    useTestNG()
 
-        jvmArgs("-XX:MaxPermSize=512m")
-    }
+    options.suites("src/test/conf/testng.xml")
 
-    task sourcesJar(type: Jar, dependsOn: classes) {
-        classifier = 'sources'
-        from sourceSets.main.allSource
-    }
+    maxHeapSize "400M"
 
-    artifacts {
-        meta sourcesJar
-    }
+    // Turn off live service reloading
 
+    systemProperties["tapestry.service-reloading-enabled"] = "false"
 
-    configurations {
-        // published -- what gets uploaded to the Nexus repository
-        published.extendsFrom archives, meta
+    jvmArgs("-XX:MaxPermSize=512m", "-Dfile.encoding=UTF-8")
+  }
 
-        if (doSign)
-        { published.extendsFrom signatures }
-    }
+  task sourcesJar(type: Jar) {
+    dependsOn classes
+    classifier "sources"
+    from sourceSets.main.allSource
+  }
 
-    if (doSign)
-    {
-        apply plugin: 'signing'
-        // sign (create PGP signature for) archives (standard JARs)
-        // and meta (sources JARs)
-        signing { sign configurations.archives, configurations.meta }
-    }
+  artifacts {
+    meta sourcesJar
+  }
 
-    // apacheDeployUserName and apacheDeployPassword should be specified in ~/.gradle/gradle.properties
 
-    deployUsernameProperty = isSnapshot() ? "snapshotDeployUserName" : "apacheDeployUserName"
-    deployPasswordProperty = isSnapshot() ? "snapshotDeployPassword" : "apacheDeployPassword"
-    canDeploy = [deployUsernameProperty, deployPasswordProperty].every { project.hasProperty(it) }
-
-    uploadPublished {
-
-        doFirst {
-            if (!canDeploy)
-            {
-                throw new InvalidUserDataException("Missing upload credentials. Set '$deployUsernameProperty' and '$deployPasswordProperty' project properties.")
-            }
-        }
+  configurations {
+    // published -- what gets uploaded to the Nexus repository
+    published.extendsFrom archives, meta
 
-        if (canDeploy)
-        {
-            repositories {
-
-                project.deployer = repositories.mavenDeployer {
-
-                    if (doSign)
-                    {
-                        beforeDeployment { MavenDeployment deployment ->
-                            def signedPomArtifact = sign(deployment.pomArtifact).singleArtifact
-                            // See http://issues.gradle.org/browse/GRADLE-1589
-                            signedPomArtifact.type = "pom." + signing.type.extension
-                            deployment.addArtifact(signedPomArtifact)
-                        }
-                    }
-
-                    repository(url: stagingUrl) {
-                        authentication(userName: project.getProperty(deployUsernameProperty), password: project.getProperty(deployPasswordProperty))
-                    }
-
-                    snapshotRepository(url: snapshotUrl) {
-                        authentication(userName: project.getProperty(deployUsernameProperty), password: project.getProperty(deployPasswordProperty))
-                    }
-                }
-            }
-        }
+    if (rootProject.doSign) {
+      published.extendsFrom signatures
     }
-}
+  }
 
-// Specific to top-level build, not set for subprojects:
+  if (rootProject.doSign) {
+    apply plugin: "signing"
+    // sign (create PGP signature for) archives (standard JARs)
+    // and meta (sources JARs)
+    signing { sign configurations.archives, configurations.meta }
+  }
 
-configurations {
-    javadoc
-    published.extendsFrom archives, meta
-    if (doSign)
-    { published.extendsFrom signatures }
-}
+  uploadPublished {
 
-dependencies {
-    javadoc project(':tapestry-javadoc')
-}
+    doFirst {
+      if (!canDeploy) {
+        throw new InvalidUserDataException("Missing upload credentials. Set '$deployUsernameProperty' and '$deployPasswordProperty' root project properties.")
+      }
+    }
 
-subprojects.each { project.evaluationDependsOn(it.name) }
+    if (canDeploy) {
+      repositories {
 
-// Cribbed from https://github.com/hibernate/hibernate-core/blob/master/release/release.gradle#L19
+        project.deployer = repositories.mavenDeployer {
 
-javadocBuildDir = dir(buildDirName + "/documentation/javadocs")
+          repository(url: stagingUrl) {
+            authentication(userName: deployUsername(), password: deployPassword())
+          }
 
-task aggregateJavadoc(type: Javadoc, group: "Documentation") {
+          snapshotRepository(url: snapshotUrl) {
+            authentication(userName: deployUsername(), password: deployPassword())
+          }
+        }
+      }
+    }
+  }
+}
 
-    dependsOn configurations.javadoc
+subprojects.each { project.evaluationDependsOn(it.name) }
 
-    description = "Build the aggregated JavaDocs for all modules"
-    maxMemory = '512m'
-    destinationDir = javadocBuildDir.dir
-    configure(options) {
-        // overview = new File( projectDir, 'src/javadoc/package.html' )
-        splitIndex = true
-        linkSource = true
-        stylesheetFile = new File(projectDir, 'src/javadoc/stylesheet.css')
-        windowTitle = 'Tapestry API Documentation'
-        docTitle = "Tapestry JavaDoc ($project.version)"
-        bottom = "Copyright &copy; 2003-2011 <a href=\"http://tapestry.apache.org\">The Apache Software Foundation</a>."
-        use = true
-        links = ['http://download.oracle.com/javase/6/docs/api/', '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/**"
-    }
+// Cribbed from https://github.com/hibernate/hibernate-core/blob/master/release/release.gradle#L19
 
-    subprojects.findAll({ sp -> sp.name != "quickstart" }).each { sp ->
-        sp.sourceSets.all.findAll { set -> set.name != "test" }.each { set ->
+task aggregateJavadoc(type: Javadoc) {
 
-            source set.java
+  dependsOn configurations.javadoc
+  group "Documentation"
 
-            classpath += set.classes + set.compileClasspath
+  description "Build the aggregated JavaDocs for all modules"
+  maxMemory "512m"
+  destinationDir file("$buildDirName/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 &copy; 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
 
-            // Some of the component .xdoc files refer to PNG images
-            // (we could also exclude .java and .xdoc)
-            copy {
-                from set.java.srcDirs.toList()
-                into javadocBuildDir.dir
-                include '**/*.png'
-            }
-        }
+  doLast {
+    copy {
+      from allMainJavaSrcDirs
+      into aggregateJavadoc.destinationDir
+      exclude "**/*.java"
+      exclude "**/*.xdoc"
+      exclude "**/package.html"
     }
-}
 
-aggregateJavadoc.doLast {
     copy {
-        from new File(projectDir, 'src/javadoc/images')
-        into new File(javadocBuildDir.dir, "/images")
+      from file("src/javadoc/images")
+      into aggregateJavadoc.destinationDir
     }
+  }
 }
 
-task clean(type: Delete) {
-    delete buildDirName
+dependencies {
+  meta aggregateJavadoc.outputs.files
 }
 
-task continuousIntegration(dependsOn: [subprojects.build, 'aggregateJavadoc', subprojects.uploadPublished],
-        description: "Task executed on Jenkins CI server after SVN commits")
-
-task generateRelease(dependsOn: ['quickstart:clean', 'continuousIntegration', subprojects.uploadPublished, 'zippedSources', 'zippedJavadoc'],
-        group: "Release artifact",
-        description: "Generates and uploads a final release to Apache Nexus")
+task continuousIntegration {
+  dependsOn subprojects.build, aggregateJavadoc, subprojects.uploadPublished
+  description "Task executed on Jenkins CI server after SVN commits"
+}
 
 task wrapper(type: Wrapper) {
-    gradleVersion = '1.0-milestone-3'
-    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"
+  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"
-
-    destinationDir = buildDir
-    baseName = "apache-tapestry"
-    version = project.version
-    classifier = "javadocs"
-
-    from javadocBuildDir.dir
-    into "apidocs"
-}
-
-boolean isSnapshot()
-{
-    project.version.contains('SNAPSHOT')
-}
+  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"
+
+  destinationDir buildDir
+  baseName "apache-tapestry"
+  version project.version
+  classifier "javadocs"
+
+  from aggregateJavadoc.outputs.files
+  into "apidocs"
+}
+
+task generateMD5Checksums(type: GenMD5) {
+  group "Release artifact"
+  description "Creates MD5 checksums for zippedJavadoc and zippedSources"
+  source zippedJavadoc, zippedSources
+  outputDir "$buildDir/md5"
+}
+
+task uploadSourcesAndJavadocs(type: Scp) {
+  group "Release artifact"
+  description "Uploads source and JavaDoc Zips and MD5 checksums to people.apache.org"
+
+  source files(generateMD5Checksums, generateMD5Checksums.inputs.files)
+  host "people.apache.org"
+  userName deployUsername()
+  password deployPassword()
+  // The destination folder needs to already exist.
+  destination "public_html/tapestry-releases"
+  verbose true
+}
+
+boolean isSnapshot() {
+  project.version.contains("SNAPSHOT")
+}
+
+task generateRelease {
+  dependsOn "quickstart:clean", continuousIntegration, subprojects.uploadPublished, uploadSourcesAndJavadocs
+  group "Release artifact"
+  description "Generates and uploads a final release to Apache Nexus"
+}
\ No newline at end of file

Modified: tapestry/tapestry5/branches/5.3/gradle/wrapper/gradle-wrapper.jar
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/gradle/wrapper/gradle-wrapper.jar?rev=1235377&r1=1235376&r2=1235377&view=diff
==============================================================================
Files tapestry/tapestry5/branches/5.3/gradle/wrapper/gradle-wrapper.jar (original) and tapestry/tapestry5/branches/5.3/gradle/wrapper/gradle-wrapper.jar Tue Jan 24 17:51:36 2012 differ

Modified: tapestry/tapestry5/branches/5.3/gradle/wrapper/gradle-wrapper.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/gradle/wrapper/gradle-wrapper.properties?rev=1235377&r1=1235376&r2=1235377&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/gradle/wrapper/gradle-wrapper.properties (original)
+++ tapestry/tapestry5/branches/5.3/gradle/wrapper/gradle-wrapper.properties Tue Jan 24 17:51:36 2012
@@ -1,6 +1,6 @@
-#Wed Jun 08 17:10:51 PDT 2011
+#Tue Jan 24 09:36:54 PST 2012
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-3-bin.zip
+distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-7-bin.zip

Modified: tapestry/tapestry5/branches/5.3/gradlew
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/gradlew?rev=1235377&r1=1235376&r2=1235377&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/gradlew (original)
+++ tapestry/tapestry5/branches/5.3/gradlew Tue Jan 24 17:51:36 2012
@@ -1,16 +1,16 @@
 #!/bin/bash
 
 ##############################################################################
-##                                                                          ##
-##  Gradle wrapper script for UN*X                                         ##
-##                                                                          ##
+##
+##  Gradle start up script for UN*X
+##
 ##############################################################################
 
-# Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
-# GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
-# JAVA_OPTS="$JAVA_OPTS -Xmx512m"
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
 
-GRADLE_APP_NAME=Gradle
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
 
 # Use the maximum available, or set MAX_FD != -1 to use that value.
 MAX_FD="maximum"
@@ -42,54 +42,51 @@ case "`uname`" in
     ;;
 esac
 
-# Attempt to set JAVA_HOME if it's not already set.
-if [ -z "$JAVA_HOME" ] ; then
-    if $darwin ; then
-        [ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] && export JAVA_HOME="/Library/Java/Home"
-        [ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] && export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
-    else
-        javaExecutable="`which javac`"
-        [ -z "$javaExecutable" -o "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ] && die "JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME."
-        # readlink(1) is not available as standard on Solaris 10.
-        readLink=`which readlink`
-        [ `expr "$readLink" : '\([^ ]*\)'` = "no" ] && die "JAVA_HOME not set and readlink not available, please set JAVA_HOME."
-        javaExecutable="`readlink -f \"$javaExecutable\"`"
-        javaHome="`dirname \"$javaExecutable\"`"
-        javaHome=`expr "$javaHome" : '\(.*\)/bin'`
-        export JAVA_HOME="$javaHome"
-    fi
-fi
-
 # For Cygwin, ensure paths are in UNIX format before anything is touched.
 if $cygwin ; then
-    [ -n "$JAVACMD" ] && JAVACMD=`cygpath --unix "$JAVACMD"`
     [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
 fi
 
-STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
-CLASSPATH=`dirname "$0"`/gradle/wrapper/gradle-wrapper.jar
-WRAPPER_PROPERTIES=`dirname "$0"`/gradle/wrapper/gradle-wrapper.properties
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/"
+APP_HOME="`pwd -P`"
+cd "$SAVED"
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
 # Determine the Java command to use to start the JVM.
-if [ -z "$JAVACMD" ] ; then
-    if [ -n "$JAVA_HOME" ] ; then
-        if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-            # IBM's JDK on AIX uses strange locations for the executables
-            JAVACMD="$JAVA_HOME/jre/sh/java"
-        else
-            JAVACMD="$JAVA_HOME/bin/java"
-        fi
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
     else
-        JAVACMD="java"
+        JAVACMD="$JAVA_HOME/bin/java"
     fi
-fi
-if [ ! -x "$JAVACMD" ] ; then
-    die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
 
 Please set the JAVA_HOME variable in your environment to match the
 location of your Java installation."
-fi
-if [ -z "$JAVA_HOME" ] ; then
-    warn "JAVA_HOME environment variable is not set"
 fi
 
 # Increase the maximum file descriptors if we can.
@@ -108,15 +105,15 @@ if [ "$cygwin" = "false" -a "$darwin" = 
     fi
 fi
 
-# For Darwin, add GRADLE_APP_NAME to the JAVA_OPTS as -Xdock:name
+# For Darwin, add APP_NAME to the JAVA_OPTS as -Xdock:name
 if $darwin; then
-    JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRADLE_APP_NAME"
+    JAVA_OPTS="$JAVA_OPTS -Xdock:name=$APP_NAME"
 # we may also want to set -Xdock:image
 fi
 
 # For Cygwin, switch paths to Windows format before running java
 if $cygwin ; then
-    JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"`
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
     CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
 
     # We build the pattern for arguments to be converted via cygpath
@@ -143,7 +140,7 @@ if $cygwin ; then
             eval `echo args$i`="\"$arg\""
         fi
         i=$((i+1))
-    done 
+    done
     case $i in
         (0) set -- ;;
         (1) set -- "$args0" ;;
@@ -158,11 +155,11 @@ if $cygwin ; then
     esac
 fi
 
-GRADLE_APP_BASE_NAME=`basename "$0"`
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
 
-exec "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
-        -classpath "$CLASSPATH" \
-        -Dorg.gradle.appname="$GRADLE_APP_BASE_NAME" \
-        -Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
-        $STARTER_MAIN_CLASS \
-        "$@"
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

Modified: tapestry/tapestry5/branches/5.3/gradlew.bat
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/gradlew.bat?rev=1235377&r1=1235376&r2=1235377&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/gradlew.bat (original)
+++ tapestry/tapestry5/branches/5.3/gradlew.bat Tue Jan 24 17:51:36 2012
@@ -1,82 +1,90 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem                                                                         ##
-@rem  Gradle startup script for Windows                                      ##
-@rem                                                                         ##
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
-@rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512m
-@rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512m
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.\
-
-@rem Find java.exe
-set JAVA_EXE=java.exe
-if not defined JAVA_HOME goto init
-
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-echo.
-goto end
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
-set CLASSPATH=%DIRNAME%\gradle\wrapper\gradle-wrapper.jar
-set WRAPPER_PROPERTIES=%DIRNAME%\gradle\wrapper\gradle-wrapper.properties
-
-set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%"
-
-@rem Execute Gradle
-"%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1
-
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit "%ERRORLEVEL%"
-exit /b "%ERRORLEVEL%"
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
\ No newline at end of file
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

Modified: tapestry/tapestry5/branches/5.3/plastic/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/plastic/build.gradle?rev=1235377&r1=1235376&r2=1235377&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/plastic/build.gradle (original)
+++ tapestry/tapestry5/branches/5.3/plastic/build.gradle Tue Jan 24 17:51:36 2012
@@ -9,6 +9,3 @@ dependencies {
 
 sourceSets.main.java.srcDir "src/external/java"
 
-test {
-	useJUnit()
-}
\ No newline at end of file

Modified: tapestry/tapestry5/branches/5.3/quickstart/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/quickstart/build.gradle?rev=1235377&r1=1235376&r2=1235377&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/quickstart/build.gradle (original)
+++ tapestry/tapestry5/branches/5.3/quickstart/build.gradle Tue Jan 24 17:51:36 2012
@@ -7,10 +7,10 @@ task processFiltered(type: Copy) {
 
     inputs.file srcDir
     inputs.file file("../build.gradle")
-    outputs.dir sourceSets.main.classesDir
+    outputs.dir sourceSets.main.output.classesDir
 
     from srcDir
-    into sourceSets.main.classesDir
+    into sourceSets.main.output.classesDir
 
     // Use some of the filters provided by Ant
     filter(FixCrLfFilter)

Modified: tapestry/tapestry5/branches/5.3/quickstart/filtered/archetype-resources/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/quickstart/filtered/archetype-resources/build.gradle?rev=1235377&r1=1235376&r2=1235377&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/quickstart/filtered/archetype-resources/build.gradle (original)
+++ tapestry/tapestry5/branches/5.3/quickstart/filtered/archetype-resources/build.gradle Tue Jan 24 17:51:36 2012
@@ -13,17 +13,17 @@ version = "${version}"
 repositories {
     mavenCentral()
 
-    // All things JBoss/Javassist/Hibernate
-    mavenRepo urls: "http://repository.jboss.org/nexus/content/groups/public/"
+    // All things JBoss/Hibernate
+    mavenRepo name: "JBoss", url: "http://repository.jboss.org/nexus/content/groups/public/"
 
     // For stable versions of the tapx libraries
-    mavenRepo urls: "http://howardlewisship.com/repository/"
+    mavenRepo name: "HLS", url: "http://howardlewisship.com/repository/"
 
     // For non-stable versions of the tapx libraries
-    mavenRepo urls: "http://howardlewisship.com/snapshot-repository/"
+    mavenRepo name: "HLS Snapshots", url: "http://howardlewisship.com/snapshot-repository/"
 
     // For access to Apache Staging (Preview) packages
-    mavenRepo urls: "https://repository.apache.org/content/groups/staging"
+    mavenRepo name: "Apache Staging", url: "https://repository.apache.org/content/groups/staging"
 }
 
 // This simulates Maven's "provided" scope, until it is officially supported by Gradle

Modified: tapestry/tapestry5/branches/5.3/tapestry-core/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/tapestry-core/build.gradle?rev=1235377&r1=1235376&r2=1235377&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/tapestry-core/build.gradle (original)
+++ tapestry/tapestry5/branches/5.3/tapestry-core/build.gradle Tue Jan 24 17:51:36 2012
@@ -1,4 +1,5 @@
 import org.apache.tools.ant.filters.*
+import org.gradle.api.specs.AndSpec
 
 description = "Central module for Tapestry, containing all core services and components"
 
@@ -6,59 +7,61 @@ antlrSource = "src/main/antlr"
 antlrOutput = "$buildDir/generated-sources/antlr"
 
 configurations {
-    antlr3
+  antlr3
 }
 
 sourceSets.main.java.srcDir antlrOutput
 
 dependencies {
-    compile project(':tapestry-ioc')
-    compile project(':tapestry-json')
+  compile project(':tapestry-ioc')
+  compile project(':tapestry-json')
 
-    provided project(":tapestry-test")
-    provided "javax.servlet:servlet-api:$servletAPIVersion"
+  provided project(":tapestry-test")
+  provided "javax.servlet:servlet-api:$servletAPIVersion"
 
-    compile "commons-codec:commons-codec:1.5"
+  compile "commons-codec:commons-codec:1.5"
 
-    // Transitive will bring in the unwanted string template library as well
-    compile "org.antlr:antlr-runtime:3.3", { transitive = false }
+  // Transitive will bring in the unwanted string template library as well
+  compile "org.antlr:antlr-runtime:3.3", { transitive = false }
 
-    // Antlr3 tool path used with the antlr3 task
-    antlr3 "org.antlr:antlr:3.3"
+  // Antlr3 tool path used with the antlr3 task
+  antlr3 "org.antlr:antlr:3.3"
 
-    testRuntime "org.hsqldb:hsqldb:1.8.0.10"
+  testRuntime "org.hsqldb:hsqldb:1.8.0.10"
 }
 
 // This may spin out as a plugin once we've got the details down pat
 
-task generateGrammarSource {
-    description = "Generates Java sources from Antlr3 grammars."
-    inputs.dir file(antlrSource)
-    outputs.dir file(antlrOutput)
-} << {
-    mkdir(antlrOutput)
-
-    // Might have a problem here if the current directory has a space in its name
-
-    def grammars = fileTree(antlrSource).include("**/*.g")
-
-    ant.java(classname: 'org.antlr.Tool', fork: true, classpath: "${configurations.antlr3.asPath}") {
-        arg(line: "-o ${antlrOutput}/org/apache/tapestry5/internal/antlr")
-        arg(line: grammars.files.join(" "))
-    }
+task generateGrammarSource(type: JavaExec) {
+  description "Generates Java sources from Antlr3 grammars."
+  inputs.source fileTree(dir: antlrSource, include: "**/*.g")
+  outputs.dir file(antlrOutput)
+
+  // See http://forums.gradle.org/gradle/topics/why_does_a_task_execute_even_when_inputs_and_outputs_are_defined_and_nothing_has_changed
+  outputs.upToDateSpec = new AndSpec();
+
+  classpath configurations.antlr3
+
+  main "org.antlr.Tool"
+  args "-o", "${antlrOutput}/org/apache/tapestry5/internal/antlr"
+  args inputs.sourceFiles
+
+  doFirst {
+    logger.info "Executing Antlr3 grammar generation:\n${commandLine.join(' ')}"
+  }
 }
 
-ideaModule.doFirst {
+ideaModule.dependsOn generateGrammarSource
 
-    tasks.generateGrammarSource.execute()
+ideaModule.doFirst {
 
-    excludeDirs -= buildDir
+  excludeDirs -= buildDir
 
-    def generatedDir = file("$buildDir/generated-sources")
+  def generatedDir = file("$buildDir/generated-sources")
 
-    def buildMinusGeneratedDir = (buildDir.listFiles() - generatedDir) as Set<File>
+  def buildMinusGeneratedDir = (buildDir.listFiles() - generatedDir) as Set<File>
 
-    excludeDirs += buildMinusGeneratedDir
+  excludeDirs += buildMinusGeneratedDir
 }
 
 compileJava.options.fork(memoryMaximumSize: '512m')
@@ -68,7 +71,7 @@ compileJava.dependsOn generateGrammarSou
 compileTestGroovy.dependsOn compileTestJava
 
 jar {
-    from("src/main/filtered-resources") {
-        filter(ReplaceTokens, tokens: [version: project.version])
-    }
+  from("src/main/filtered-resources") {
+    filter(ReplaceTokens, tokens: [version: project.version])
+  }
 }

Modified: tapestry/tapestry5/branches/5.3/tapestry-hibernate-core/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/tapestry-hibernate-core/build.gradle?rev=1235377&r1=1235376&r2=1235377&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/tapestry-hibernate-core/build.gradle (original)
+++ tapestry/tapestry5/branches/5.3/tapestry-hibernate-core/build.gradle Tue Jan 24 17:51:36 2012
@@ -12,6 +12,7 @@ dependencies {
   runtime "geronimo-spec:geronimo-spec-jta:1.0-M1"  
   runtime "antlr:antlr:2.7.6"
   runtime "dom4j:dom4j:1.6.1"
+  runtime "javassist:javassist:3.12.1.GA"
   
     
   testCompile project(':tapestry-test')

Modified: tapestry/tapestry5/branches/5.3/tapestry-jpa/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/tapestry-jpa/build.gradle?rev=1235377&r1=1235376&r2=1235377&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/tapestry-jpa/build.gradle (original)
+++ tapestry/tapestry5/branches/5.3/tapestry-jpa/build.gradle Tue Jan 24 17:51:36 2012
@@ -2,7 +2,7 @@ description = "Provides support for simp
 
 dependencies {
   compile project(':tapestry-core')
-  compile "org.eclipse.persistence:javax.persistence:2.0.3"
+  compile "org.apache.geronimo.specs:geronimo-jpa_2.0_spec:1.1"
   
   testCompile project(':tapestry-test')
   
@@ -13,7 +13,7 @@ dependencies {
 }
 
 repositories {
-  mavenRepo urls: "http://download.eclipse.org/rt/eclipselink/maven.repo/"
+  mavenRepo name: "EclipseLink", url: "http://download.eclipse.org/rt/eclipselink/maven.repo/"
 }
 
 test {

Modified: tapestry/tapestry5/branches/5.3/tapestry-kaptcha/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/tapestry-kaptcha/build.gradle?rev=1235377&r1=1235376&r2=1235377&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/tapestry-kaptcha/build.gradle (original)
+++ tapestry/tapestry5/branches/5.3/tapestry-kaptcha/build.gradle Tue Jan 24 17:51:36 2012
@@ -8,7 +8,7 @@ dependencies {
 }
 
 repositories {
-  mavenRepo urls: "http://howardlewisship.com/repository/"
+  mavenRepo name: "HLS", url: "http://howardlewisship.com/repository/"
 }
 
 jar {