Author: uli
Date: Tue Jan 24 13:58:56 2012
New Revision: 1235254

URL: http://svn.apache.org/viewvc?rev=1235254&view=rev
Log:
Define some tasks only if we actually can deploy. Otherwise buildbot fails when 
building the javadocs since it doesn't know the deploy credentials (and doesn't 
have to).

Modified:
    tapestry/tapestry5/trunk/build.gradle

Modified: tapestry/tapestry5/trunk/build.gradle
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/build.gradle?rev=1235254&r1=1235253&r2=1235254&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/build.gradle (original)
+++ tapestry/tapestry5/trunk/build.gradle Tue Jan 24 13:58:56 2012
@@ -312,25 +312,27 @@ task generateMD5Checksums(type: GenMD5) 
   outputDir "$buildDir/md5"
 }
 
-task uploadSourcesAndJavadocs(type: Scp) {
-  group "Release artifact"
-  description "Uploads source and JavaDoc Zips and MD5 checksums to 
people.apache.org"
+if(canDeploy) {
+  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
+    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
+  }
+
+  task generateRelease {
+    dependsOn "quickstart:clean", continuousIntegration, 
subprojects.uploadPublished, uploadSourcesAndJavadocs
+    group "Release artifact"
+    description "Generates and uploads a final release to Apache Nexus"
+  }
 }
 
 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"
-}


Reply via email to