NIHVIVO-56 Adjust to the restructured core build script - use a build that is based on the core product-build script.
This commit is contained in:
parent
8585f21d01
commit
710ddfedc6
6 changed files with 45 additions and 307 deletions
192
build.xml
192
build.xml
|
@ -2,168 +2,44 @@
|
||||||
|
|
||||||
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
<project name="VIVO" default="describe" basedir=".">
|
<!-- ======================================================================
|
||||||
|
Build script for the VIVOweb product.
|
||||||
|
|
||||||
|
The deploy.properties file contains both build properties and runtime
|
||||||
|
properties.
|
||||||
|
|
||||||
|
The required build properties are:
|
||||||
|
vitroCore.dir
|
||||||
|
tomcat.home
|
||||||
|
webapp.name
|
||||||
|
====================================================================== -->
|
||||||
|
<project name="vivoweb" default="describe">
|
||||||
|
|
||||||
<property file="config/build.properties" />
|
<!--
|
||||||
|
Load the properties from deploy.properties.
|
||||||
|
-->
|
||||||
|
<property name="deploy.properties.file" location="deploy.properties" />
|
||||||
|
<fail message="You must create a "${deploy.properties.file}" file.">
|
||||||
|
<condition>
|
||||||
|
<not>
|
||||||
|
<available file="${deploy.properties.file}" />
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
</fail>
|
||||||
|
<property file="${deploy.properties.file}" />
|
||||||
|
<fail unless="vitro.core.dir"
|
||||||
|
message="${deploy.properties.file} must contain a value for vitro.core.dir" />
|
||||||
|
|
||||||
<!-- =================================
|
|
||||||
target: describe
|
|
||||||
================================= -->
|
|
||||||
<target name="describe" depends="" description="describes the available targets.">
|
|
||||||
<echo>
|
|
||||||
Available targets:
|
|
||||||
all -- Runs "clean", then "deploy".
|
|
||||||
clean -- Removes any artifacts from previous builds, so the next build will be
|
|
||||||
a clean one.
|
|
||||||
deploy -- Rssembles the VIVO application and deploys it to the "webapps"
|
|
||||||
directory of your Tomcat server.
|
|
||||||
</echo>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- =================================
|
<!--
|
||||||
target: all
|
Set this property so the core themes will not be included in the build.
|
||||||
================================= -->
|
-->
|
||||||
<target name="all" depends="clean, deploy" description="description" />
|
<property name="skip.core.themes" value="true" />
|
||||||
|
|
||||||
<!-- =================================
|
|
||||||
target: clean
|
|
||||||
================================= -->
|
|
||||||
<target name="clean" description="Start with a fresh build.">
|
|
||||||
<delete dir="${deploy.staging.dir}" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- =================================
|
|
||||||
target: deploy
|
|
||||||
================================= -->
|
|
||||||
<target name="deploy"
|
|
||||||
depends="runCoreBuild"
|
|
||||||
description="Assemble the VIVO application and deploy it.">
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- - - - - - - - - - - - - - - - - -
|
<!--
|
||||||
target: prepare
|
Now get the standard product-build file.
|
||||||
|
-->
|
||||||
Move everything into a work-area, so we can merge core with vivoweb.
|
<import file="${vitro.core.dir}/webapp/product-build.xml" />
|
||||||
- - - - - - - - - - - - - - - - - -->
|
|
||||||
<target name="prepare">
|
|
||||||
<mkdir dir="${deploy.staging.dir}" />
|
|
||||||
<copy todir="${deploy.staging.dir}">
|
|
||||||
<fileset dir="vitro-core">
|
|
||||||
<!-- if the core build directory exists, skip it. -->
|
|
||||||
<exclude name="${core-build.blocking.path}" />
|
|
||||||
<!-- omit any themes from the core. -->
|
|
||||||
<exclude name="${themes.blocking.path}" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- - - - - - - - - - - - - - - - - -
|
|
||||||
target: properties
|
|
||||||
- - - - - - - - - - - - - - - - - -->
|
|
||||||
<target name="properties" depends="prepare">
|
|
||||||
<fail message="You must create a "${deploy.properties.file}" file.">
|
|
||||||
<condition>
|
|
||||||
<not>
|
|
||||||
<available file="${deploy.properties.file}" />
|
|
||||||
</not>
|
|
||||||
</condition>
|
|
||||||
</fail>
|
|
||||||
|
|
||||||
<property file="${deploy.properties.file}" prefix="deploy." />
|
|
||||||
<fail unless="deploy.tomcat.home"
|
|
||||||
message="${deploy.properties.file} must contain a value for tomcat.home" />
|
|
||||||
<fail unless="deploy.webapp.name"
|
|
||||||
message="${deploy.properties.file} must contain a value for webapp.name" />
|
|
||||||
<fail unless="deploy.upload.directory"
|
|
||||||
message="${deploy.properties.file} must contain a value for upload.directory" />
|
|
||||||
<fail unless="deploy.LuceneSetup.indexDir"
|
|
||||||
message="${deploy.properties.file} must contain a value for LuceneSetup.indexDir" />
|
|
||||||
<fail unless="deploy.Vitro.defaultNamespace"
|
|
||||||
message="${deploy.properties.file} must contain a value for Vitro.defaultNamespace" />
|
|
||||||
<fail unless="deploy.Vitro.smtpHost"
|
|
||||||
message="${deploy.properties.file} must contain a value for Vitro.smtpHost (may be empty)" />
|
|
||||||
<fail unless="deploy.VitroConnection.DataSource.url"
|
|
||||||
message="${deploy.properties.file} must contain a value for VitroConnection.DataSource.url" />
|
|
||||||
<fail unless="deploy.VitroConnection.DataSource.username"
|
|
||||||
message="${deploy.properties.file} must contain a value for VitroConnection.DataSource.username" />
|
|
||||||
<fail unless="deploy.VitroConnection.DataSource.password"
|
|
||||||
message="${deploy.properties.file} must contain a value for VitroConnection.DataSource.password" />
|
|
||||||
<fail unless="deploy.initialAdminUser"
|
|
||||||
message="${deploy.properties.file} must contain a value for initialAdminUser" />
|
|
||||||
|
|
||||||
<dependset>
|
|
||||||
<srcfilelist dir="." files="${deploy.properties.file}" />
|
|
||||||
<targetfilelist dir="."
|
|
||||||
files="${globalbuild.properties.file},${vitrodeploy.properties.file},${vitroUsers.owl.file}" />
|
|
||||||
</dependset>
|
|
||||||
|
|
||||||
<copy file="${globalbuild.template.file}"
|
|
||||||
tofile="${globalbuild.properties.file}"
|
|
||||||
filtering="true">
|
|
||||||
<filterchain>
|
|
||||||
<expandproperties />
|
|
||||||
</filterchain>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy file="${vitrodeploy.template.file}"
|
|
||||||
tofile="${vitrodeploy.properties.file}"
|
|
||||||
filtering="true">
|
|
||||||
<filterchain>
|
|
||||||
<expandproperties />
|
|
||||||
</filterchain>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<copy file="${vitroUsers.template.file}" tofile="${vitroUsers.owl.file}" filtering="true">
|
|
||||||
<filterchain>
|
|
||||||
<expandproperties />
|
|
||||||
</filterchain>
|
|
||||||
</copy>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- - - - - - - - - - - - - - - - - -
|
|
||||||
target: themes
|
|
||||||
- - - - - - - - - - - - - - - - - -->
|
|
||||||
<target name="themes">
|
|
||||||
<copy todir="${themes.destination.dir}">
|
|
||||||
<fileset dir="${themes.source.dir}" />
|
|
||||||
</copy>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- - - - - - - - - - - - - - - - - -
|
|
||||||
target: ontology
|
|
||||||
- - - - - - - - - - - - - - - - - -->
|
|
||||||
<target name="ontology">
|
|
||||||
<copy todir="${ontology.destination.dir}">
|
|
||||||
<fileset dir="${ontology.source.dir}" />
|
|
||||||
</copy>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- - - - - - - - - - - - - - - - - -
|
|
||||||
target: model
|
|
||||||
- - - - - - - - - - - - - - - - - -->
|
|
||||||
<target name="model">
|
|
||||||
<copy todir="${submodels.destination.dir}">
|
|
||||||
<fileset dir="${submodels.source.dir}" />
|
|
||||||
</copy>
|
|
||||||
<copy todir="${init-data.destination.dir}">
|
|
||||||
<fileset dir="${init-data.source.dir}" />
|
|
||||||
</copy>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- - - - - - - - - - - - - - - - - -
|
|
||||||
target: modifications
|
|
||||||
- - - - - - - - - - - - - - - - - -->
|
|
||||||
<target name="modifications">
|
|
||||||
<copy todir="${modifications.destination.dir}">
|
|
||||||
<fileset dir="${modifications.source.dir}" />
|
|
||||||
</copy>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- - - - - - - - - - - - - - - - - -
|
|
||||||
target: runCoreBuild
|
|
||||||
- - - - - - - - - - - - - - - - - -->
|
|
||||||
<target name="runCoreBuild" depends="properties, themes, ontology, model, modifications">
|
|
||||||
<ant antfile="${vitro-core.build.file}" inheritall="false" target="deploy" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
#
|
|
||||||
# This is where we're assembling the source.
|
|
||||||
#
|
|
||||||
deploy.staging.dir = .deployStaging
|
|
||||||
|
|
||||||
#
|
|
||||||
# Setting up the config properties.
|
|
||||||
#
|
|
||||||
deploy.properties.file = deploy.properties
|
|
||||||
|
|
||||||
globalbuild.template.file = config/globalbuild.properties.template
|
|
||||||
vitrodeploy.template.file = config/vitrodeploy.properties.template
|
|
||||||
vitroUsers.template.file = config/vitroUsers.owl.template
|
|
||||||
|
|
||||||
globalbuild.properties.file = ${deploy.staging.dir}/config/globalbuild.properties
|
|
||||||
vitrodeploy.properties.file = ${deploy.staging.dir}/webapp/config/deploy.properties
|
|
||||||
vitroUsers.owl.file = ${deploy.staging.dir}/webapp/ontologies/auth/vitroUsers.owl
|
|
||||||
|
|
||||||
#
|
|
||||||
# Prepare the staging area
|
|
||||||
#
|
|
||||||
core-build.blocking.path = webapp/.build/**/*
|
|
||||||
themes.blocking.path = webapp/web/themes/**/*
|
|
||||||
|
|
||||||
#
|
|
||||||
# Installing the themes.
|
|
||||||
#
|
|
||||||
themes.source.dir = themes/
|
|
||||||
themes.destination.dir = ${deploy.staging.dir}/webapp/web/themes/
|
|
||||||
|
|
||||||
#
|
|
||||||
# Installing the Ontology.
|
|
||||||
#
|
|
||||||
ontology.source.dir = ontology
|
|
||||||
ontology.destination.dir = ${deploy.staging.dir}/webapp/ontologies/user
|
|
||||||
|
|
||||||
#
|
|
||||||
# Installing the Model.
|
|
||||||
#
|
|
||||||
submodels.source.dir = model/submodels
|
|
||||||
submodels.destination.dir = ${deploy.staging.dir}/webapp/model/submodels
|
|
||||||
init-data.source.dir = model/init-data
|
|
||||||
init-data.destination.dir = ${deploy.staging.dir}/webapp/model/init-data
|
|
||||||
|
|
||||||
#
|
|
||||||
# Adding modifications
|
|
||||||
#
|
|
||||||
modifications.source.dir = modifications
|
|
||||||
modifications.destination.dir = ${deploy.staging.dir}/webapp/web
|
|
||||||
|
|
||||||
#
|
|
||||||
# The core compile and deploy.
|
|
||||||
#
|
|
||||||
vitro-core.build.file = ${deploy.staging.dir}/webapp/build.xml
|
|
|
@ -1,49 +0,0 @@
|
||||||
# these are ant build properties that all of the vitro and build.xml files might need.
|
|
||||||
#
|
|
||||||
# All of these paths must be absolute or relative to the vitro directory. Relative
|
|
||||||
# is preferred.
|
|
||||||
|
|
||||||
# Notice that the use of relative paths is facilitated by the basedir attribute of the
|
|
||||||
# ant project elements. All projects should use the same base directory so that the
|
|
||||||
# relative paths will point to the correct files.
|
|
||||||
# See the ant documentation for project element basedir attribute.
|
|
||||||
|
|
||||||
############## basic configuration ###############
|
|
||||||
java_api=/usr/local/java/java_home
|
|
||||||
|
|
||||||
############ tomcat stuff ####################
|
|
||||||
tomcat.home=${deploy.tomcat.home}
|
|
||||||
|
|
||||||
############# source directory #########################################
|
|
||||||
##### This parameter is used for referencing a "permanent" home #######
|
|
||||||
##### in the source directory of the project for uploaded files #######
|
|
||||||
##### so that if the Tomcat webapp context is wiped out, any #######
|
|
||||||
##### uploaded files (usually images) are not lost. #######
|
|
||||||
########################################################################
|
|
||||||
source.home=/usr/local/src/Vitro
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
##### Everything under this is used by the Vitro build.xml files #######
|
|
||||||
##### You should not need to customize it for you local install #######
|
|
||||||
########################################################################
|
|
||||||
|
|
||||||
########### ant contrib tasks ###############
|
|
||||||
ant.lib=./config/ant/lib
|
|
||||||
ant.contrib.jar=${ant.lib}/ant-contrib-1.0b2.jar
|
|
||||||
|
|
||||||
#### locations of files in the build #####
|
|
||||||
webapp.dir=./webapp
|
|
||||||
webapp.lib=${webapp.dir}/lib
|
|
||||||
webapp.build=${webapp.dir}/.build
|
|
||||||
webapp.dir.jar=${webapp.build}/vitro-webapp.jar
|
|
||||||
webapp.name=${deploy.webapp.name}
|
|
||||||
webapp.deploy.home=${tomcat.home}/webapps/${webapp.name}
|
|
||||||
|
|
||||||
ingest.dir=./ingestTool
|
|
||||||
ingest.lib=${ingest.dir}/lib
|
|
||||||
ingest.build=${ingest.dir}/build
|
|
||||||
|
|
||||||
ws.dir=./services
|
|
||||||
ws.lib=${ws.dir}/lib
|
|
||||||
ws.build=${webapp.dir}/build
|
|
||||||
ws.wsdd.dir=${ws.dir}/wsdd
|
|
|
@ -7,7 +7,7 @@
|
||||||
xml:base="http://vitro.mannlib.cornell.edu/ns/vitro/default">
|
xml:base="http://vitro.mannlib.cornell.edu/ns/vitro/default">
|
||||||
|
|
||||||
<vitro:User rdf:about="#defaultAdminUser">
|
<vitro:User rdf:about="#defaultAdminUser">
|
||||||
<vitro:username rdf:datatype="http://www.w3.org/2001/XMLSchema#string">${deploy.initialAdminUser}</vitro:username>
|
<vitro:username rdf:datatype="http://www.w3.org/2001/XMLSchema#string">${initialAdminUser}</vitro:username>
|
||||||
<vitro:md5password rdf:datatype="http://www.w3.org/2001/XMLSchema#string">22BA075EC8951A70960A0A95C0BC2294</vitro:md5password>
|
<vitro:md5password rdf:datatype="http://www.w3.org/2001/XMLSchema#string">22BA075EC8951A70960A0A95C0BC2294</vitro:md5password>
|
||||||
<vitro:roleURI rdf:datatype="http://www.w3.org/2001/XMLSchema#string">role:/50</vitro:roleURI>
|
<vitro:roleURI rdf:datatype="http://www.w3.org/2001/XMLSchema#string">role:/50</vitro:roleURI>
|
||||||
</vitro:User>
|
</vitro:User>
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Vitro deployment properties
|
|
||||||
#
|
|
||||||
# This file exists as a template in the vivoweb distribution. The property
|
|
||||||
# values are substituted in by the build script.
|
|
||||||
#
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#
|
|
||||||
# The location where the VIVO application will store uploaded files
|
|
||||||
# (usually images). You should arrange for these files to be backed up in some
|
|
||||||
# way.
|
|
||||||
#
|
|
||||||
UploadImagesServlet.sourceDirName = ${deploy.upload.directory}
|
|
||||||
|
|
||||||
#
|
|
||||||
# The location where the VIVO application will create its Lucene search
|
|
||||||
# index.
|
|
||||||
#
|
|
||||||
LuceneSetup.indexDir = ${deploy.LuceneSetup.indexDir}
|
|
||||||
|
|
||||||
#
|
|
||||||
# This namespace will be used when generating URIs for objects created in the
|
|
||||||
# editor. Change it to reflect your own domain. For example, Cornell's
|
|
||||||
# namespace is http://vivo.cornell.edu/individual/
|
|
||||||
#
|
|
||||||
# Note: it is essential that this namespace end with a trailing slash.
|
|
||||||
#
|
|
||||||
Vitro.defaultNamespace = ${deploy.Vitro.defaultNamespace}
|
|
||||||
|
|
||||||
#
|
|
||||||
# SMTP host which the "Contact Us" form can use to send mail. If this is left
|
|
||||||
# empty, the "Contact Us" form will be disabled.
|
|
||||||
#
|
|
||||||
Vitro.smtpHost =
|
|
||||||
|
|
||||||
#
|
|
||||||
# The basic parameters for a MySQL database connection. Change the end of the
|
|
||||||
# URL to reflect your database name (if it is not "vitro"). Change the username
|
|
||||||
# and password to match the authorized user you created in MySQL.
|
|
||||||
#
|
|
||||||
VitroConnection.DataSource.url = ${deploy.VitroConnection.DataSource.url}
|
|
||||||
VitroConnection.DataSource.username = ${deploy.VitroConnection.DataSource.username}
|
|
||||||
VitroConnection.DataSource.password = ${deploy.VitroConnection.DataSource.password}
|
|
|
@ -9,6 +9,16 @@
|
||||||
#
|
#
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#
|
||||||
|
# Where is the Vitro core directory?
|
||||||
|
# In most deployments, this is set to ./vitro-core, but it commonly points
|
||||||
|
# elsewhere during development.
|
||||||
|
# Examples:
|
||||||
|
# vitro.core.dir = ./vitro-core
|
||||||
|
# vitro.core.dir = ../vitro
|
||||||
|
# vitro.core.dir = /usr/local/vitro/trunk
|
||||||
|
vitro.core.dir = ./vitro-core
|
||||||
|
|
||||||
#
|
#
|
||||||
# The base install directory for your Tomcat server. The VIVO application
|
# The base install directory for your Tomcat server. The VIVO application
|
||||||
# will be deployed in the /webapps directory below this base.
|
# will be deployed in the /webapps directory below this base.
|
||||||
|
|
Loading…
Add table
Reference in a new issue