Return-Path: X-Original-To: apmail-oodt-dev-archive@www.apache.org Delivered-To: apmail-oodt-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2F7191799B for ; Thu, 6 Nov 2014 00:39:30 +0000 (UTC) Received: (qmail 67868 invoked by uid 500); 6 Nov 2014 00:39:30 -0000 Delivered-To: apmail-oodt-dev-archive@oodt.apache.org Received: (qmail 67828 invoked by uid 500); 6 Nov 2014 00:39:30 -0000 Mailing-List: contact dev-help@oodt.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@oodt.apache.org Delivered-To: mailing list dev@oodt.apache.org Received: (qmail 67811 invoked by uid 99); 6 Nov 2014 00:39:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Nov 2014 00:39:29 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mdstarch@gmail.com designates 209.85.218.47 as permitted sender) Received: from [209.85.218.47] (HELO mail-oi0-f47.google.com) (209.85.218.47) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Nov 2014 00:39:25 +0000 Received: by mail-oi0-f47.google.com with SMTP id a3so223850oib.20 for ; Wed, 05 Nov 2014 16:37:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=dbglw6YGOvQLMUH3MieOunoCBT/WU7hsptOBniAVUpw=; b=qK41Zj8+1a3ADM5wvnXUHj3DIwLs1Z8y2SD8ujjVG7FRG1/pcLThVdEzB1NZ0uK3wr AL00m0cFmE8FFyKkJDMKR/IBqmzblcyKVE7WJ3RPUQDO6F+1g+bZ+/vpOqoUHWr8vZ53 GR782ZRRJFiTR6XUEWybu6pU4m078wVnHA7K8zVRjs0U0nsUOjkzUYnI4VETukOGcGMv I4HXQ5kdfaE4VTP50Ym9wv1TpjGLcb8tINfBxZRQ2bat9WggZTIzocIoYhAEMKbXDOfO O85HWaw4eTNbpi3woGGqyQCSouIl1DFATJZgdhFWRmjZ606okoNzJ/vs1Qx6vjlCzf8r Wviw== MIME-Version: 1.0 X-Received: by 10.202.7.21 with SMTP id 21mr666417oih.6.1415234254874; Wed, 05 Nov 2014 16:37:34 -0800 (PST) Sender: mdstarch@gmail.com Received: by 10.202.213.71 with HTTP; Wed, 5 Nov 2014 16:37:34 -0800 (PST) Received: by 10.202.213.71 with HTTP; Wed, 5 Nov 2014 16:37:34 -0800 (PST) In-Reply-To: References: Date: Wed, 5 Nov 2014 16:37:34 -0800 X-Google-Sender-Auth: nz-KGlr8yo4xrxYTLcIs4sYQwCU Message-ID: Subject: Re: Extra Compiler Tools From: Michael Starch To: dev@oodt.apache.org Content-Type: multipart/alternative; boundary=001a113d1046092d34050725e764 X-Virus-Checked: Checked by ClamAV on apache.org --001a113d1046092d34050725e764 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ok....time for an audible. Protoc needs to be built from source, no binary distributions available. Thus I am going to purge proto-buffers from the new code and be done with it. Any problem making the following classes/interfaces implement java.io.Serializable: JobSpec Job JobInput Doing so would allow apache and native java serialization and thus we wouldn't need something like proto-buffers. -Michael Thanks Mike +1 ------------------------ Chris Mattmann chris.mattmann@gmail.com -----Original Message----- From: Michael Starch Reply-To: Date: Wednesday, November 5, 2014 at 12:31 PM To: Subject: Re: Extra Compiler Tools >Looks like you followed the same reasoning chain that I did. Yes, I came >to the same conclusion that ant-build was best. > >I wasn't sure how to download protoc, but you just answered that....so I >think this is a great solution! > >Thanks, > >Michael > > >On Wed, Nov 5, 2014 at 10:23 AM, Chris Mattmann >wrote: > >> Hi Mike, >> >> Thanks for flushing this out. >> >> My thoughts on the below: >> >> >> -----Original Message----- >> From: Michael Starch >> Reply-To: >> Date: Wednesday, November 5, 2014 at 12:12 PM >> To: >> Subject: Re: Extra Compiler Tools >> >> >I tried this approach. The plugin requires a path to the "protoc" tool >>and >> >thus a working installation. This is what prompted the discussion. >> >> Ah - no worries, what you could do is: >> >> 1. only enable to plugin if -Pwith-mesos is enabled; and >> >> > >> >Running the plugin under a profile works. >> >> Yep. >> >> > However, not running the plugin >> >causes compile errors in dependant code. Excluding this code except >> >within >> >the profile doesn't seem to work, and is considered by some to be bad >>form >> >because there is nothing inside the jar file that notes which profiles >> >were >> >used to compile. >> >> Got it. Suggestion here would be: >> >> 2. create a new module, cas-resource-mesos, and inside of that module, >> take one of the following approaches, assuming the module is activated >> when -Pwith-mesos is enabled: >> >> 2a. Maven Antrun like so (in this old example): >> >>http://stackoverflow.com/questions/1578456/integrate-protocol-buffers-int >>o- >> maven2-build >> >> (pro: more flexibility in case protoc isn=C2=B9t there; to fail on error= ; to >> only compile if >> protoc is available >> >> 2b. Maven protobuf plugin >> http://sergei-ivanov.github.io/maven-protoc-plugin/usage.html >> >> Here=C2=B9s how to enable a module with a profile: >> >> >>http://blog.soebes.de/blog/2013/11/09/why-is-it-bad-to-activate-slash-dea >>ct >> ive-modules-by-profiles-in-maven/ >> >> >> It seems like that is a bad idea though, based on that discussion. >> >> So, here=C2=B9s another option: >> >> 1. Inside of cas-resource (no special new module or anything else) >> 2. include some custom Ant magic via a build.xml file and the Maven >> AntRun plugin: >> 2a. test if protoc is on the system path, and if not, download it, >>e.g., >> into the target directory (gets deleted on clean) >> 2b. call protoc and compile after 2a >> >> I would suggest this solution as I think it=C2=B9s the most robust and >>ensures >> we always have a cas-resource that includes mesos and compiled >>correctly. >> >> Cheers, >> Chris >> >> > >> >Any ideas on how to continue? >> > >> >Michael >> > On Nov 5, 2014 11:04 AM, "Chris Mattmann" >> >wrote: >> > >> >> Hi Mike, >> >> >> >> Great discussion. It would be nice if there was >> >> a protoc Maven plugin: >> >> >> >> http://sergei-ivanov.github.io/maven-protoc-plugin/usage.html >> >> >> >> >> >> Looks like there is. My suggestion: >> >> >> >> 1. use a Profile, something like -Pwith-mesos and >> >> then when activated; >> >> 2. call the above plugin if -Pwith-mesos is activated >> >> in the resource manager >> >> >> >> Sound good? >> >> >> >> Cheers, >> >> Chris >> >> >> >> ------------------------ >> >> Chris Mattmann >> >> chris.mattmann@gmail.com >> >> >> >> >> >> >> >> >> >> -----Original Message----- >> >> From: Michael Starch >> >> Reply-To: >> >> Date: Wednesday, November 5, 2014 at 11:46 AM >> >> To: >> >> Subject: Extra Compiler Tools >> >> >> >> >All, >> >> > >> >> >I am trying to integrate apache-mesos with our resource manager. >> >>However, >> >> >mesos uses a technology called "protobuff" from Google for >> >> >marshaling/unmarshaling data. >> >> > >> >> >This requires running a tool called "protoc" to generate a source >>file >> >>in >> >> >java. What is the best way to integrate this step into our build >> >>process? >> >> > >> >> >Options I can conceive of: >> >> > -Check in generated java file >> >> > -Require "protoc" installation to build resource manager >> >> > -Separate extra resource package into new module >> >> > >> >> >None of these ideas are very clean. >> >> > >> >> >Any other ideas? I tried setting up a profile to only compile these >> >> >sources when selected, but that turned out not to work. >> >> > >> >> >-Michael Starch >> >> >> >> >> >> >> >> >> --001a113d1046092d34050725e764--