Development documentation

Schema location

The schema is located in the folder: src/main/resources.

Adding the schemas to the main project web site

During the site phase the schema is copied to the main site in the pineapple-project. The schema is copied to the directory: /ns/plugin.

This is implemented in the pom.xml for the pineapple-composite-exeuction-plugin project.

Generation of classes from XML schemas

The project uses JAXB through the Maven plugin cxf-xjc-plugin to generate classes from XML schema.

Customized package names

The generated classes are mapping into the package com.alpha.pineapple.plugin.composite.execution.model using the JAXB bindings file at: src/main/resources/bindings.xjb.

Customized type names

The JAXB bindings file also defines mappings of Schema type into Java types. The applied rule is to remove the postfixed Type from the Schema type in the corresponding Java types, i.e. from the schema type named NiceType a Java type named Nice is generated by JAXB.

Internal configuration

Logging

The plugin uses Log4j for logging. Each project which links to this project must provide a Log4j configuration which is accessible at runtime as a result of the build process.

For testing the project uses the Log4j configuration supplied by the pineapple-test-utils project.

Spring configuration file

The plugin contains a configuration file which defines a Spring application context. The Spring application context defines the input unmarshalling for the plugin. The file is located in src/main/resources/com.alpha.pineapple.plugin.composite.execution-config.xml.

Internationalization (I18N) configuration file

The report generator uses internationalization. Messages used by classes in the project are located in the file src/main/resources/com.alpha.pineapple.plugin.composite.execution-messages.properties.

JAXB binding file

JAXB bindings file used during generation of model objects from the plugin schema is located at src/main/resources/bindings.xjb.

Test

Unit test

TODO: update....

The ObjectMotherContent helper class is used to create models for unit tests.

Implementation

Plugin class

The package com.alpha.pineapple.plugin.jrockit.installation is the root package of the plugin and contains the plugin class PluginImpl.

Session class

The package com.alpha.pineapple.plugin.jrockit.installation.session contains the session classes for the plugin:

  • JRockitInstallationSessionImpl extends the ProcessExecutionSessionImpl class which implements execution of external OS processes.

Operation classes

The package com.alpha.pineapple.plugin.jrockit.installation.operation contains the operation classes for the plugin.

The plugin implement these default operations:

  • TestOperation implements the operation test.
  • DeployConfiguration implements the operation deploy-configuration.
  • undeployConfiguration implements the operation undeploy-configuration.

Model helper classes

None implemented, as the model is very small.

Commands

The package com.alpha.pineapple.plugin.jrockit.installation.command contains Chain commands:

  • CreateR27SilentXmlCommand creates a silent XML file for installation of JRockit R27.
  • CreateR28SilentXmlCommand creates a silent XML file for installation of JRockit R28.
CreateR27SilentXmlCommand

Creates a XML file which configures the JRockit installer for silent installation.

The file is stored in a temporary file named com.alpha.pineapple.plugin.jrockit.installation.command.CreateR27SilentXmlCommand.xml which is stored in the temporary directory resolved from the runtime directory provider.

The class uses the helper class R27ArgumentBuilder to create argument lists and the classes in the process execution support project to execute external processes in the OS.

CreateR28SilentXmlCommand

Creates a XML file which configures the JRockit installer for silent installation.

The file is stored in a temporary file named com.alpha.pineapple.plugin.jrockit.installation.command.CreateR28SilentXmlCommand.xml which is stored in the temporary directory resolved from the runtime directory provider.

The class uses the helper class R28ArgumentBuilder to create argument lists and the classes in the process execution support project to execute external processes in the OS.

Installation configurer

The package com.alpha.pineapple.plugin.jrockit.installation.configurer contains strategies for configuration of the support JRockit versions:

  • InstallationConfigurer defines the interface configuration strategies.
  • R27InstallationConfigurerImpl defines the installation strategy for R27.
  • R28InstallationConfigurerImpl defines the installation strategy for R28.

Helper classes

The class R27ArgumentBuilder is a helper class which build arguments list for JRockit R27.

The class R28ArgumentBuilder is a helper class which build arguments list for JRockit R28.

R27ArgumentBuilder

The class implements the command line argument arguments for silent installation specified by the R27 documentation at: http://download.oracle.com/docs/cd/E13150_01/jrockit_jvm/jrockit/releases/R27/install/index.html

The command line arguments for uninstallation isn't documented, but a byte wise inspection of the uninstaller revealed the -silent argument for silent uninstallation.

R28ArgumentBuilder

The class implements the command line argument arguments for silent installation specified by the R28 documentation at: http://download.oracle.com/docs/cd/E15289_01/doc.40/e15065/prod_install.htm

The command line arguments for uninstallation isn't documented, but a byte wise inspection of the uninstaller revealed the -silent argument for silent uninstallation.