Repository: incubator-samza
Updated Branches:
  refs/heads/0.7.0 257a59ec5 -> 052de224a


SAMZA-283: Resolve gradle wrapper jar issue


Project: http://git-wip-us.apache.org/repos/asf/incubator-samza/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-samza/commit/052de224
Tree: http://git-wip-us.apache.org/repos/asf/incubator-samza/tree/052de224
Diff: http://git-wip-us.apache.org/repos/asf/incubator-samza/diff/052de224

Branch: refs/heads/0.7.0
Commit: 052de224a3256cc652032de5e804338b4dc92fe0
Parents: 257a59e
Author: Jakob Homan <[email protected]>
Authored: Fri Jun 13 16:23:35 2014 -0700
Committer: Jakob Homan <[email protected]>
Committed: Fri Jun 13 16:23:35 2014 -0700

----------------------------------------------------------------------
 README.md                                |  8 ++++-
 RELEASE.md                               | 10 ++++++
 bootstrap.gradle                         | 31 ++++++++++++++++
 build.gradle                             |  2 ++
 gradle.properties                        |  4 +++
 gradle/release.gradle                    | 51 +++++++++++++++++++++++++++
 gradle/wrapper/gradle-wrapper.properties |  2 +-
 gradlew                                  |  2 +-
 8 files changed, 107 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/052de224/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index f6bfa9f..552a91a 100644
--- a/README.md
+++ b/README.md
@@ -14,10 +14,16 @@ Check out [Hello Samza](/startup/hello-samza/0.7.0) to try 
Samza. Read the [Back
 
 ### Building Samza
 
-To build Samza, run:
+To build Samza from a git checkout or binary release, run:
 
     ./gradlew clean build
 
+To build Samza from a source release, it is first necessary to download the 
gradle wrapper script above. This bootstrapping process requires Gradle to be 
installed on the source machine.  Gradle is available through most package 
managers or directly from [its website](http://www.gradle.org/).  To bootstrap 
the wrapper, run:
+
+    gradle -b bootstrap.gradle
+
+After the bootstrap script has completed, the regular gradlew instructions 
below are available.
+
 #### Scala and YARN
 
 Samza builds with [Scala](http://www.scala-lang.org/) 2.10 and 
[YARN](http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/YARN.html)
 2.2.0, by default. Use the -PscalaVersion switches to change Scala versions. 
Samza supports building Scala with 2.9.2, or 2.10.

http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/052de224/RELEASE.md
----------------------------------------------------------------------
diff --git a/RELEASE.md b/RELEASE.md
index 5a7eabc..3d34f9f 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -10,3 +10,13 @@ To release to a local Maven repository:
 
     ./gradlew clean publishToMavenLocal
     ./gradlew -PscalaVersion=2.9.2 clean publishToMavenLocal
+
+To build a tarball suitable for an ASF source release (and its accompanying 
MD5 file):
+
+First, clean any non-checked-in files from git (this removes all such files 
without prompting):
+
+    git clean -d -f
+
+Then build the tarball:
+
+    ./gradlew clean sourceRelease

http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/052de224/bootstrap.gradle
----------------------------------------------------------------------
diff --git a/bootstrap.gradle b/bootstrap.gradle
new file mode 100644
index 0000000..49fb0d9
--- /dev/null
+++ b/bootstrap.gradle
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+/**
+ * This file allows a source release of Samza, which is prohibited
+ * from containing jars, to be able to download the gradle wrapper
+ * and its accompanying jars.
+ */
+
+defaultTasks 'downloadWrapper'
+
+task downloadWrapper(type: Wrapper) {
+    description = "Download the gradle wrapper and requisite files. Overwrites 
existing wrapper files."
+    gradleVersion = project.gradleVersion
+}

http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/052de224/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 7aeae14..b5ecacd 100644
--- a/build.gradle
+++ b/build.gradle
@@ -39,6 +39,7 @@ apply from: file('gradle/license.gradle')
 apply from: file('gradle/environment.gradle')
 apply from: file("gradle/dependency-versions.gradle")
 apply from: file("gradle/dependency-versions-scala-" + scalaVersion + 
".gradle")
+apply from: file("gradle/release.gradle")
 
 allprojects {
   apply plugin: 'idea'
@@ -276,3 +277,4 @@ project(":samza-test_$scalaVersion") {
     systemProperties = System.properties.findAll { it.key.startsWith("samza") }
   }
 }
+

http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/052de224/gradle.properties
----------------------------------------------------------------------
diff --git a/gradle.properties b/gradle.properties
index da0de97..a940b4f 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -17,3 +17,7 @@
 group=org.apache.samza
 version=0.7.0
 scalaVersion=2.10
+
+gradleVersion=1.6
+
+org.gradle.jvmargs="-XX:MaxPermSize=512m"

http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/052de224/gradle/release.gradle
----------------------------------------------------------------------
diff --git a/gradle/release.gradle b/gradle/release.gradle
new file mode 100644
index 0000000..751255f
--- /dev/null
+++ b/gradle/release.gradle
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+project(':') {
+  apply plugin: 'base'
+}
+
+task sourceRelease(type: Tar) {
+  // TODO: Add release signing: 
http://www.gradle.org/docs/current/userguide/signing_plugin.html
+
+  description = "Build a source release, specifically excluding the build 
directories and gradle wrapper files"
+  compression = Compression.GZIP
+
+  baseName = "samza-sources-${project.version}-incubating"
+
+  from(project.rootDir) {
+    exclude '**/build'
+    exclude 'build'
+    exclude '.gradle'
+    exclude 'gradlew'
+    exclude 'gradlew.bat'
+    exclude 'gradle/wrapper/gradle-wrapper.jar'
+    exclude 'gradle/wrapper/gradle-wrapper.properties'
+  }
+
+  into(baseName)
+
+  // Set destination directory.
+  destinationDir = file("${project.buildDir}/distribution/source")
+
+  archiveName = "${baseName}.tgz"
+  doLast { // generate md5 checksum
+    ant.checksum file:"$destinationDir/$archiveName"
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/052de224/gradle/wrapper/gradle-wrapper.properties
----------------------------------------------------------------------
diff --git a/gradle/wrapper/gradle-wrapper.properties 
b/gradle/wrapper/gradle-wrapper.properties
index 610282a..666eff6 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,4 +1,4 @@
-#Thu Jul 11 22:18:11 PDT 2013
+#Fri Jun 13 10:45:15 PDT 2014
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME

http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/052de224/gradlew
----------------------------------------------------------------------
diff --git a/gradlew b/gradlew
index 16bbbbf..91a7e26 100755
--- a/gradlew
+++ b/gradlew
@@ -7,7 +7,7 @@
 ##############################################################################
 
 # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to 
pass JVM options to this script.
-DEFAULT_JVM_OPTS="-XX:MaxPermSize=512m"
+DEFAULT_JVM_OPTS=""
 
 APP_NAME="Gradle"
 APP_BASE_NAME=`basename "$0"`

Reply via email to