Project Definition Files

1.  Introduction
2.  invictaProject
3.  projectSettings
4.  component

5.  Examples

1. Introduction

Project Definition Files are simple XML files inside which resides the definition of the project's settings, components, dependencies between components, products and properties. From them the information needed for the creation of the output is gathered.

The project definition needn't be in one XML file. Given the project's size, it is sometimes better to divide it into many small XML files; a list of the locations of these files (the names of the files or directories in which the reside) tells Invicta where to look for them.

The structure of such a file is as follows: a single projectSettings element (name, dir, project properties, etc.) and multiple components (referencing each other), all under an invictaProject root. To view the DTD defining the structure, click here.

Return to top

2. invictaProject

The Project Definition File's root. It has no attributes, and contains the following elements:

Return to top

3. projectSettings

The projectSettings element is the container of all project properties required according to the Types used in the project.



As mentioned earlier, the projectSettings's children are the properties. A property element is a name-value couple. There can be many properties per project. Each component type used in the project requires certain properties to be set in the Project Defintion File.

property Attributes:

Return to top

4. component

A component is the instantiation of a type, which is the Invicta equivalent of a class. Together, components define the project's "ingredients".



depend Attributes:

property Attributes:

product Attributes:

Return to top

5. Examples

Simple project settings:


 <projectSettings name="sample" dir="." version="1.0">
    <property name="dist.dir" value="dist/sample"/> 
    <property name="dist.product.dir" value="lib"/> 
    <property name="local.env.dir" value="."/>
    <property name="invicta.dir" value="/home/invicta"/>


A simple Libraries component with a few products with internal dependencies:


 <component name="sample.lib" type="Libraries">
    <product name="servlet" static="true"
             file="/servlet/servlet.jar" type="jar"/> 
    <product name="loglib" static="true"
             file="/loglib/LogLib.jar" type="jar"/> 
    <product name="commonlib" static="true"
             file="/commonlib/CommonLib.jar" type="jar"/> 
    <product name="anotherlib" static="true" depends="commonlib"
             file="/anotherlib/AnotherLib.jar" type="jar"/> 


A simple component of a JAR type with a single product, single depend line and no properties:


 <component name="sample.utils" type="JAR">
    <product file="SampleUtils.jar" type="jar"/> 
    <depend name="sample.lib" products="loglib" export="false"/> 


A simple component of a JAR type with a single product, 2 depend lines and a property:


 <component name="sample.core" type="JAR">
    <product file="SampleCore.jar" type="jar"/> 
    <depend name="sample.utils"/>
    <depend name="sample.lib" products="anotherlib, loglib" export="true"/>
    <property name="manifest.additional.classpath" value="ProjectIntegration.jar"/>


A component of a WAR type with 2 products (jar & war) and 2 depend lines:


 <component name="sample.ui" type="WAR">
    <product type="jar" file="SampleUI.jar"/>
    <product type="war" file="SampleUI.war" appName="SampleUI"/>
    <depend name="sample.lib" products="servlet"/>
    <depend name="sample.core"/>


Return to top