Shared code between gateway and client

What is the recommended way to distribute shared code that needs to be available to both the gateway and the client?

It seems that the gateway doesn’t unpack pack200 (pack.gz) files. I would like to avoid having to have two copies of the shared code (a jar version and a pack200 version).

Thanks.

The best way is to create a new project called YourModule_Common. The gateway and client can both have it on their classpath. Then you just need to make a YourModule_Common.jar that is both gateway and client scoped.

Thanks for the reply. Adding a common jar shared across all scopes works.

Are there any downsides to this approach that I should be aware of? Possible implications on network traffic?
What is the purpose of packaging up the client/designer-only jars into pack200 files?

Thanks.

There’s not really any technical drawback to creating a common project/jar, we use that pattern extensively here as well.

The pack200 files are to reduce the size because they get sent on the wire to client/designers.

Ok I’ll bear that in mind. It’s not a large module, so in practice the size probably won’t make much difference.

Many thanks.