I tried this approach. The plugin requires a path to the "protoc" tool and
thus a working installation.  This is what prompted the discussion.

Running the plugin under a profile works.  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.

Any ideas on how to continue?

Michael
 On Nov 5, 2014 11:04 AM, "Chris Mattmann" <[email protected]> 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
> [email protected]
>
>
>
>
> -----Original Message-----
> From: Michael Starch <[email protected]>
> Reply-To: <[email protected]>
> Date: Wednesday, November 5, 2014 at 11:46 AM
> To: <[email protected]>
> 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
>
>
>

Reply via email to