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-git-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.git.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.git-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.git-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.
Implementation
Plugin class
The package com.alpha.pineapple.plugin.git is the root package of the plugin and contains the plugin class PluginImpl.
Furthermore the package contains the interface GitConstants which constant used by the plugin.
Session class
The package com.alpha.pineapple.plugin.git.session contains the session classes for the plugin:
- GitSession defines the interface for Git sessions.
- GitSessionImpl implements the session interface and contains logic to access and manipulate Git repositories. []
Operation classes
The package com.alpha.pineapple.plugin.git.operation contains the operation classes for the plugin.
The plugin implement these default operations:
- DeployConfiguration implements the operation deploy-configuration.
Model helper classes
N/A. Model handling is implemented in the operation classes.
Commands
The package com.alpha.pineapple.plugin.git.command contains the command classes for the plugin. The plugin implement these commands:
- CloneRepositoryCommand implements command to clone a remote Git repository.