Use the verifier utility to validate the J2EE deployment descriptors and the Sun Java System Application Server specific deployment descriptors. If the application is not J2EE compliant, an error message is printed.
When you run the verifier utility, two results files are created in XML and TXT format. The location where the files are created can be configured using the -d option. The directory specified as the destination directory for result files should exist. If no directory is specified, the result files are created in the current directory. Result files are named as jar_filename.xml and jar_filename.txt
The XML file has various sections that are dynamically generated depending on what kind of application or module is being verified. The root tag is static-verification which may contain the tags application, ejb, web, appclient, connector, other, error and failure-count. The tags are self explanatory and are present depending on the type of module being verified. For example, an EAR file containing a web and EJB module will contain the tags application, ejb, web, other, and failure-count.
If the verifier ran successfully, a result code of 0 is returned. A non-zero error code is returned if the verifier failed to run.
The optional parameters must be specified as follows:
Identifies the destination directory. The verifier results are located in this specified directory. The directory must already exist.
Displays the verifier help.
Enables the Verifier graphical user interface.
Turns verbose debugging ON. Default mode is verbose turned off. In verbose mode, the status of each run of each test is displayed on the verifier console.
Displays the Verifier tool version.
Identifies the result reporting level. The default report level is to display all results. The available reporting levels include:
Set output reporting level to display all results (default).
Set output reporting level to display only failure results.
Set output reporting level to display only warning and failure results.
name of the ear/war/jar/rar file to perform static verification on. The results of verification are placed in two files jar_filename.xml and jar_filename.txt in the destination directory.
Runs only the application tests.
Runs only the application client tests.
Runs only the connector tests.
Runs only the EJB tests.
Runs only the web tests.
Runs only the web services tests.
Runs only the web services client tests.
The following example runs the verifier in verbose mode and writes all the results of static verification of the sample.ear file to the destination directory named /verifier-results.
example% verifier -v -rf -d /verifier-results sample.ear
Where -v runs the verifier in verbose mode, -d specifies the destination directory, and -rf displays only the failures. The results are stored in /verifier-results/sample.ear.xml and /verifier-results/sample.ear.txt.
example% verifier --app --ejb sample.ear