Project specific properties for MalariaMine
Each sub-directory needs a build.xml and a project.properties file. See ProjectProperties for a description of the project.properties. Build files are generally empty, delegating to the standard InterMine build files.
NOTE: these files are available in the bio/tutorial/malariamine/ directory. See bio/tutorial/malariamine/dbmodel/, bio/tutorial/malariamine/integrate/, bio/tutorial/malariamine/postprocess/ and bio/tutorial/malariamine/webapp/.
dbmodel
- build.xml:
<project name="malariamine-dbmodel" default="default" basedir="."> <description>represents the production objectstore and the model therein</description> <import file="../../imbuild/objectstore.xml"/> </project>
- project.properties:
compile.dependencies = intermine/integrate/main objectstore.name = os.production model.name = genomic core.model.path = bio/core extra.model.paths.start = bio/core/genomic_additions.xml bio/sources/so/so_additions.xml extra.model.paths.end = bio/core/shortcuts.xml # choose the intermine.properties file from $HOME: intermine.properties.file = malariamine.properties default.intermine.properties.file = ../default.intermine.integrate.properties
integrate
- build.xml:
<project name="malaria-integration" default="default" basedir="."> <description>perform integration</description> <import file="../../imbuild/integrate.xml"/> </project>
- project.properties:
compile.dependencies = intermine/integrate/main,\
malariamine/dbmodel,\
bio/core/main
# choose the intermine.properties file from $HOME:
intermine.properties.file = malariamine.properties
default.intermine.properties.file = ../default.intermine.integrate.properties
# the sources projects sometimes need a model to compile (mostly the postprocessing code), but
# there is a different model in each Mine so we need to tell the dependency system (see
# Dependencies.java) to add this model project to the dependency list of all projects that we
# depend on
extra.project.dependencies = malariamine/dbmodel
postprocess
- build.xml:
<project name="malariamine-postprocess" default="default" basedir="."> <description>perform post processing for malariamine</description> <import file="../../imbuild/postprocess.xml"/> </project>
- project.properties:
compile.dependencies = bio/postprocess/main, bio/core/main, malariamine/dbmodel gen.code = true # choose the intermine.properties file from $HOME: intermine.properties.file = malariamine.properties default.intermine.properties.file = ../default.intermine.integrate.properties objectStoreWriter = osw.production # the bio/postprocess projects need a model to compile, but there is a different model in each Mine # so we need to tell the dependency system (see Dependencies.java) to add this model project to the # dependency list of all projects that we depend on extra.project.dependencies = malariamine/dbmodel
Webapp
webapp
- build.xml:
<project name="malariamine-webapp" default="default" basedir=".">
<description>build, test, package malariamine-webapp</description>
<import file="../../imbuild/application.xml"/>
<target name="-pre-jar"
depends="application.-pre-jar, -add-struts-config"/>
<target name="-add-struts-config"
description="Append the struts config modifications to the webapp"
depends="-pre-init">
<unwar src="${dist.war}" dest="${build.dir}/webapp/">
<patternset>
<include name="WEB-INF/struts-config.xml"/>
<include name="WEB-INF/tiles-defs.xml"/>
</patternset>
</unwar>
<loadfile property="model.struts.config" srcFile="./resources/struts-config-model.xml"/>
<replace file="${build.dir}/webapp/WEB-INF/struts-config.xml" value="${model.struts.config}">
<!-- can't use normal token as xml must be parseable before this replacement -->
<replacetoken><![CDATA[<!--@MODEL_INCLUDE@-->]]></replacetoken>
</replace>
<loadfile property="model.tiles.defs" srcFile="./resources/tiles-defs-model.xml"/>
<replace file="${build.dir}/webapp/WEB-INF/tiles-defs.xml" value="${model.tiles.defs}">
<!-- can't use normal token as xml must be parseable before this replacement -->
<replacetoken><![CDATA[<!--@MODEL_INCLUDE@-->]]></replacetoken>
</replace>
<war destfile="${dist.war}" update="true" >
<webinf dir="${build.dir}/webapp/WEB-INF/">
<filename name="struts-config.xml" />
<filename name="tiles-defs.xml" />
</webinf>
</war>
</target>
</project>
- project.properties:
# Things that should be build before constructing a webapp
compile.dependencies = intermine/webapp/main,\
malariamine/dbmodel,\
intermine/webtasks/main,\
bio/core/main,\
bio/webapp
# The products and their immediate library dependencies of these projects
# will be included in the webapp
deploy.dependencies = malariamine/dbmodel
objectstore.name = os.production
userprofile.objectstorewriter.name = osw.userprofile-production
userprofile.objectstore.name = os.userprofile-production
userprofile.db.name = db.userprofile-production
userprofile.model.name = userprofile
# the project that will make the webapp we will add to
base.webapp.path = bio/webapp/dist/bio-webapp.war
# choose the intermine.properties file from $HOME:
intermine.properties.file = malariamine.properties
default.intermine.properties.file = ../default.intermine.webapp.properties
# the core projects sometimes need a model to compile, but there is a
# different model in each Mine so we need to tell the dependency
# system (see Dependencies.java) to add this model project to the
# dependency list of all projects that we depend on
extra.project.dependencies = malariamine/dbmodel
