Project Types

The imbuild directory contains a number of ant build files, most of which are implementations of each logical project type. Most project types 'extend' another project type, the base type usually being library.xml.

library.xml

Plain old jar.

tests.xml

Extends library.xml to add support for running junit tests and producing a test report. New: tests.xml now copies default.intermine.properties and intermine.properties if they have been declared in project.properties.

model.xml

Extends library.xml but generates source code from a model which might be in several different formats. The source model file (for example testmodel.zargo) should be placed in the root of the project directory, next to build.xml. The project name as defined at the top of build.xml should match the name of the source model file. If this is the case then the build implementation should find the file and perform the correct conversion to an intermine model file. Java will then be generated and compiled.

webapp.xml

A generic webapp project. Used to produce the model-less intermine-webapp.war. Webapp projects (and therefore application.xml projects) must also declare a "deploy.dependencies" property in project.properties. This property lists projects whose artifacts and directly associated libraries should be copied into the resulting war file (to WEB-INF/lib).

application.xml

Extends webapp.xml. A project of this type represents a production webapp so it's one of these per InterMine application. It will depend on an objectstore.xml project for its model and also on intermine-webapp/main for its model-less webapp. Code that depends on the production model should be placed in the src directory. Application/model specific jsp, css and images should go in resources/main/model. This project type contains targets for building/exporting/imorting the userprofile database. There are also targets relating to precomputing and template queries. All branding and customisation should be contained within application projects.

objectstore.xml

Extends model.xml but fetches its model from the database rather than from a file. It is therefore necessary to declare the objectstore from which to fetch the model in project.properties:

objectstore.name = os.unittest
db.name = db.unittest
model.name = testmodel

The build-db target should be used to build the objectstore in the first place. It also inserts the original model into the database therefore projects of this type must depend on the original model project (testmodel in this example).

Each intermine based application will have a single project of this type. In the testmodel application the project is called "dbmodel" to reflect the fact that it fetches its model from the database.

The build-db target also merges selected model parts from the sources along with the core model specified by 'core.model.name' in project.properties. Copies the core model to the project root directory and then merges additions. At the moment it can't automatically work out which additions files to merge (e.g. from the project.xml) and so you have to override the -merge-models target like this:

  <target name="-merge-models" unless="merge.not.required">
    <merge-additions source="psi"/>
    <merge-additions source="rnai"/>
    <merge-additions source="ensembl"/>
    ...
  </target>

source.xml

An integration source (projects directly under 'sources'). Defines the generic integration pipeline. Knows how to retrieve gff3, from a database or from XML. Which one it tries to do is determined by properties that are set (usually in the project.properties for the particular source. What a source actually is (whether it's a type of data or a file format) isn't really very well defined and whether the source.xml files is extended to deal with another type of data source, or whether a source directory is created (and ant override) (e.g. fasta) just depends on how much reuse there will be.

integrate.xml

Project type for myappl/integrate projects. Invokes the Integrate and PostProcess? tasks (see imbuild/ant-tasks) which read the project.xml and do stuff.


See also InterMineBuildSystem