Packaging contracts in JARs

In order to distribute contracts, you can place them into a JAR file. This is a very simple job that can be accomplished in just three steps, which are as follows:

  1. Consider an empty JAR file.
  2. Create, in JAR, a folder named META-INF.
  3. Copy the contracts folder from your application into META-INF.

For example, a JAR file that contains the default, tableGreen, and tableBlue contract folders has the structure shown in the following screenshot:

Packaging contracts in JARs

A complete example that uses this JAR file is named ch11_9.

Get Mastering JavaServer Faces 2.2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.