[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1
[ https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14481936#comment-14481936 ] ASF GitHub Bot commented on KAFKA-2098: --- GitHub user rekhajoshm opened a pull request: https://github.com/apache/kafka/pull/54 KAFKA-2098: gradle files gradle files, tiny footprint.lets have it in.thanks You can merge this pull request into a Git repository by running: $ git pull https://github.com/rekhajoshm/kafka KAFKA-2098 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/54.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #54 commit be7dc1933d2c266d15c46a06d057686c8d48e520 Author: Joshi Date: 2015-04-06T21:02:13Z KAFKA-2098: gradle files > Gradle Wrapper Jar gone missing in 0.8.2.1 > -- > > Key: KAFKA-2098 > URL: https://issues.apache.org/jira/browse/KAFKA-2098 > Project: Kafka > Issue Type: Bug > Components: build >Affects Versions: 0.8.2.1 >Reporter: Rekha Joshi > > ./gradlew idea > Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain > This was working in 0.8.2.Attaching patch.Thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1
[ https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14481979#comment-14481979 ] Gwen Shapira commented on KAFKA-2098: - I believe it was deliberately removed, since we can't have binaries in our source distribution. The solution is to install and run Gradle first. > Gradle Wrapper Jar gone missing in 0.8.2.1 > -- > > Key: KAFKA-2098 > URL: https://issues.apache.org/jira/browse/KAFKA-2098 > Project: Kafka > Issue Type: Bug > Components: build >Affects Versions: 0.8.2.1 >Reporter: Rekha Joshi > > ./gradlew idea > Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain > This was working in 0.8.2.Attaching patch.Thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1
[ https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14497159#comment-14497159 ] alexcb commented on KAFKA-2098: --- The comment about not committing binaries goes directly against the userguide of gradle: from http://gradle.org/docs/current/userguide/gradle_wrapper.html {quote} All of these files should be submitted to your version control system. This only needs to be done once. After these files have been added to the project, the project should then be built with the added gradlew command. The gradlew command can be used exactly the same way as the gradle command. {quote} The kafka README states that one must first run "gradle", then run "./gradlew jar". The "gradle" command generates the gradlew script. If we don't want to add binaries to the source revision (a noble cause), then perhaps one should also avoid adding generated files such as the "gradlew" file. I personally lost an hour on this issue already. > Gradle Wrapper Jar gone missing in 0.8.2.1 > -- > > Key: KAFKA-2098 > URL: https://issues.apache.org/jira/browse/KAFKA-2098 > Project: Kafka > Issue Type: Bug > Components: build >Affects Versions: 0.8.2.1 >Reporter: Rekha Joshi > > ./gradlew idea > Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain > This was working in 0.8.2.Attaching patch.Thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1
[ https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14497350#comment-14497350 ] Rekha Joshi commented on KAFKA-2098: Hi.I agree [~alexcb] people all over the world are losing time on it :), though I also understand where [~gwenshap] is coming from. For users point of view better to have it in, especially as many standard open source based on gradle have them, one that comes to mind immediately is Samza - https://github.com/apache/samza/tree/master/gradle/wrapper Anyhow I will let Kafka committers and [~jkreps] decide whats works best. Thanks Rekha > Gradle Wrapper Jar gone missing in 0.8.2.1 > -- > > Key: KAFKA-2098 > URL: https://issues.apache.org/jira/browse/KAFKA-2098 > Project: Kafka > Issue Type: Bug > Components: build >Affects Versions: 0.8.2.1 >Reporter: Rekha Joshi >Assignee: Rekha Joshi > > ./gradlew idea > Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain > This was working in 0.8.2.Attaching patch.Thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1
[ https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14497362#comment-14497362 ] Jay Kreps commented on KAFKA-2098: -- I don't have much context on why we removed the binaries as far as I understood it was some kind of Apache requirement? > Gradle Wrapper Jar gone missing in 0.8.2.1 > -- > > Key: KAFKA-2098 > URL: https://issues.apache.org/jira/browse/KAFKA-2098 > Project: Kafka > Issue Type: Bug > Components: build >Affects Versions: 0.8.2.1 >Reporter: Rekha Joshi >Assignee: Rekha Joshi > > ./gradlew idea > Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain > This was working in 0.8.2.Attaching patch.Thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1
[ https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14497644#comment-14497644 ] Rekha Joshi commented on KAFKA-2098: Thanks for a prompt reply [~jkreps].What works for you works for me :-) But just for my curiosity, can you please share link to this Apache requirement? As Samza is also a top level Apache project and has https://github.com/apache/samza/tree/master/gradle/wrapper Thanks! > Gradle Wrapper Jar gone missing in 0.8.2.1 > -- > > Key: KAFKA-2098 > URL: https://issues.apache.org/jira/browse/KAFKA-2098 > Project: Kafka > Issue Type: Bug > Components: build >Affects Versions: 0.8.2.1 >Reporter: Rekha Joshi >Assignee: Rekha Joshi > > ./gradlew idea > Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain > This was working in 0.8.2.Attaching patch.Thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1
[ https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14497680#comment-14497680 ] Ewen Cheslack-Postava commented on KAFKA-2098: -- The original issue is here: https://issues.apache.org/jira/browse/KAFKA-1490 The first post of the mailing list thread linked to in that post gives a good rundown of the issues: http://mail-archives.apache.org/mod_mbox/incubator-general/201406.mbox/%3CCADiKvVs%3DtKDbp3TWRnxds5dVepqcX4kWeYbj7xUx%2BZoDNM_Lyg%40mail.gmail.com%3E Sadly, the deeper you dig, the more confusing things get. "export" vs "checkout" is hinted at here http://incubator.apache.org/guides/releasemanagement.html#best-practice-source which would indicate you can include binaries in the repo as long as they aren't included in the release. https://www.apache.org/dev/release-publishing.html#valid talks about all source code being appropriately licensed and under the right CLA, the latter potentially being a problem for an Apache source release since gradle wouldn't be covered by an Apache CLA. As a side note, downstream packagers sometimes dislike any binaries in source releases. See, e.g., https://www.debian.org/doc/packaging-manuals/java-policy/x84.html which indicates debian maintainers regularly need to repack source releases to remove the binary bits. Making sure they don't make them into source releases makes things a lot less painful for packagers. If you look into the source release for Samza, you'll see it doesn't contain any jars. They're stripped out during the release process (I haven't checked how, but just run find on the source tgz contents -- you won't find any jars). This matches the export vs. checkout distinction. It also addresses the potential CLA issues with a source release. I'm guessing that, given the complaints about the missing wrapper, this might be the right thing to do to appease Apache, downstream packagers, and developers/users. Personally, I'm surprised this causes as much frustration as it does -- the only time it's been an issue for me is on platforms where the native gradle packages are too old. But > Gradle Wrapper Jar gone missing in 0.8.2.1 > -- > > Key: KAFKA-2098 > URL: https://issues.apache.org/jira/browse/KAFKA-2098 > Project: Kafka > Issue Type: Bug > Components: build >Affects Versions: 0.8.2.1 >Reporter: Rekha Joshi >Assignee: Rekha Joshi > > ./gradlew idea > Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain > This was working in 0.8.2.Attaching patch.Thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1
[ https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14498307#comment-14498307 ] alexcb commented on KAFKA-2098: --- Thanks for the notes everyone. gradlew (the gradle wrapper) is designed to allow users who do not have gradle setup to build the project. If you require gradle to be setup ahead of time, then it seems like one could just use gradle directly. For example: {noformat} [root@feb6842638b9 kafkatest]# tar xzf kafka-0.8.2.1-src.tgz [root@feb6842638b9 kafkatest]# cd kafka-0.8.2.1-src [root@feb6842638b9 kafka-0.8.2.1-src]# rm gradlew gradlew.bat *** me simulating removing these files from the release [root@feb6842638b9 kafka-0.8.2.1-src]# gradle jar ... output removed... :core:processResources UP-TO-DATE :core:classes :core:copyDependantLibs :core:jar :examples:compileJava :examples:processResources UP-TO-DATE :examples:classes :examples:jar :contrib:hadoop-consumer:compileJava Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. :contrib:hadoop-consumer:processResources UP-TO-DATE :contrib:hadoop-consumer:classes :contrib:hadoop-consumer:jar :contrib:hadoop-producer:compileJava :contrib:hadoop-producer:processResources UP-TO-DATE :contrib:hadoop-producer:classes :contrib:hadoop-producer:jar BUILD SUCCESSFUL {noformat} By using this directly, we 1) avoid the confusion of distributing a non-working gradle wrapper, and 2) bypass the wrapper and just use gradle directly. Thanks. > Gradle Wrapper Jar gone missing in 0.8.2.1 > -- > > Key: KAFKA-2098 > URL: https://issues.apache.org/jira/browse/KAFKA-2098 > Project: Kafka > Issue Type: Bug > Components: build >Affects Versions: 0.8.2.1 >Reporter: Rekha Joshi >Assignee: Rekha Joshi > > ./gradlew idea > Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain > This was working in 0.8.2.Attaching patch.Thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1
[ https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14498431#comment-14498431 ] Ewen Cheslack-Postava commented on KAFKA-2098: -- [~alexcb] That works as long as you have a version of gradle that works with the project. The other thing the wrapper does is let the project specify the version of gradle to build with, which makes compatibility simpler -- if you have an older system-installed gradle, the wrapper lets you use a newer version just for that specific project. This makes builds more robust since they don't have to support every version of gradle that people might have installed. Unfortunately the gradlew bootstrapping doesn't work with all versions, which is why Gradle recommends checking in the scripts and jars. For example, setting up Kafka for development on Ubuntu Trusty is kind of a pain right now because the version of Gradle (1.4) is too old to get past the bootstrapping phase, so you still need to download Gradle separately just to bootstrap the wrapper scripts. > Gradle Wrapper Jar gone missing in 0.8.2.1 > -- > > Key: KAFKA-2098 > URL: https://issues.apache.org/jira/browse/KAFKA-2098 > Project: Kafka > Issue Type: Bug > Components: build >Affects Versions: 0.8.2.1 >Reporter: Rekha Joshi >Assignee: Rekha Joshi > > ./gradlew idea > Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain > This was working in 0.8.2.Attaching patch.Thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1
[ https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14498750#comment-14498750 ] alexcb commented on KAFKA-2098: --- Perhaps I was unclear in what I was suggesting. Since [~gwenshap] mentioned that we don't want jars in the release, which I completely agree with, then we should also remove the auto generated gradlew and gradlew.bat scripts. When gradlew is run, it hardcodes the CLASSPATH to ./gradle/wrapper/gradle-wrapper.jar; and I don't see any mechanism in the script to include a user defined CLASSPATH. I fail to see how it's even possible to run gradlew in it's current state without running gradle first. Can you elaborate on how this is possible to use the gradlew script without running gradle first? i.e. how does it run if ./gradle/wrapper/gradle-wrapper.jar does not exist. > Gradle Wrapper Jar gone missing in 0.8.2.1 > -- > > Key: KAFKA-2098 > URL: https://issues.apache.org/jira/browse/KAFKA-2098 > Project: Kafka > Issue Type: Bug > Components: build >Affects Versions: 0.8.2.1 >Reporter: Rekha Joshi >Assignee: Rekha Joshi > > ./gradlew idea > Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain > This was working in 0.8.2.Attaching patch.Thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1
[ https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14498774#comment-14498774 ] Ewen Cheslack-Postava commented on KAFKA-2098: -- Sorry @alexcb, I think we were just talking past each other. Yes, I agree that having the wrapper scripts is pointless without the jars since you need gradle anyway. I was just pointing out that even if you require another gradle installation to bootstrap, we might still want to rely on the wrapper. For example, I'm not sure we want to change the README to change all the gradlew commands to use gradle directly like you demonstrated above. Using an existing gradle installation only to bootstrap the wrapper and then using the wrapper for everything can remove a bunch of compatibility issues. > Gradle Wrapper Jar gone missing in 0.8.2.1 > -- > > Key: KAFKA-2098 > URL: https://issues.apache.org/jira/browse/KAFKA-2098 > Project: Kafka > Issue Type: Bug > Components: build >Affects Versions: 0.8.2.1 >Reporter: Rekha Joshi >Assignee: Rekha Joshi > > ./gradlew idea > Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain > This was working in 0.8.2.Attaching patch.Thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2098) Gradle Wrapper Jar gone missing in 0.8.2.1
[ https://issues.apache.org/jira/browse/KAFKA-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15779116#comment-15779116 ] ASF GitHub Bot commented on KAFKA-2098: --- Github user pono closed the pull request at: https://github.com/apache/kafka/pull/54 > Gradle Wrapper Jar gone missing in 0.8.2.1 > -- > > Key: KAFKA-2098 > URL: https://issues.apache.org/jira/browse/KAFKA-2098 > Project: Kafka > Issue Type: Bug > Components: build >Affects Versions: 0.8.2.1 >Reporter: Rekha Joshi >Assignee: Rekha Joshi > > ./gradlew idea > Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain > This was working in 0.8.2.Attaching patch.Thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)