1. Introduction
2. Installing Invicta
3. Creating Directory Structure
4. Customizing Template Project
5. Running InvictaStarting a new Invicta project is rather simple. All you need to do is follow a few steps, and you're up and running. To make things even simpler, you may use the New Project Template which is part of the distribution to a new location, and edit it.
You should also take a look at the sample projects that are part of the distribution (sample and sample2 directories).
Following is a detailed description of the required actions for creating an Invicta build project.
The installation of Invicta is performed by simply extracting the ZIP file of Invicta (invicta-0.1.zip) into your desired installation location. You may want to install Invicta in a global location, where multiple projects can access.
Invicta distribution has the following structure and files:
/ README.txt - General information about Invicta distribution content. /lib - Run-time libraries required for running Invicta. invicta.jar - The JAR file of the Invicta application. ant-contrib-0.1.jar commons-beanutils.jar commons-collections.jar commons-digester.jar commons-lang.jar commons-logging.jar xercesImpl.jar xmlParserAPIs.jar /types - Built-in component types. JAR.xml WAR.xml EAR.xml Global.xml Libraries.xml Project.xml Test.xml /docs - Invicta's complete manual. /template - A new-project template. invicta.properties invicta.build.xml
runInvicta.tcsh runInvicta.bat /projDef template.xml /sample
- A sample project. /sample2 - Another sample project that depends on the first sample projet.
3. Creating Directory Structure
The first step is creating a project home directory somewhere. Under it there should be a directory for each project component, such that component hierarchy is reflected in the directory structure. For example: component myproj.comp1 should reside in <Project_Home>/comp1, and myproj.comp1.comp2 in <Project_Home>/comp1/comp2.
Each component's type requires a specific directory structure created under the component's directory. The following notes describe the default directory structure of JAR and WAR components:
- JAR - requires the directories src/java for Java source and conf/share for descriptor files that should be in the target JAR file. Other directories will be created automatically in ANT build time (probably under the target directory).
- WAR - in addition to src/java and conf/share of the JAR type, required src/jsp for JSP source files and src/static for static Web files (HTML, gif, WEB-INF/web.xml, etc.).
You need an access to an installation directory of Invicta, where Invicta's JAR files and built-in Types are located.. Another directory, consisting of project definition files, custom properties for ANT compilation time and custom files (Types, Handlers and Dumpers, if you have them), should be created. There should also be a separate directory for the output files, for example, an /env directory for the build.xml file generated by AntDumper.
4. Customizing Template Project
You may manually create your scripts and properties files for running Invicta, but you may also copy the content of the template directory of the distribution into your new project's location and customize it:
The template project contains the following files:
invicta.properties
Configuration parameters of Invicta. May also be specified as system properties.
invicta.definition.locations
A list of project definition locations (comma-separated list, each item is either a file or a directory all whose .xml files will be used).
Template: Sets the list of project definition locations to point to the local projDef directory.
Customize: Add your desired location. For example, add exported definition files of remote projects.
invicta.type.locations
A list of type definition locations (similar to project definition locations).
Template: Sets the list of type definition locations to point to Invicta's built-in types, which are located under invicta.dir.
Customize: Add the the location of your custom type definitions.
invicta.dumpers.<dumper_name>.enabled
The enabled property declares whether a dumper with the given dumper_name should be activated or not.
Template: Enables the dumpers: ant, projectDocumentation and exportedProjectDefinition.
Customize: Enable or disable the built-in dumpers or your own custom dumpers.
invicta.dumpers.<dumper_name>.<property_name>
Properties for the specific dumper with the given dumper_name. Most dumpers requires the file property that points to the output file to create.
Template: ant.file=build.xml, projectDocumentation.file=docs, exportedProjectDefinition.file=exportedProjDef.xml
Customize: Specify your desired output file names and supply specific properties for additional dumpers.
invicta.jar.file
A full path of the JAR file of Invicta. Used for recognizing a change in the version of Invicta.
Template: Assumes that a system property named invicta.dir was given.
Customize: You may define in this file any properties and reference the defined properties using ${property_name}.
invicta.build.xml
Ant script for running Invicta. Contains a local.init target for customizing execution settings:
Invicta installation directory.
Local directory for Invicta environment files.
Directories of remote projects.
Classpath definition of Invicta process.
Customize:
Set your desired Invicta installation directory.
Point to your local project and remote project locations.
Add your JAR files with custom dumpers and handlers to the Classpath of Invicta process.
projDef/template.xml
An initial template of a project definition file. See Project Definition Files for more details.
Customize:
Define your project name, directory and version.
Set your desired Invicta installation directory.
Point to your local project and remote project locations.
Add your JAR files with custom dumpers and handlers to the Classpath of Invicta process (invicta.additional.classpath project property).
Define the components of your project.
Create additional project definition files for your project.
Add components, their types, products, dependencies and properties, according to your project's requirements.
runInvicta
Simple scripts that run ANT on invicta.build.xml for executing Invicta.
custom.properties
A properties file for overriding default values while running ANT on the build.xml file generated by Invicta.
That's it! Activating the Invicta running script will produce the output files you need. Refer to Invicta Usage for more details.