You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by yiyu jia <ji...@gmail.com> on 2013/01/17 15:34:28 UTC

maven setting of version of protocol buffer

Hi,

I noticed that I always get error message which says there is no
Parser.class found in protocbuffer. Aftter checking, I found that is
because there is no version info about protocbuff in POM file. So, Maven
always try to download old version of protocbuffer though I build the
lastest one and install it in local maven repository already. And the
default version Maven downloaded has no Parser.class .

I solve the issue by adding version info of protocbuffer in POM files.
However, I think there should be a better way to solve this. anybody can
show me how to get reqired version of protocbuff without changing POM files?

thanks and reggards,

Yiyu

Re: maven setting of version of protocol buffer

Posted by yiyu jia <ji...@gmail.com>.
Hi Colin,

Yes. What I talked about is google protobuf. What I did is just open each
POM files that has protobuf dependency and add the version number I
installed into my local repository.

I guess other developers have no problem because they use there internal
maven repository, which contains right version of protobuf. for my case, I
build hadoop common in my home pc and it linked to a public respository,
which has old version of protobuf having no Parser.java.

I see many dependencies has no version tag specified in the source code
tree. I guess it was done purposely? Maybe somebody can explain why we do
not specify the version in each dependency declaration.

thanks and regards,

yiyu


On Thu, Jan 17, 2013 at 2:00 PM, Colin McCabe <cm...@alumni.cmu.edu>wrote:

> Hi Yiyu,
>
> Are you referring to com.google.protobuf?
>
> We generally do depend on specific versions of jars in the pom.xml files,
> to prevent exactly this sort of problem.  If you have a patch which adds
> this, you should post it.  It might help someone else.
>
> cheers,
> Colin
>
>
> On Thu, Jan 17, 2013 at 6:34 AM, yiyu jia <ji...@gmail.com> wrote:
>
> > Hi,
> >
> > I noticed that I always get error message which says there is no
> > Parser.class found in protocbuffer. Aftter checking, I found that is
> > because there is no version info about protocbuff in POM file. So, Maven
> > always try to download old version of protocbuffer though I build the
> > lastest one and install it in local maven repository already. And the
> > default version Maven downloaded has no Parser.class .
> >
> > I solve the issue by adding version info of protocbuffer in POM files.
> > However, I think there should be a better way to solve this. anybody can
> > show me how to get reqired version of protocbuff without changing POM
> > files?
> >
> > thanks and reggards,
> >
> > Yiyu
> >
>

Re: maven setting of version of protocol buffer

Posted by Colin McCabe <cm...@alumni.cmu.edu>.
Hi Yiyu,

Are you referring to com.google.protobuf?

We generally do depend on specific versions of jars in the pom.xml files,
to prevent exactly this sort of problem.  If you have a patch which adds
this, you should post it.  It might help someone else.

cheers,
Colin


On Thu, Jan 17, 2013 at 6:34 AM, yiyu jia <ji...@gmail.com> wrote:

> Hi,
>
> I noticed that I always get error message which says there is no
> Parser.class found in protocbuffer. Aftter checking, I found that is
> because there is no version info about protocbuff in POM file. So, Maven
> always try to download old version of protocbuffer though I build the
> lastest one and install it in local maven repository already. And the
> default version Maven downloaded has no Parser.class .
>
> I solve the issue by adding version info of protocbuffer in POM files.
> However, I think there should be a better way to solve this. anybody can
> show me how to get reqired version of protocbuff without changing POM
> files?
>
> thanks and reggards,
>
> Yiyu
>