You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by SingleShot <mi...@gmail.com> on 2008/03/12 22:21:38 UTC

Best Practice for IDL, WSDL, etc.?

We have a large number of language-independent interface files, mostly IDL
and WSDL. We use these files to generate java, both for the client side and
server side. What's different about these kinds of source files from the
traditional .java source file is that they generate two sets of output
(client and server). We want these two sets of output to be packaged in
separate JARs so users of a service only need to have the client JAR and its
transitive dependencies, not the server JAR and all of its transitive
dependencies.

So, what is the best practice for this kind of setup? I believe these are
the options available to me:
1) Create a single module and have it package both the client and server
into a single JAR.
2) Create a single module and have it generate two JARs. This can be done by
defining an additional execution on the JAR plugin. Have each JAR
configuration filter for either client or server classes.
3) Create two modules, one for creating a client JAR, and one for creating a
server JAR. Set up each module to share a common source directory (where the
IDL files live).

I won't do option (1) because users must depend on too much that is
unnecessary. I won't do option (2) because both artifacts share the same
dependencies (since they are defined by the same POM), thus users end up
depending on too much anyway. Option (3) seems most promising, but then what
is the best practice for multiple modules sharing the same source directory?

Thanks,

Mike
-- 
View this message in context: http://www.nabble.com/Best-Practice-for-IDL%2C-WSDL%2C-etc.--tp16012616s177p16012616.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Best Practice for IDL, WSDL, etc.?

Posted by nicolas de loof <ni...@apache.org>.
Option 4 :

put the IDL / WSDL at upper "common" level (parent-pom/src/main/wsdl) and
run the code generator with required options to build either server / client
jar where the code is used. Avoid dependency on generated-code-only jars.

Nicolas.

2008/3/12, SingleShot <mi...@gmail.com>:
>
>
> We have a large number of language-independent interface files, mostly IDL
> and WSDL. We use these files to generate java, both for the client side
> and
> server side. What's different about these kinds of source files from the
> traditional .java source file is that they generate two sets of output
> (client and server). We want these two sets of output to be packaged in
> separate JARs so users of a service only need to have the client JAR and
> its
> transitive dependencies, not the server JAR and all of its transitive
> dependencies.
>
> So, what is the best practice for this kind of setup? I believe these are
> the options available to me:
> 1) Create a single module and have it package both the client and server
> into a single JAR.
> 2) Create a single module and have it generate two JARs. This can be done
> by
> defining an additional execution on the JAR plugin. Have each JAR
> configuration filter for either client or server classes.
> 3) Create two modules, one for creating a client JAR, and one for creating
> a
> server JAR. Set up each module to share a common source directory (where
> the
> IDL files live).
>
> I won't do option (1) because users must depend on too much that is
> unnecessary. I won't do option (2) because both artifacts share the same
> dependencies (since they are defined by the same POM), thus users end up
> depending on too much anyway. Option (3) seems most promising, but then
> what
> is the best practice for multiple modules sharing the same source
> directory?
>
> Thanks,
>
> Mike
>
> --
> View this message in context:
> http://www.nabble.com/Best-Practice-for-IDL%2C-WSDL%2C-etc.--tp16012616s177p16012616.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Best Practice for IDL, WSDL, etc.?

Posted by Stephen Connolly <st...@gmail.com>.
have the WSDL in it's own module and then have the server and client depend
on the WSDL

On Wed, Mar 12, 2008 at 9:21 PM, SingleShot <mi...@gmail.com>
wrote:

>
> We have a large number of language-independent interface files, mostly IDL
> and WSDL. We use these files to generate java, both for the client side
> and
> server side. What's different about these kinds of source files from the
> traditional .java source file is that they generate two sets of output
> (client and server). We want these two sets of output to be packaged in
> separate JARs so users of a service only need to have the client JAR and
> its
> transitive dependencies, not the server JAR and all of its transitive
> dependencies.
>
> So, what is the best practice for this kind of setup? I believe these are
> the options available to me:
> 1) Create a single module and have it package both the client and server
> into a single JAR.
> 2) Create a single module and have it generate two JARs. This can be done
> by
> defining an additional execution on the JAR plugin. Have each JAR
> configuration filter for either client or server classes.
> 3) Create two modules, one for creating a client JAR, and one for creating
> a
> server JAR. Set up each module to share a common source directory (where
> the
> IDL files live).
>
> I won't do option (1) because users must depend on too much that is
> unnecessary. I won't do option (2) because both artifacts share the same
> dependencies (since they are defined by the same POM), thus users end up
> depending on too much anyway. Option (3) seems most promising, but then
> what
> is the best practice for multiple modules sharing the same source
> directory?
>
> Thanks,
>
> Mike
> --
> View this message in context:
> http://www.nabble.com/Best-Practice-for-IDL%2C-WSDL%2C-etc.--tp16012616s177p16012616.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>