[protobuf] Re: Issue 476 in protobuf: please document how to use protobuf with maven
Comment #9 on issue 476 by plind...@google.com: please document how to use protobuf with maven http://code.google.com/p/protobuf/issues/detail?id=476 I'd be happy to shepherd any maven patches into the protobuf core and/or assist with delegation of the namespace. I recently landed patches for mavenizing closure-compiler and would like to see a proper codegen step replacing the pre-generated protobuf classes. Contact me at plind...@google.com -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
[protobuf] Re: Issue 476 in protobuf: please document how to use protobuf with maven
Comment #2 on issue 476 by paul.nyh...@gmail.com: please document how to use protobuf with maven http://code.google.com/p/protobuf/issues/detail?id=476 Please change from https://github.com/usmanismail/maven-protoc-plugin to https://github.com/sergei-ivanov/maven-protoc-plugin Both of these were forked from .../dtrott/maven-protoc-plugin, but AFAIK, the fork by sergei-ivanov is the most active one. (and btw, We have been using this one for several years now, and it would be my recommendation - without having looked in detail at the others. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[protobuf] Re: Issue 476 in protobuf: please document how to use protobuf with maven
Comment #3 on issue 476 by xiaof...@google.com: please document how to use protobuf with maven http://code.google.com/p/protobuf/issues/detail?id=476 Done. Thanks, Paul. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[protobuf] Re: Issue 476 in protobuf: please document how to use protobuf with maven
Comment #4 on issue 476 by sergei.s...@gmail.com: please document how to use protobuf with maven http://code.google.com/p/protobuf/issues/detail?id=476 Hi, This thread has been brought to my attention by Paul, and I am going to use this opportunity to provide an update (and some history) below. 1. Some history. I forked David Trott's repository a couple of years ago with a view to submit a bug fix, but since David did not have resources to continue work on his branch, I effectively took over the plugin development on my own branch. David's implementation of the plugin was based on what Gregory from Google Protobuf team originally created on a branch, but never merged to the trunk. With the help of GitHub community members, most of the blocker bugs were fixed and the plugin became stable enough for everyday use. I took over the plugin at the time when we ourselves were migrating from an abomination of Ant+Ivy build to a new shiny Maven-driven environment. The legacy build had two killer features though, and we wanted to retain these to a reasonable extent: a) it was self-sufficient and did not require you to specify protoc executable location (it was downloaded from our Ivy repo) b) it worked pretty well with dependent protos scattered across a number of projects/modules 2. What has been done We ruled out hosting protoc binaries in our Maven repo. However, instead of relying on the operating environment or system properties, we wanted to configure protoc executable in a more portable way. That's when I took a deep dive into Maven toolchains and figured they would be quite an elegant solution to the problem. After the introduction of the new protobuf toolchain, we were able to specify protoc location in the toolchains file, optionally with multiple alternative locations for different protoc versions. In the project pom, the required protoc executable would be selected by simply specifying a version (or a range of versions). Introduction of protobuf toolchains also paved the way to providing an extensive set of stable and predictable integration tests, which was not possible before. We noticed that the original plugin did not work correctly with importing protos from other modules when namespaces were being used. This had been fixed. We also fixed multi-module builds when protos from module1 in a reactor project imported protos from module2. Test dependencies have been fixed too. I have also cleaned up maven project configuration, updated dependencies and set up a proper generated Maven site documentation for the plugin: http://sergei-ivanov.github.com/maven-protoc-plugin/ The above satisfied our immediate requirements and allowed us to proceed with Maven migration, and the whole set-up has been in production for the last 1.5 years. Later additions were mainly own implementations of functionality that became available on alternative branches, or pull requests from the other community members, namely: a) support for generating binary descriptor sets (--descriptor-out protoc option) b) integration into Eclipse lifecycle (experimental) c) started a work on allowing alternative protoc output (C++ and Python), but it's not complete yet, because I want to perform a major refactoring of mojos first d) added support of executing protoc plugins (that is, plugins for protoc compiler) that are packaged as compiled java classes 3. The future ...is a bit unclear. Quite a few people expressed interest in contributing to the plugin code, but were deterred by unclear licensing terms. I admit it's a problem, and I am inviting Google chaps to contact me directly to discuss it. The original plugin code was submitted under Google Protobuf licence, and both java package structure and maven coordinates retain google.com references. I believe initially there was a hope that Google people would take over and own the plugin, but that has never happened, and the plugin continues to live its own life separately from Google. As I understand, Google Protobuf team does not have enough resources and/or expertise and/or motivation to take over the Maven plugin development and maintenance, and I cannot blame them for that. I think that, unless there's a need for some critical bug fix, the latest version of my plugin (released last night) will be the final one on that branch. I am going to start a new project from scratch, repackage all classes, change maven coordinates, assign a liberal open-source licence to it and either (a) [perhaps unlikely] obtain a copyright release and licence clearance from the Google Protobuf project team and retain the original code or (b) [more likely] rewrite whatever is left from the original code from scratch. The end goal is to make the plugin available in Maven Central. Kind regards, Sergei -- You received this message because this project is configured to send all
[protobuf] Re: Issue 476 in protobuf: please document how to use protobuf with maven
Comment #5 on issue 476 by jsill...@gmail.com: please document how to use protobuf with maven http://code.google.com/p/protobuf/issues/detail?id=476 This comment is meant to back up Sergei's and Paul's points. I've led the migration from Ant to Maven within my company and this wouldn't have been possible without Sergei's fork and improvements to the old plugin branch. As someone who used to work at Google until recently, it's a bit weird and sometimes frustrating to see Maven treated as second-class citizen in a lot of Google Java OSS :-) It's the de facto standard for building and distributing Java code in the Real World, so I'm all for making this happen. I would recommend the Google folks to allow reuse of the original code (which I think should be fine — it should technically be licensed under ASL 2 already), grant formal permission to reuse the com.google maven coordinates that have been used for the past few years and ultimately put this plugin under their umbrella, even if it's hosted o Github. I have open-source projects using protobufs that would benefit from having such a plugin officially available in Maven central. Cheers, -jsi -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[protobuf] Re: Issue 476 in protobuf: please document how to use protobuf with maven
Comment #6 on issue 476 by sergei.s...@gmail.com: please document how to use protobuf with maven http://code.google.com/p/protobuf/issues/detail?id=476 Uploading to Maven Central with the current co-ordinates won't be possible, because the plugin uses naming pattern that is reserved for core Apache Maven plugins. Every time I build it, Maven spews out a warning telling me that maven-xxx-plugin is not a good name for a plugin, and it should be named xxx-maven-plugin instead. Additionally, I am pretty sure that OSS Sonatype will require me to prove that I own the domain before allowing me into Maven Central. Proving ownership of com.google.protobuf package space will be problematic for me. -- Sergei -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf?hl=en. For more options, visit https://groups.google.com/groups/opt_out.