Re: [protobuf] Import .proto file and generated Java classes from JAR

2014-03-14 Thread Christopher Head
On Mon, 10 Mar 2014 09:22:03 -0700 (PDT)
Stik kos stik...@gmail.com wrote:

 Hello,
 
 We have defined a bunch of common messages (like Country, Currency,
 Money, ...) and packaged them in a JAR together with the generated
 (and compiled) JAVA classes. We would then like to have multiple
 projects include this JAR as a dependency. 
 Is it possible to import a .proto file directly from a JAR? 
 And is it possible to not generate JAVA files for these common
 messages but use the once in the common JAR in stead?
 
 Thanks,
 Stik
 

You shouldn’t need the .proto files at all in order to *use* the
messages from other applications; that’s what the generated language
source files are for. Java being what it is, you should just be able to
use the .class files from your .jar without including either the .proto
or .java files at all, just like you would use .class files in any
other .jar-based library you use in your system: arrange for the .jar
to be in your classpath, like you would do with any other library .jar,
and then consume the appropriate classes in your own code, like you
would with any other library.
-- 
Christopher Head


signature.asc
Description: PGP signature


[protobuf] Import .proto file and generated Java classes from JAR

2014-03-10 Thread Stik kos
Hello,

We have defined a bunch of common messages (like Country, Currency, Money, 
...) and packaged them in a JAR together with the generated (and compiled) 
JAVA classes. We would then like to have multiple projects include this JAR 
as a dependency. 
Is it possible to import a .proto file directly from a JAR? 
And is it possible to not generate JAVA files for these common messages but 
use the once in the common JAR in stead?

Thanks,
Stik

-- 
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.