The new hsg3 spans many git repositories, which together form the applications and data published at history.state.gov. This project simplifies the tasks of getting these repositories and building and creating packages to install into eXist.
To automate the following steps:
(No check mark means this hasn't been automated and must still be done manually.)
For Office of the Historian staff, see the hsg-project wiki, especially the article Setting up a history.state.gov development environment on your computer and Using version control with history.state.gov publications and datasets.
For the general developer community:
hsg-project.xpr
file in oXygenClone all repositories
once to pull required repositories (and any time new repositories are added). Deploy all repositories to localhost
to build all packages and deploy them into the database.ant setup
once to pull required repositories (and any time new repositories are added). ant
to build all packages and deploy them into the database. build/build.properties
to ensure that local.instance.uri
, local.instance.user
, and local.instance.password
are correct for your eXist instance.build/build.properties
to set the correct path to the executable.Fetch updates to all repositories
Fetch updates to current repository
Deploy current repository to localhost
Delete generated packages
(This also calls each repository's clean
targets.)ant update
ant build
ant clean
. This also calls each repository's own clean
targets.ant update-one -Drepo-name=REPO_NAME
ant -f repos/REPO_NAME/build.xml
ant deploy-one -Drepo-name=REPO_NAME -Dxar=REPO_NAME-X_Y.xar
hsg-shell
code, enter:ant update-one -Drepo-name=hsg-shell
ant -f repos/hsg-shell
ant deploy-one -Drepo-name=hsg-shell -Dxar=hsg-shell-0.2.xar
clean-default-data-dir
build target - which wipes your database of all files and thus avoids the time required to uninstall old packages before installing the new ones):git pull
ant clean
ant setup
ant
The default ant
target will build xar files without any triggers and will internally call targets build
> build-xar
.
An additional variable in target build-xar
lets you to build 2 xar files containing triggers for 2 different environments: prod and dev.
By running the ant build
command plus the environment variable like described below, you call a specific subant
target xar-dev
or xar-prod
- both are found in each repo's build.xml.
Command for DEV:
*-consumer-dev.xar
without replication triggers and *-producer-dev.xar` containing replication triggersxar-dev
ant -Dbuild-env=-dev build
Command for PROD:
*-consumer-prod.xar
without replication triggers and *-producer-prod.xar
containing replication triggersxar-prod
ant -Dbuild-env=-prod build
build/build.properties