46 | | |
47 | | The build script defines all settings for the app. For example: |
48 | | |
49 | | {{{ |
50 | | !#xml |
51 | | <project> |
52 | | <!-- this name is used to name the war file --> |
53 | | <property name="app_name" value="col7a1" /> |
54 | | |
55 | | <!-- this holds all the settings for the generator --> |
56 | | <property name="app_properties" value="apps/${app_name}/org/molgenis/${app_name}/${app_name}.properties"/> |
57 | | |
58 | | <!-- this determines what additional modules should be loaded --> |
59 | | <path id="app.class.path"> |
60 | | <pathelement location="apps/${app_name}" /> |
61 | | <pathelement location="modules/datamodel" /> |
62 | | <pathelement location="modules/auth" /> |
63 | | <pathelement location="modules/pheno" /> |
64 | | <pathelement location="modules/search" /> |
65 | | </path> |
66 | | |
67 | | <!-- import all tasks from build_common: clean, generate, compile, test, war, standalone-jar --> |
68 | | <import file="build_common.xml" /> |
69 | | |
70 | | </project> |
71 | | }}} |
| 57 | |
| 58 | == Creating a new app == |
| 59 | |
| 60 | In order to create a new app you must: |
| 61 | |
| 62 | 1. create a new folder in /apps/<name>. This folder should contain: |
| 63 | * package org.molgenis.<name> |
| 64 | * <name>.properties file |
| 65 | |
| 66 | 2. create a new build script: build_<name>.xml. This file should contain: |
| 67 | |
| 68 | {{{ |
| 69 | !#xml |
| 70 | <project> |
| 71 | <!-- this name is used to name the war file --> |
| 72 | <property name="app_name" value="appname" /> |
| 73 | |
| 74 | <!-- this holds all the settings for the generator --> |
| 75 | <property name="app_properties" value="apps/${app_name}/org/molgenis/${app_name}/${app_name}.properties"/> |
| 76 | |
| 77 | <!-- this determines what additional modules should be loaded --> |
| 78 | <path id="app.class.path"> |
| 79 | <pathelement location="apps/${app_name}" /> |
| 80 | <!-- below optional dependencies on modules --> |
| 81 | <pathelement location="modules/datamodel" /> |
| 82 | <pathelement location="modules/auth" /> |
| 83 | <pathelement location="modules/pheno" /> |
| 84 | <pathelement location="modules/search" /> |
| 85 | </path> |
| 86 | |
| 87 | <!-- below, import all tasks from build_common: clean, generate, compile, test, war, standalone-jar --> |
| 88 | <import file="build_common.xml" /> |
| 89 | |
| 90 | </project> |
| 91 | }}} |
| 92 | |
| 93 | |